Stacklit

v1.0.0Developer Toolsstable

One command gives AI agents instant codebase context. ~250 tokens replaces 50,000+ tokens of exploration. Auto-configures Claude Code, Cursor, Aider.

aiai-agentsai-codingclaudeclaude-code
Share:
81
Stars
0
Downloads
0
Weekly
0/5

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

Instant codebase context generation
Token-efficient code analysis
Auto-configuration for Claude Code and Cursor
glincker

Maintainer

LicenseMIT
Languagego
Versionv1.0.0
UpdatedMay 16, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx stacklit

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 init
2

Initialise 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 init
3

Auto-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 Cursor
4

Inject 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 claude
5

Keep 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 --hook

Stacklit 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.

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.

Quick Config Preview

{ "mcpServers": { "stacklit": { "command": "npx", "args": ["-y", "stacklit"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides