graphify-mcp
Allows adding a source from arXiv by URL, enabling the knowledge graph to include research papers as nodes.
Optionally used as a local backend for labeling communities with semantic names via the graphify_label_communities tool.
Optionally used as a backend API for labeling communities with semantic names via the graphify_label_communities tool.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@graphify-mcpgive me an overview of the codebase graph"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
graphify-mcp
A Python MCP server that exposes the Graphify knowledge graph as MCP tools, prompts and resources — so an AI assistant can explore your codebase through the graph during development, cheaply (token-budgeted) and structurally.
Note: Graphify ships its own embedded MCP server (
graphify ./raw --mcp). This project adds analysis tools, token-budgeted subgraph extraction, git freshness checks, per-community resources, reusable prompts, and LLM-friendly tool annotations + structured (JSON) output on top.
Installation
# graphify-mcp itself
pip install graphify-mcp
# plus the Graphify CLI it wraps (needed for build/query/path/explain/add)
pip install graphifyy && graphify installFrom source:
git clone https://github.com/yasinyaman/graphify-mcp
cd graphify-mcp
pip install -e ".[dev]"Related MCP server: CodeRAG
Running
GRAPHIFY_PROJECT_DIR=/path/to/repo graphify-mcp-server
# equivalently, collision-proof:
GRAPHIFY_PROJECT_DIR=/path/to/repo python -m graphify_mcpHeads-up:
graphifyyships its owngraphify-mcpconsole script (its embedded server), so if both packages are installed the baregraphify-mcpcommand resolves to whichever was installed last. Usegraphify-mcp-serverorpython -m graphify_mcpto always launch this server.
Claude Code
Copy mcp.json to a .mcp.json at your project root. GRAPHIFY_PROJECT_DIR: "." uses the project root.
Claude Desktop / Cowork
Add the contents of claude_desktop_config.json to your Claude Desktop config:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Transport (stdio default, optional HTTP)
stdio is the default and the right choice for a per-developer local server. To serve over HTTP instead (e.g. a shared graph for a team or a web MCP client):
GRAPHIFY_TRANSPORT=streamable-http GRAPHIFY_HOST=127.0.0.1 GRAPHIFY_PORT=8000 \
GRAPHIFY_PROJECT_DIR=/path/to/repo graphify-mcp-serverAny HTTP transport force-enables path containment (GRAPHIFY_RESTRICT_PATHS)
so a network client can't drive graphify_build to extract arbitrary filesystem
paths. HTTP binds 127.0.0.1 by default; if you expose it beyond localhost
(GRAPHIFY_HOST=0.0.0.0), put it behind your own auth / reverse proxy.
Environment variables
Variable | Default | Description |
|
| Project root to extract the graph from |
|
| Output folder name |
|
| CLI path |
|
| CLI timeout (seconds) |
|
| Confine |
|
|
|
|
| Bind host for HTTP transports |
|
| Bind port for HTTP transports |
Tools
CLI-backed (the first two write state; the rest are read-only):
Tool | Purpose |
| Build/update the graph ( |
| Add a source by URL (arXiv, tweet) |
| Natural-language query ( |
| Exact path between two nodes |
| Everything about a node |
graph.json analysis (read-only, no CLI needed, as_json=True for structured output):
Tool | Purpose |
| Call first — size, god nodes, communities, surprises, suggested next steps |
| Most connected nodes |
| Leiden community summaries |
| Unexpected cross-domain connections |
| Node search |
| 1-hop neighbors of a node |
| Token-budgeted BFS subgraph around a node — the cheap way to feed the model just the relevant slice |
| Node metadata: type, source file/line, docstring, community |
| Is the graph stale vs. the current git HEAD? Recommends |
Semantic naming (uses the host model via MCP sampling — no API key — or a backend key):
Tool | Purpose |
| Capability test: reports whether the client supports host-LLM sampling, whether a backend key is set, and which method will be used |
| Give Leiden communities human-readable names. |
Naming communities without an API key (MCP sampling)
The Leiden clustering is keyless, but turning Community 7 into Authentication
needs a model. Three ways, in graphify_label_communities's preference order:
Host-LLM sampling — the server asks the connected client to run the completion via MCP
sampling/createMessage. The model the user already uses (e.g. Claude in a sampling-capable client) does the naming; the server holds no API key. Subject to client support — callgraphify_sampling_statusfirst; it degrades gracefully when unsupported.Backend API key (
method="cli") — setGEMINI_API_KEY/OPENAI_API_KEY/ANTHROPIC_API_KEY/ … (or run a local ollama) and graphify's own backend names them. This option always remains available.Placeholders — no model anywhere: names stay
Community N.
Resources
graphify://report— GRAPH_REPORT.mdgraphify://graph— graph.json (raw)graphify://community/{id}— per-community wiki (members + internal/boundary edges)
Prompts
Reusable templates that orchestrate the tools for the assistant:
onboard— orient to the codebase (overview → communities → subgraphs → surprises → summary)trace_bug(symptom)— find likely root-cause locations through the graphexplain_flow(flow)— end-to-end walkthrough of a named flow with file:line refs
LLM-friendliness
Tool annotations (
readOnlyHint,destructiveHint, titles) tell the model which tools are safe to call freely vs. which mutate state.Server instructions describe the recommended flow (overview → targeted subgraph/query → build update).
as_jsonoutput on every analysis tool returns structured data the model can chain on instead of re-parsing prose.Token budgeting (
graphify_subgraph) keeps context small on large graphs — the core of Graphify's ~71× compression.Host-LLM sampling (
graphify_label_communities) lets the server borrow the client's model via MCPsampling/createMessage, so semantic naming works with no server-side API key — with a capability test (graphify_sampling_status) and a backend-key fallback.
Typical workflow
graphify_overview()— orientationgraphify_communities()— subsystemsgraphify_subgraph("SomeNode")— token-cheap targeted explorationgraphify_query("how does the auth flow work?")— questionsAfter code changes:
graphify_freshness()→graphify_build(".", update=True)
Project layout
graphify-mcp/
├── src/graphify_mcp/ # package (server.py, __init__.py)
├── tests/ # pytest suite + fixture graph.json
├── .github/workflows/ # CI (ruff + pytest, py 3.10–3.12)
├── pyproject.toml # packaging + console script
├── mcp.json # Claude Code example config
└── claude_desktop_config.jsonDevelopment
pip install -e ".[dev]"
ruff check .
pytest -qSee CONTRIBUTING.md. Licensed under MIT.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yasinyaman/graphify-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server