mcp-ast-explorer
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., "@mcp-ast-explorershow signature for process_data in app/utils.py"
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.
mcp-ast-explorer
MCP server for deterministic Python codebase symbol exploration.
mcp-ast-explorer indexes Python source files with LibCST and exposes focused MCP tools for codebase onboarding: definition lookup, function signatures, local references, direct call chains, and simple class hierarchy queries.
Codebase Onboarding Stack
mcp-ast-explorer is the semantic symbol layer in a three-server MCP tool stack for Project 6 wayfinder, a codebase onboarding agent.
mcp-repo-mappermaps repository structure, languages, entry points, framework evidence, and Python dependency edges.mcp-ast-explorerprovides symbol-grounded Python definition, signature, reference, call-chain, and class-hierarchy lookups.mcp-test-runnerruns local pytest/Jest checks and coverage summaries so agent claims can be verified against execution.
In wayfinder, this server feeds entry-point and symbol explanation while refusing to invent missing symbols.
Related MCP server: python-mcp-server
Status
This is a Python-only v1. TypeScript is registered as an unsupported backend placeholder so the server has an explicit extension point, but TypeScript analysis is not implemented yet.
The server does not use an LLM for symbol lookup. If a requested symbol or class is not present in the parsed index, tools return a structured not-found result instead of inventing an answer.
Tools
Tool | Purpose |
| Returns |
| Finds a module, class, function, or method definition. |
| Returns the signature for a function or method symbol. |
| Returns same-module CST name references for an existing symbol. |
| Returns direct callers detected from local references. |
| Returns direct subclasses detected from simple base-class names. |
Supported Scope
Python files parsed by LibCST.
Symbol kinds: modules, classes, functions, and methods.
Same-module reference lookup for simple names.
Direct caller detection from function or method containers.
Direct subclass detection for simple
class Child(Base):inheritance.Structured error responses for unsupported languages and missing symbols.
Current Limitations
Cross-file imports and package-wide resolution are out of scope for v1.
Aliases, star imports, dynamic attribute access, and qualified references are not resolved.
call_chaincurrently returns direct callers only; recursive multi-hop expansion is not implemented.class_hierarchycurrently returns direct subclasses only and handles simple base names.TypeScript is intentionally unsupported in v1.
Local Development
Install dependencies:
uv sync --extra devRun the MCP server:
uv run mcp-ast-explorerRun verification:
uv run ruff check .
uv run mypy
uv run pytestLicense
MIT
Available Tools
6 toolscall_chainD
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| depth | No | ||
| language | No | python | |
| from_symbol | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| error | No | |
| found | Yes | |
| symbol | Yes | |
| callers | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
class_hierarchyD
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| language | No | python | |
| class_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| error | No | |
| found | Yes | |
| class_name | Yes | |
| subclasses | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_definitionD
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| symbol | Yes | ||
| language | No | python |
Output Schema
| Name | Required | Description |
|---|---|---|
| kind | No | |
| name | No | |
| error | No | |
| found | Yes | |
| symbol | Yes | |
| location | No | |
| signature | No | |
| source_code | No | |
| qualified_name | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_referencesD
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| symbol | Yes | ||
| language | No | python |
Output Schema
| Name | Required | Description |
|---|---|---|
| error | No | |
| found | Yes | |
| symbol | Yes | |
| references | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
function_signatureD
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| symbol | Yes | ||
| language | No | python |
Output Schema
| Name | Required | Description |
|---|---|---|
| kind | No | |
| name | No | |
| error | No | |
| found | Yes | |
| symbol | Yes | |
| signature | No | |
| qualified_name | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
healthD
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.2.0- First observed
call_chain - First observed
class_hierarchy - First observed
find_definition - First observed
find_references - First observed
function_signature - First observed
health
TDQS
Scored across 6 tools
Tools have distinct purposes: health for status, find_definition for definitions, find_references for references, function_signature for signatures, call_chain for call chains, and class_hierarchy for class hierarchies. No obvious overlap.
Tool names use mixed patterns: 'health' is a plain noun, while others use 'find_' prefix for some but 'function_signature', 'call_chain', and 'class_hierarchy' follow a noun_noun pattern. Inconsistent naming style.
6 tools are appropriate for an AST explorer, covering essential code navigation features like definition, references, signatures, call chains, and class hierarchy. Not too many or too few.
Covers core code analysis operations but missing common features like finding implementations, listing symbols, or syntax tree queries. Gaps exist but basic workflows are supported.
Maintenance
Related MCP Connectors
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
AI-powered codebase analysis — call graphs, security, dead code, complexity. 150+ tools.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides tools for Python code navigation, analysis, and refactoring, including finding definitions, references, and symbol lists. It enables automated tasks such as renaming symbols and organizing imports to enhance AI-driven development.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables deterministic static analysis of Python code, providing tools to inspect classes, functions, imports, dependencies, and more, without executing the code.1MIT
- AlicenseAqualityCmaintenanceProvides structural, queryable understanding of a Python codebase via MCP tools, enabling direct lookups for callers, dependencies, and class hierarchies without repeated grep/read cycles.6Apache 2.0
- AlicenseAqualityBmaintenanceProvides deep structural analysis of Python source code via AST, including function signatures, call graphs, cyclomatic complexity, code smells, dead code detection, and protocol conformance.20MIT