ragsharp-mcp-code-graph
Run the ragsharp MCP JSON-RPC server and issue graph commands (doctor/index/update/query/export) for Codex/agent integrations.Triggers: mcp, json-rpc, code graph, references, index, query, export.
When & Why to Use This Skill
This Claude skill provides a powerful interface for the ragsharp MCP JSON-RPC server, enabling AI agents to perform advanced code graph operations. It facilitates indexing, querying, and exporting code structures, which is essential for building context-aware coding assistants and improving RAG (Retrieval-Augmented Generation) for complex software repositories.
Use Cases
- Deep Codebase Indexing: Automatically generate and maintain a comprehensive graph of code symbols and references to help AI agents navigate large-scale projects.
- Precise Symbol Querying: Retrieve specific function definitions, class hierarchies, and cross-references to provide high-fidelity context for debugging or refactoring tasks.
- Architectural Visualization: Export code relationship data into DOT or GEXF formats to visualize dependencies and analyze system architecture during development.
| name | ragsharp-mcp-code-graph |
|---|---|
| description | | |
| Triggers | mcp, json-rpc, code graph, references, index, query, export. |
Steps
- Start the MCP server:
ragsharp-mcp(reads stdin, writes stdout). - Send JSON-RPC 2.0 requests, e.g.
{"jsonrpc":"2.0","id":1,"method":"doctor","params":{"root":"."}}. - For indexing:
{"jsonrpc":"2.0","id":2,"method":"index","params":{"root":".","db": ".ragsharp/graph/index.db","state": ".ragsharp/graph/state.json"}}. - For querying:
{"jsonrpc":"2.0","id":3,"method":"query","params":{"db": ".ragsharp/graph/index.db","type":"symbols","symbol":"Greeter","edgeKind":null,"limit":50}}. - For export:
{"jsonrpc":"2.0","id":4,"method":"export","params":{"db": ".ragsharp/graph/index.db","format":"dot","output": ".ragsharp/graph/graph.dot"}}.
Expected Results
- Server responds with JSON-RPC 2.0 responses containing
resultorerror. - Indexing returns counts of nodes/edges and writes
.ragsharp/graph/index.dbandstate.json. - Query returns
nodesandedgesmatching filters (type,symbol,kind,document,edgeKind,limit,contextLines). - Export writes DOT or GEXF to the requested path.