Skip to content

Commit f63549b

Browse files
authored
docs: add MCP server install instructions for Claude Code and Desktop (#70)
The MCP Server Mode section documented the CLI usage but not how to actually wire it into an MCP client. Add copy-pasteable JSON config for Claude Code (.mcp.json) and Claude Desktop, plus a tools reference table.
1 parent 7ddb7c9 commit f63549b

1 file changed

Lines changed: 58 additions & 1 deletion

File tree

README.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ This isn't metaphorical. Mache literally treats both sides as graphs and uses SQ
7777
- [Feature Matrix](#feature-matrix)
7878
- [Quick Start](#quick-start)
7979
- [Usage](#usage)
80+
- [MCP Server Mode](#mcp-server-mode)
8081
- [Example: NVD Vulnerability Database](#example-nvd-vulnerability-database)
8182
- [Example: Projecting JSON Data](#example-projecting-json-data)
8283
- [Example: Projecting Source Code](#example-projecting-source-code)
@@ -152,7 +153,7 @@ task test
152153

153154
### MCP Server Mode
154155

155-
`mache serve` exposes any mache graph as an [MCP](https://modelcontextprotocol.io/) server over stdio, usable by Claude Code, Claude Desktop, Cursor, or any MCP client:
156+
`mache serve` exposes any mache graph as an [MCP](https://modelcontextprotocol.io/) server over stdio, usable by Claude Code, Claude Desktop, Cursor, or any MCP client.
156157

157158
```bash
158159
# Serve source code as MCP tools
@@ -167,6 +168,62 @@ mache serve -s examples/mcp-registry-schema.json mcp-registry.db
167168

168169
Six tools are exposed: `list_directory`, `read_file`, `find_callers`, `find_callees`, `search`, and `get_communities` (Louvain cluster detection). No filesystem mount needed — the graph is queried directly over JSON-RPC.
169170

171+
#### Installing in Claude Code
172+
173+
Add to your project's `.mcp.json` (or `~/.claude/settings.json` for global access):
174+
175+
```json
176+
{
177+
"mcpServers": {
178+
"mache": {
179+
"command": "/path/to/mache",
180+
"args": ["serve", "-s", "/path/to/schema.json", "/path/to/data"]
181+
}
182+
}
183+
}
184+
```
185+
186+
Example — serve your own Go codebase to Claude Code:
187+
188+
```json
189+
{
190+
"mcpServers": {
191+
"my-project": {
192+
"command": "/path/to/mache",
193+
"args": ["serve", "-s", "examples/go-schema.json", "./src"]
194+
}
195+
}
196+
}
197+
```
198+
199+
#### Installing in Claude Desktop
200+
201+
Add to your `claude_desktop_config.json`:
202+
203+
```json
204+
{
205+
"mcpServers": {
206+
"mache": {
207+
"command": "/path/to/mache",
208+
"args": ["serve", "-s", "/path/to/schema.json", "/path/to/data"]
209+
}
210+
}
211+
}
212+
```
213+
214+
#### Available MCP Tools
215+
216+
| Tool | Description |
217+
|------|-------------|
218+
| `list_directory` | List children of a directory node (empty path for root) |
219+
| `read_file` | Read text content of a file node |
220+
| `find_callers` | Find all nodes referencing a given symbol or token |
221+
| `find_callees` | Find all symbols called by a given construct |
222+
| `search` | Search for symbols matching a SQL LIKE pattern (e.g., `%auth%`) |
223+
| `get_communities` | Detect clusters of densely co-referencing nodes (Louvain modularity) |
224+
225+
`search` and `get_communities` are conditionally available depending on backend support (both available for SQLite and MemoryStore with refs).
226+
170227
### Using with LLMs and Agents
171228

172229
Mache mounts as a **standard POSIX filesystem** — no special tooling required. LLMs can use normal file operations.

0 commit comments

Comments
 (0)