mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-08-29 04:26:20 +00:00
Adds a fully self-contained `mcp/` package that exposes Semantica as a
Model Context Protocol server over stdio (JSON-RPC 2.0).
17 tools across 5 domains:
- Extraction: extract_entities, extract_relations, extract_all
- Decision intelligence: record_decision, query_decisions, find_precedents,
get_causal_chain, analyze_decision_impact
- Knowledge graph: add_entity, add_relationship, search_graph,
get_graph_summary, get_graph_analytics
- Reasoning: run_reasoning, abductive_reasoning
- Export & provenance: export_graph (JSON/CSV/GraphML/Parquet/RDF), get_provenance
4 resources: semantica://graph/summary, semantica://decisions/list,
semantica://schema/info, semantica://ontology/schema
Package layout:
mcp/__init__.py + __main__.py — entry points (python -m mcp)
mcp/server.py — SemanticaMCPServer + stdio event loop
mcp/session.py — lazy ContextGraph singleton
mcp/schemas.py — JSON Schema for all 17 tool inputs
mcp/tools/{extraction,decisions,graph,reasoning,export}.py
mcp/resources/registry.py — URI → handler map
mcp/README.md — per-tool setup (Claude Code, Cursor, Windsurf,
Cline, Continue, VS Code, Amazon Q)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
547 B
Python
23 lines
547 B
Python
"""
|
|
MCP tool registry — imports all tool handlers and assembles TOOL_DEFINITIONS.
|
|
|
|
Each module under mcp/tools/ registers its handlers here.
|
|
"""
|
|
|
|
from .decisions import DECISION_TOOLS
|
|
from .export import EXPORT_TOOLS
|
|
from .extraction import EXTRACTION_TOOLS
|
|
from .graph import GRAPH_TOOLS
|
|
from .reasoning import REASONING_TOOLS
|
|
|
|
# Ordered list — exposed to the MCP client via tools/list
|
|
TOOL_DEFINITIONS = (
|
|
EXTRACTION_TOOLS
|
|
+ DECISION_TOOLS
|
|
+ GRAPH_TOOLS
|
|
+ REASONING_TOOLS
|
|
+ EXPORT_TOOLS
|
|
)
|
|
|
|
__all__ = ["TOOL_DEFINITIONS"]
|