Stacklit
One command gives AI agents instant codebase context. ~250 tokens replaces 50,000+ tokens of exploration. Auto-configures Claude Code, Cursor, Aider.
What is Stacklit?
Stacklit is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to one command gives ai agents instant codebase context. ~250 tokens replaces 50,000+ tokens of exploration. auto-configures claude code, cursor, aider.
One command gives AI agents instant codebase context. ~250 tokens replaces 50,000+ tokens of exploration. Auto-configures Claude Code, Cursor, Aider.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- One command gives AI agents instant codebase context. ~250 t
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx stacklitConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Stacklit
Stacklit is a codebase-indexing MCP server that distils an entire project into roughly 250 tokens of structured context, replacing tens of thousands of tokens that an AI agent would otherwise spend exploring files. It exposes seven MCP tools — including get_overview, find_module, get_dependencies, and get_hot_files — that let Claude Code, Cursor, and Aider instantly navigate large repositories without re-reading them on every session. One command both generates the index and auto-configures the MCP server in your preferred AI coding environment.
Prerequisites
- Node.js 18+ (for npx usage) or Go toolchain (for source installation)
- A codebase you want to index (any language)
- An MCP-compatible client: Claude Code, Cursor, or Aider
- Optional: Claude API credentials if you use the --summary flag for AI-generated descriptions
Install Stacklit
Install globally via npm, run via npx without installing, or build from source with Go.
npm install -g stacklit
# or run without installing:
npx stacklit initInitialise the index in your project
Run 'stacklit init' from the project root. It scans the codebase, generates a structured index file, and opens an interactive HTML dependency map in your browser.
cd /path/to/your/project
stacklit initAuto-configure your AI client
Run 'stacklit setup' to automatically write the MCP server configuration into Claude Code, Cursor, or Aider. Pass the client name as an argument.
stacklit setup claude # for Claude Code
stacklit setup cursor # for CursorInject a compact map into CLAUDE.md
Optionally inject a ~250-token navigation summary into your CLAUDE.md so the context is available on every Claude Code session without invoking the MCP tools explicitly.
stacklit derive --inject claudeKeep the index fresh with a git hook
Install a post-commit hook so Stacklit automatically regenerates the index after every commit, keeping the context current.
stacklit init --hookStacklit Examples
Client configuration
Claude Code MCP configuration for Stacklit after running 'stacklit setup claude'. The server binary is launched via npx.
{
"mcpServers": {
"stacklit": {
"command": "npx",
"args": ["stacklit", "serve"],
"env": {}
}
}
}Prompts to try
Example prompts that use Stacklit's MCP tools to navigate a codebase efficiently.
- "Give me an overview of this codebase — what are the main modules and how do they relate?"
- "Find the module responsible for authentication and list its dependencies"
- "Which files are changed most frequently (hot files) in this project?"
- "What modules does the billing service depend on, and what depends on it?"Troubleshooting Stacklit
'stacklit' command not found after npm install
Ensure your npm global bin directory is in your PATH. Run 'npm bin -g' to find the path and add it to your shell profile, or use 'npx stacklit' as an alternative.
MCP tools return stale information after code changes
Run 'stacklit diff' to check if the index is out of date, then 'stacklit generate' to rebuild it. For automatic updates, install the git hook with 'stacklit init --hook'.
stacklit setup does not detect the Claude Code config path
Manually add the MCP server block to ~/.claude/settings.json or the project-level .claude/settings.json, using 'npx stacklit serve' as the command.
Frequently Asked Questions about Stacklit
What is Stacklit?
Stacklit is a Model Context Protocol (MCP) server that one command gives ai agents instant codebase context. ~250 tokens replaces 50,000+ tokens of exploration. auto-configures claude code, cursor, aider. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Stacklit?
Follow the installation instructions on the Stacklit GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Stacklit?
Stacklit works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Stacklit free to use?
Yes, Stacklit is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Stacklit Alternatives — Similar Developer Tools Servers
Looking for alternatives to Stacklit? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Stacklit in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Stacklit?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.