Skip to content

MCP server: your AI queries the vault's knowledge, not raw text - #12

Merged
Joshuaakaspace merged 1 commit into
mainfrom
claude/semantica-repo-evaluation-essnux
Aug 15, 2026
Merged

Joshuaakaspace merged 1 commit into
mainfrom
claude/semantica-repo-evaluation-essnux

Conversation

@Joshuaakaspace

Copy link
Copy Markdown
Collaborator

Follows the merged #11 and checks off the roadmap's headliner. graphier-mcp speaks Model Context Protocol over stdio — newline-delimited JSON-RPC 2.0, zero new dependencies — so Claude Code, Claude Desktop, Cursor, and any MCP client can query the knowledge graph instead of doing RAG over raw text.

{
  "mcpServers": {
    "graphier": {
      "command": "graphier-mcp",
      "env": { "GRAPHIER_VAULT": "/path/to/your/vault" }
    }
  }
}

Nine tools

Tool What the AI gets
search_vault hybrid TF-IDF + graph-boosted hits with snippets and entity matches
get_entity the full dossier: quoted mentions, relations with sentence evidence, conflicts, inferences — did-you-mean on a miss
list_entities entities by type, including user-defined domain types
get_relations typed edges with origin, confidence, and sentence evidence
query_datalog Datalog against extracted facts and the user's own ```datalog rules
get_conflicts detected contradictions, each claim with its sources
get_timeline the cross-source chronology, year-bounded
list_notes / read_note raw source access when the AI does want text

The differentiator: every answer carries provenance. Ask "who founded Acme Corp?" and the AI can cite both conflicting sources, sentence and all — something RAG structurally can't do.

Robustness

  • Tool errors surface as isError tool results, not protocol failures; unknown tools/methods return proper JSON-RPC errors; notifications handled per spec.
  • The graph rebuilds per call on the content-hash extraction cache — unchanged notes cost nothing, and the AI always sees the current vault.

Testing

4 new tests (51 total) over the seeded demo corpus: initialize/tools-list handshake, search + entity dossier with provenance and did-you-mean, relations/Datalog/conflicts/timeline, notes roundtrip and error codes. Plus a live end-to-end stdio smoke test: piping raw JSON-RPC into python -m graphier.mcp returned the user-rule derivations (empire_builder(P, B) → Ada Lovelace and Grace Hopper ↔ Widget Inc).

README gains the client-config section; ROADMAP checks off the item; CHANGELOG updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QVbxD1gd3gsC6zXKE6L3ya


Generated by Claude Code

graphier-mcp (also python -m graphier.mcp) speaks Model Context
Protocol over stdio — newline-delimited JSON-RPC 2.0, zero new
dependencies — so Claude Code, Claude Desktop, Cursor, and any MCP
client can query the knowledge graph instead of doing RAG over raw
text.

Nine tools: search_vault (hybrid search), get_entity (the full dossier:
quoted mentions, relations with sentence evidence, conflicts, inferred
connections — with did-you-mean on a miss), list_entities,
get_relations, query_datalog (against extracted facts AND the user's
own rules), get_conflicts, get_timeline (year-bounded), list_notes,
read_note. Every answer carries the same sentence-level provenance as
the app.

Tool errors surface as isError tool results rather than protocol
failures; unknown tools/methods return proper JSON-RPC errors. The
graph is rebuilt per call on the content-hash extraction cache, so
unchanged notes cost nothing.

4 new tests (51 total) over the seeded demo corpus, plus an end-to-end
stdio smoke test (initialize → datalog query returns the user-rule
derivations). README gains the client config snippet; ROADMAP checks
off its headliner; CHANGELOG updated.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QVbxD1gd3gsC6zXKE6L3ya
@Joshuaakaspace
Joshuaakaspace merged commit 0898eb9 into main Aug 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants