semantica.mcp_server exposes Semantica’s knowledge graph, decision intelligence, semantic extraction, and reasoning capabilities as an MCP (Model Context Protocol) server over stdio:
- 12 MCP tools exposed: extract entities, query graph, record decisions, run reasoning, export results
- No Python code required after launch: configure once, use from any MCP-aware client
- Compatible with Claude Desktop, Windsurf, Cline, Continue, VS Code, Roo Code, Cursor
Server Interface
What You Get
- 12 MCP Tools — Extract entities, extract relations, record decisions, query decisions, find precedents, trace causal chains, add entities, add relationships, run analytics, summarise graph, run reasoning, export graph.
- 3 Readable Resources — Live graph JSON (
semantica://graph/summary), decision list, and schema/version info: readable by any MCP client. - Zero Infrastructure — Runs over stdio: no server, no port, no Docker required. One config block to activate in any MCP client.
- Persistent Graphs — Point
SEMANTICA_KG_PATHat a saved graph file to reload it automatically on every server startup. - Decision Intelligence — Record decisions, find precedents via hybrid similarity search, and trace causal chains across agent runs.
- REST Alternative — The Explorer module offers a full HTTP API and browser dashboard if you prefer programmatic access.
Installation
Configuration
1
Find your MCP client's settings file
2
Add the Semantica MCP server config
3
Test locally before configuring your client
Environment Variables
Tools
The MCP server exposes 12 tools that any connected AI assistant can call:Knowledge Extraction
extract_entities
extract_entities
Extract named entities (people, places, organisations, concepts) from text using Semantica NER.Input:Output:
extract_relations
extract_relations
Extract typed relations and Output:
(subject, predicate, object) triplets from text.Input:Decision Intelligence
record_decision
record_decision
Record a decision with full context, reasoning, and metadata into the knowledge graph.Input:Required fields:
category, scenario, reasoning, outcome, confidence.
Optional: decision_maker (defaults to "mcp_client"), valid_from, valid_until.Output:query_decisions
query_decisions
Query recorded decisions by natural language or category filter.Input:All fields are optional.
limit defaults to 10. When query is provided, similarity search is used. When omitted, category filter applies.find_precedents
find_precedents
Find past decisions similar to a given scenario using hybrid similarity search.Input:
max_results defaults to 5, maximum 50.get_causal_chain
get_causal_chain
Trace the causal chain upstream or downstream from a decision.Input:
direction accepts "upstream" or "downstream" (default: "downstream").
max_depth defaults to 5, maximum 20.Graph Operations
add_entity
add_entity
Add a node/entity to the live knowledge graph.Input:Only
id is required. label defaults to the id value. type defaults to "Entity".add_relationship
add_relationship
Add a directed relationship (edge) between two existing entities.Input:
source and target are required. type defaults to "RELATED_TO".get_graph_summary
get_graph_summary
Return a high-level summary of the current knowledge graph.Output:Takes no input parameters.
get_graph_analytics
get_graph_analytics
Compute PageRank centrality and community detection over the current graph. Returns top nodes by PageRank, community count, and overall node/edge counts.Takes no input parameters.
Reasoning
run_reasoning
run_reasoning
Run forward-chaining IF/THEN rules over a set of facts to derive new facts.Input:Output:
Export
export_graph
export_graph
Export the current knowledge graph to a serialisation format.Input:Supported formats:
turtle, ttl, nt, xml, json-ld, json. Default is json-ld.Resources
The MCP server exposes three readable resources:- Context — The ContextGraph that the MCP server operates on.
- Semantic Extract — NER and relation extraction powering the MCP tools.
- Reasoning — Forward-chaining engine behind run_reasoning.
- Agno Integration — Use Semantica inside Agno multi-agent teams.
