semantica.mcp_server exposes Semantica’s knowledge graph, decision intelligence, semantic extraction, and reasoning capabilities as an MCP (Model Context Protocol) server over stdio:
- 15 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
- 15 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, query the live graph, update nodes, archive nodes.
- 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 15 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.
query_graph
query_graph
Read the live graph in one of three modes, set by
mode:node— return a single node bynode_id.neighbors(default) — traverse outward and inward fromnode_idup todepthhops (clamped to 1-5, default 1). Optionalrelationship_typesfilters edge types; optionallimitcaps results.search— keyword matchqueryagainst each node’s id and content. Optionalnode_typerestricts the scan;limitdefaults to 50.
update_node
update_node
Merge a set of properties onto an existing node. The change is applied in memory and, when
SEMANTICA_KG_PATH is set, written back to that file so it survives a restart. Returns persisted: false when no path is configured.Input:node_id and a non-empty properties object are required. Updating a missing node returns an error.delete_node
delete_node
Soft-delete a node: it stays in the graph for history but is marked
status: "archived". Persists to SEMANTICA_KG_PATH when configured.Input: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.
