How They Use AI  |  Newest

<< Home  |  Tech

40-60% fewer tokens used per session

AreaTech
AI usedClaude Code
Sourcer/mcp
Posted2026-03-14

The move

Use an MCP server to provide a structured graph of your codebase instead of relying on grep.

Steps

  1. Install the code-graph-mcp server via the provided GitHub repository.
  2. Configure your AI editor or Claude Code to connect to the MCP server.
  3. Allow the server to index your codebase into the SQLite graph.
  4. Query the graph for function callers or architecture overviews instead of grepping files.

Prompt for your AI

Analyze the codebase using the code-graph-mcp tool to identify all callers of [function_name] and list the files that would be affected by a change.

What happened

The developer was frustrated by Claude Code's inefficient process of grepping files to understand code relationships. They built an MCP server that uses Tree-sitter to index functions and classes into a SQLite graph. This allows the AI to query the codebase structure directly, reducing token usage and improving accuracy.

Watch out

Performance on massive monorepos is untested. The tool requires initial indexing time for the codebase.

Give it to your agent

Read https://howtheyuse.ai/p/40-60-fewer-tokens-used-per-session.md and help me do this.

Sources



Last updated November 26, 2026.