ast-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AST_MCP_DIR | No | The absolute path to the ast-mcp-server directory containing the built dist/index.js entrypoint. Used when registering the server with Claude Code. | |
| HERMES_HOME | No | The home directory used for Hermes Agent skills installation. Defaults to ~/.hermes. | |
| CLAUDE_CONFIG_DIR | No | The configuration directory used for Claude Code skills installation. Defaults to ~/.claude. | |
| AST_TOOL_STATE_DIR | No | Optional directory path used to isolate the CLI plan state directory. Defaults to ${XDG_STATE_HOME:-~/.local/state}/ast-tool/plans. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ast_list_filesA | Lists source files included by the project's tsconfig in deterministic, project-relative, paginated form. |
| ast_get_outlineA | Returns body-free declaration signatures for one TypeScript/JavaScript file. Detailed symbol metadata is opt-in because it duplicates signature text. |
| ast_get_symbol_sourceA | Returns exactly one declaration or implementation with its project-relative location, not the complete file. |
| ast_search_symbolsA | Searches declarations structurally and returns exact file/symbol selectors that can be passed to the other AST tools. |
| ast_find_referencesA | Finds type-resolved references and returns bounded project-relative locations, including declaration impact by default. |
| ast_get_diagnosticsA | Returns bounded normalized TypeScript diagnostics for a project or one source file. Existing errors are preserved as evidence for write-operation delta checks. |
| ast_rename_symbolA | Prepares an exact hash-bound rename plan without writing. Review the preview and apply its operation_id with ast_apply_operation. |
| ast_replace_symbol_bodyA | Prepares a hash-bound body replacement while preserving the signature. Supports declarations, methods, accessors and function-valued variables/properties. |
| ast_get_operation_previewB | Retrieves exact unified diffs retained for a prepared operation, optionally one affected file at a time. |
| ast_apply_operationA | Applies exactly the reviewed plan after verifying its plan hash and the complete TypeScript workspace fingerprint. Conflicts abort before writes; retries after success are idempotent. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Tools are mostly well-distinguished by action (list, search, rename, replace, preview, apply). However, ast_get_outline and ast_get_symbol_source both return source content and could be confused about which returns signatures vs. full declarations, and ast_rename_symbol vs ast_replace_symbol_body are similar in nature though the descriptions help separate them.
All names follow the ast_verb_noun pattern consistently. The verb styles are clear (get, list, search, find, replace, apply). Minor deviation: ast_find_references uses 'find' while others use 'get' and 'search', a small inconsistency but not confusing.
Ten tools is well-scoped for an AST manipulation server. Each tool serves a distinct phase in the workflow (explore, plan, preview, apply), and none feel redundant or superfluous.
The set covers read operations (list, outline, symbol source, search, references, diagnostics), write-planning (rename, replace body), preview, and apply. The lifecycle is coherent, though there's no tool for creating new files or adding symbols—editing is limited to renaming and body replacement.