slimread
Click on "Deploy 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., "@slimreadoutline auth/service.ts, then read AuthService.login"
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.
slimread
Read code by symbol, not by file. An MCP server that lets coding agents (Claude Code, Codex, Cursor and others) read just the function they need instead of the whole file, which cuts the tokens they spend on reading code.
Without slimread: the agent reads auth/service.ts → ~20,000 tokens
With slimread: outline("auth/service.ts") → ~400 tokens
read_symbol(..., "AuthService.login") → ~500 tokensOn real projects, reading a large file this way typically costs 85–95% fewer tokens. Run npx slimread stats to see the numbers for your own code.
Install
npx slimread installThis detects the agents you have, asks which ones to set up, and for each one:
Registers the server in that agent's own config.
Adds a 3-line note to its rules file telling it to outline large files before reading them.
You only do this once. After that you don't run anything: your agent starts slimread in the background when a session begins and stops it when the session ends.
Agent | Server config | Rules note |
Claude Code |
|
|
Codex |
|
|
Cursor |
|
|
By default the setup applies to the current project, and those files can be committed so your whole team gets it. Use --global to set it up for all your projects instead.
npx slimread install --claude --cursor # choose agents instead of being asked
npx slimread install --global # all projects
npx slimread install --dry-run # show what would change, write nothing
npx slimread install --no-rules # only register the server
npx slimread uninstall # remove exactly what install addedInstall is safe to re-run, and uninstall leaves your own content in those files untouched.
Other agents, or manual setup
Any MCP client can run it. The server command is:
{ "command": "npx", "args": ["-y", "slimread"] }On Windows, use "command": "cmd", "args": ["/c", "npx", "-y", "slimread"].
The server works on the folder it is started in. To point it at another folder, add "--root", "/path/to/project" to the args or set SLIMREAD_ROOT.
Related MCP server: astllm-mcp
What the agent gets
Four read-only tools:
Tool | What it returns |
| The classes, functions and methods in a file, with signatures and line ranges. For a folder, the top-level symbols of every file. |
| The exact source of one symbol, with line numbers. Accepts |
| Where a symbol is defined anywhere in the project. |
| Every line that mentions a name, e.g. to find callers before changing a function. |
Example outline output:
auth/service.ts (1812 lines, typescript)
export class AuthService L12-640
constructor(db: Database) L20-31
method async login(user: string, pw: string): Promise<Session> L40-88
method async refresh(token: string) L90-131
...
function hashPassword(pw: string): string L642-660Languages
Python, JavaScript, TypeScript (and JSX/TSX), Go, Rust, Java, C#, C, C++, Ruby, PHP, Kotlin and Swift.
For other file types (Markdown, JSON, YAML, CSS...), agents keep reading them directly, which is usually the right choice anyway.
How it works
Files are parsed with tree-sitter (bundled as WebAssembly, so nothing to compile and no language servers to install).
There's no index. Files are parsed when asked about (milliseconds each) and cached until they change, so results are never out of date.
.gitignoreis respected, andnode_modules, build output and similar folders are skipped.Everything runs locally: it makes no network calls, and it never writes or modifies files.
When it helps (and when it doesn't)
Helps most: large files (300+ lines) and agents without their own code index, i.e. Claude Code and Codex.
Helps less: Cursor already has semantic search over your codebase. There, slimread adds exact symbol reads and outlines, but the savings are smaller.
Small projects: if your files are short, agents can read them whole;
npx slimread statswill tell you.find_referencesmatches by name, so different symbols with the same name both show up.The rules note encourages the agent to use slimread, but it can't force it to.
Development
git clone https://github.com/Fahad-Sajeem/slimread.git && cd slimread
npm install
npm test
node bin/slimread.js stats /path/to/any/project
node bin/slimread.js install --local # point your agents at this checkoutTo add a language, add its file extensions and syntax node types to src/languages.js, add a sample file to test/fixtures, and add the expected symbols to test/symbols.test.js. node scripts/probe.js <file> prints the syntax node types of any file.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
MCP server for AI agent profiles and smart notes. 60+ coding prompt packs with expert personas.
MCP server for agentverse documentation, generated by doc2mcp.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for semantic code search & navigation that helps AI agents work efficiently without burning through costly tokens. Instead of reading entire files, agents can search conceptually and jump directly to the specific functions, classes, and code chunks they need.119MIT
- FlicenseNot gradedqualityCmaintenanceAn MCP server for efficient code indexing and symbol retrieval using tree-sitter AST parsing to fetch specific functions or classes without loading entire files. It significantly reduces AI token costs by providing O(1) byte-offset access to code components across multiple programming languages.-
- AlicenseCqualityAmaintenanceAn MCP server that provides structural codebase indexing and surgical query tools to drastically reduce token usage through symbol-level searches and transitive impact analysis. It supports multiple languages and integrates with git to help AI agents understand code dependencies and the impact of changes in sub-millisecond time.69831 PyPI1,163MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides structure-aware code analysis (symbol trees, dependencies, docs) to reduce AI agent token consumption by up to 99%, along with Git commit intelligence.MIT