Repository navigation
MCP server: your AI queries the vault's knowledge, not raw text - #12
Merged
Merged
Conversation
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
This was referenced Aug 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows the merged #11 and checks off the roadmap's headliner.
graphier-mcpspeaks 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
search_vaultget_entitylist_entitiesget_relationsquery_datalogget_conflictsget_timelinelist_notes/read_noteThe 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
isErrortool results, not protocol failures; unknown tools/methods return proper JSON-RPC errors; notifications handled per spec.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.mcpreturned 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