@aiready/ast-mcp-server
AST-aware TypeScript/JavaScript codebase exploration for AI agents, providing high-precision symbol resolution, reference finding, and structural analysis via MCP tools.
README
@aiready/ast-mcp-server
Best-in-Class TypeScript/JavaScript Codebase Exploration for AI Agents.
This Model Context Protocol (MCP) server provides high-precision, AST-aware tools for navigating complex codebases. Unlike standard search tools, it understands imports, exports, types, and references.
🚀 Key Features
- Hybrid Indexing: Combines
ripgrepspeed withts-morphprecision. Only loads relevant files into memory to handle massive monorepos. - O(1) Symbol Resolution: Instantly find where any function, class, or type is defined using a pre-built disk cache.
- Surgical Reference Finding: Uses a two-stage lookup (Regex + AST) to find every usage of a symbol across the project without OOM crashes.
- Monorepo Intelligent: Automatically discovers
tsconfig.jsonboundaries and respects TypeScript project references. - Zero Configuration: Bundles the
ripgrepbinary and handles all TypeScript parsing out-of-the-box. - Path Security: Hardened against path traversal and malicious agent inputs.
🛠 Tools Provided
| Tool | Purpose |
|---|---|
resolve_definition |
Find where a symbol is defined (file, line, signature, JSDoc). |
find_references |
Find all usages of a symbol across the project (paged). |
find_implementations |
Find concrete classes implementing an interface/abstract class. |
get_file_structure |
Return a structural tree of a file (classes, methods, enums). |
search_code |
Blazingly fast regex search via bundled ripgrep. |
get_symbol_docs |
Extract full JSDoc/TSDoc metadata for any symbol. |
get_call_hierarchy |
Find callers and callees for a symbol (incoming/outgoing). |
build_symbol_index |
Warm the disk cache for a project (highly recommended). |
📦 Installation
npx -y @aiready/ast-mcp-server
⚙️ Configuration
Environment Variables
AST_WORKSPACE_ROOT: Path to the root of the allowed workspace (default:cwd).AST_MAX_HEAP_MB: Max memory allowed for AST Projects (default:1536).AST_WORKER_POOL_SIZE: Number of worker threads for parsing (default:2).
Agent Configuration (Cursor/Claude Desktop)
{
"mcpServers": {
"ast-explorer": {
"command": "npx",
"args": ["-y", "@aiready/ast-mcp-server"],
"env": {
"AST_WORKSPACE_ROOT": "/path/to/your/project"
}
}
}
}
🛡 Security
All tool arguments are strictly validated. Any attempt by an agent to access files outside the AST_WORKSPACE_ROOT will result in a hard rejection.
📄 License
MIT © AIReady
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.