G
Graphify
graphify.homes
MCP code graph

MCP codebase knowledge graph for AI coding assistants

An MCP codebase knowledge graph exposes repository relationships as tools that an AI assistant can query. Graphify can serve its graph through MCP so agents can search nodes, follow paths, explain connections, and retrieve project context with repeatable calls instead of broad file scans.

Published Updated

Graphify outputs
graph.html
graph.json
GRAPH_REPORT.md

Graphify stores inspectable artifacts so codebase knowledge can be reviewed by humans and reused by AI coding assistants.

A central knowledge graph connected to multiple AI assistant terminals through standard ports

Protocol

MCP

A standard way for an AI host to discover and invoke external tools.

Knowledge

Graph

Nodes and edges describe project structure, documentation, and relationships.

Result

Repeatable queries

The assistant can ask for a path or explanation instead of guessing which files to read.

What is an MCP codebase knowledge graph?

It is a code knowledge graph exposed through Model Context Protocol tools. The graph stores project relationships; MCP gives an AI assistant a structured way to discover and call queries against that graph.

  • MCP defines the tool interface between the assistant and graph server.
  • The graph defines the project nodes, edges, and context available to those tools.
  • The assistant decides when to call a tool and how to interpret its result.

Why use MCP instead of giving the agent graph.json directly?

Direct file access works for small and straightforward queries. MCP becomes useful when the assistant needs repeatable operations such as path lookup, node explanation, search, or context assembly without loading and interpreting the entire graph file.

  • Tool calls return a narrower result than reading the whole graph.
  • The server can validate arguments and expose a stable operation set.
  • Different assistants can use the same graph interface.

Which repository questions can MCP tools answer?

Useful tool calls include finding a node, tracing a path between symbols, explaining a connection, listing community members, and retrieving source evidence. The exact tool set depends on the Graphify version and server configuration.

  • Navigation: locate files, symbols, or concepts.
  • Traversal: follow imports, calls, references, or document links.
  • Explanation: return the evidence behind a relationship.
  • Review: assemble a compact architectural context for a change.

How do you expose a Graphify project over MCP?

Build the graph for the project, then start the Graphify MCP server with the documented --mcp option or use the hosted MCP connection if your product plan provides it. Register the server in the AI client and restart the session.

  • Confirm the graph belongs to the current repository snapshot.
  • Use local stdio for self-managed projects unless a hosted endpoint is required.
  • Restart the coding assistant after changing MCP configuration.

What are the security considerations?

Treat an MCP graph server as access to repository structure. Limit which projects it can read, keep secrets out of generated artifacts, review remote endpoints, and require approval before the agent runs high-impact repository tools.

  • Prefer local, read-only graph access for sensitive repositories.
  • Do not commit generated caches containing private paths or source excerpts.
  • Review hosted MCP authentication and data retention terms before connecting.

How should AGENTS.md describe MCP graph usage?

Tell the agent which graph tool to use for architecture questions, when to fall back to source inspection, and how to handle inferred edges. The instruction should be short because MCP tool descriptions already define available operations.

  • Name the graph and the repository it represents.
  • Require source verification for modified code.
  • Tell the agent to refresh the graph after major changes.
Working commands

How do the setup commands fit together?

Start the documented local MCP mode

Shell
graphify ./project --mcp

Add a concise MCP policy to AGENTS.md

Markdown
## Code graph
- Use the Graphify MCP tools for dependency, call-path, and architecture questions.
- Open the cited source file before editing.
- Verify INFERRED or AMBIGUOUS edges.
FAQ

Frequently asked questions

Does MCP replace a normal code search tool?

No. Exact string search remains useful. MCP graph tools complement search with relationship-aware queries.

Can multiple assistants use one graph?

Yes. A local or hosted MCP server can expose the same graph to different clients, provided each client supports MCP.

Does Graphify require MCP?

No. Graphify can write graph artifacts and support skill or CLI queries. MCP is an optional interface for assistants that need structured graph tools.

Should the MCP server have write access to the repository?

Graph querying normally needs read-only access. Keep write operations separate and require explicit approval for any tool that can modify project files or remote systems.

Key takeaways

What should you remember?

  • MCP exposes graph relationships as repeatable assistant tools.
  • Use local, read-only graph access by default and keep secrets out of artifacts.
  • Pair MCP tools with concise AGENTS.md rules and source verification.
Sources

Where can you verify the details?

Related Graphify guides

Continue through the Graphify topic cluster with pages that explain assistant context, architecture review, documentation, and graph-based codebase understanding.

Turn this concept into a real project graph

Start from the use cases page or upload a project ZIP to build a graph that your team can inspect and reuse.