code-tree-mcp
Provides tools to index and query symbols and dependencies in JavaScript codebases.
Provides tools to index and query symbols and dependencies in Python codebases.
Provides tools to index and query symbols and dependencies in TypeScript codebases.
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., "@code-tree-mcp index my codebase at /home/user/project"
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.
code-tree-mcp
An MCP server in Node.js + TypeScript that indexes source code into a local code-tree database for:
JavaScript / TypeScript
Java
Python
The server stores symbols and dependencies per file and exposes MCP tools to query the indexed tree.
Features
Incremental indexing based on file modification time
Local persisted database in
.code-tree/code-tree.dbSymbol extraction for classes, interfaces, types, functions, and methods (language-dependent)
Dependency extraction for imports/requires/packages
MCP tools for indexing, listing tree data, symbol search, and dependency queries
Related MCP server: @codesift/mcp
Install
npm installBuild
npm run buildRun
npm run startFor development:
npm run devMCP Tools
The server exposes these tools:
index_codebaseInputs:
workspacePath(required, absolute path)forceReindex(optional boolean)
get_code_treeInputs:
workspacePath(required)pathPrefix(optional, workspace-relative prefix)limit(optional)
get_file_symbolsInputs:
workspacePath(required)filePath(required, workspace-relative)
search_symbolsInputs:
workspacePath(required)query(required)language(optional:javascript,typescript,java,python)nodeType(optional:module,class,interface,type,function,method)limit(optional)
get_dependenciesInputs:
workspacePath(required)filePath(optional)dependency(optional)limit(optional)
Example MCP Server Configuration
Use your MCP client configuration format to register:
{
"mcpServers": {
"code-tree": {
"command": "node",
"args": ["/absolute/path/to/code-tree-mcp/dist/index.js"]
}
}
}During active development, you can point to TS entry via tsx:
{
"mcpServers": {
"code-tree": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/code-tree-mcp/src/index.ts"]
}
}
}Notes
This implementation uses robust regex-based parsing for broad compatibility.
For deeper AST-level semantic analysis, the parser layer can be upgraded per language.
Available Tools
7 toolsget_code_treeC
Get indexed files with symbol and dependency counts across one or more workspaces.
Inputs: limit, offset, pathPrefix, ignoreGlobs, +2 more.
get_dependenciesC
Get indexed dependencies across one or more workspaces.
Inputs: limit, offset, filePath, dependency, +3 more.
get_file_symbolsB
Get all indexed symbols for a specific file. Searches across all provided workspaces.
Inputs: filePath (required), ignoreGlobs, workspacePath, workspacePaths.
get_index_statusB
Get index status summary (file/symbol/dependency counts and last indexed time).
Inputs: ignoreGlobs, workspacePath, workspacePaths.
get_referencesC
Find files that reference a dependency/module name.
Inputs: dependency (required), limit, offset, ignoreGlobs, +2 more.
index_codebaseC
Scan and index JavaScript/TypeScript, Java, and Python files. Accepts one or more workspace paths.
Inputs: ignoreGlobs, forceReindex, workspacePath, workspacePaths.
search_symbolsC
Search symbols by name/signature with optional language and node type filters across one or more workspaces.
Inputs: query (required), limit, offset, language, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct aspect of codebase analysis: tree structure, dependencies, file symbols, index status, references, indexing, and symbol search. There is no functional overlap.
All tools follow a consistent verb_noun pattern in snake_case (get_*, index_*, search_*), making the set predictable and easy to navigate.
Seven tools is well-scoped for the domain of code indexing and querying. Each tool serves a clear purpose without excess or deficiency.
The set covers all fundamental operations: indexing, status, and various retrievals (tree, dependencies, symbols, references, search). A minor gap is the lack of an explicit tool to delete or reset the index, but this is not critical for typical usage.
Maintenance
Related MCP Connectors
Repository knowledge graph MCP server for codebase understanding and debugging.
An MCP server that provides tools to discover and retrieve podcast episodes transcripts.
An MCP server that gives your AI access to the source code and docs of all public github repos
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that indexes local Python projects into a SQLite database to enable efficient symbol searching and dependency tracking. It allows users to find function or class definitions, trace module imports, and read file contents through natural language interfaces.-
- AlicenseNot gradedqualityDmaintenanceMCP server for local-first lexical code search, providing tools for searching code, finding symbols, and reading chunks from indexed repositories.MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for semantic code search and dependency graph analysis. Indexes codebases into a knowledge graph with vector embeddings for AI-powered code understanding.-
- AlicenseNot gradedqualityDmaintenanceMCP server that builds a deterministic, source-traceable knowledge index of any codebase, enabling glossary lookup, code graphs, and exact-token search with every fact linked to its source file and line.1MIT