Skip to main content
Glama
symbiont
by DRNZY

symbiont-mcp

AST-aware code navigation, refactoring engine, and architectural rule checker for the Model Context Protocol (MCP).

Features

  • AST file outlines (get_file_outline): inspect functions, classes, methods, interfaces, types, and variables with line ranges and type signatures.

  • Symbol tracing (find_all_usages): resolve definitions, call sites, imports, and type references across codebases using TypeScript compiler bindings.

  • AST renaming (rename_symbol): rename symbols across referencing files with unified diff generation and dry-run support.

  • Architectural invariant checking (check_architecture_rules): validate import boundaries and return-type contracts against .symbiontrc.yaml.

  • Dependency graph generation (get_dependency_graph): map module import trees and detect circular dependency cycles.

Related MCP server: Synapse

Installation

git clone https://github.com/DRNZY/symbiont-mcp.git
cd symbiont-mcp
npm install
npm run build

MCP configuration

Add to your MCP configuration file (mcp_config.json or client settings):

{
  "mcpServers": {
    "symbiont": {
      "command": "node",
      "args": ["/path/to/symbiont-mcp/dist/index.js"]
    }
  }
}

Tools reference

  • get_file_outline: filePath: string, workspaceRoot?: string

  • find_all_usages: symbolName: string, entryFile?: string, workspaceRoot?: string

  • rename_symbol: oldName: string, newName: string, targetFile: string, line?: number, dryRun?: boolean, workspaceRoot?: string

  • check_architecture_rules: configPath?: string, workspaceRoot?: string

  • get_dependency_graph: workspaceRoot?: string

  • set_workspace_root: workspaceRoot: string

Configuration (.symbiontrc.yaml)

rules:
  - id: no-db-in-ui
    from: "src/components/**"
    disallow_imports:
      - "src/server/db/**"
      - "drizzle-orm"
      - "@prisma/client"
    message: "UI components must not import directly from the database layer."
    severity: error

  - id: enforce-zod-actions
    files: "src/actions/**"
    require_named_export_type: "z.infer<*>"
    message: "Server actions must return a z.infer typed result."
    severity: warning

  - id: disallow-cycles
    files: "src/**"
    disallow_circular_dependencies: true
    message: "Circular dependency detected."
    severity: error

CLI usage

# Check architecture rules
symbiont-mcp check [.symbiontrc.yaml]

# Inspect symbol outline
symbiont-mcp outline src/components/Button.tsx

# Trace usages
symbiont-mcp usages calculateTotal

# View dependency graph
symbiont-mcp graph

Testing

npm test

License

MIT

Available Tools

6 tools
check_architecture_rulesA

Evaluates the dependency graph against declarative architectural rules (.symbiontrc.yaml) and returns actionable boundary violations.

Inputs: configPath, workspaceRoot.

find_all_usagesA

Performs deterministic AST traversal to return every exact reference, import, definition, and call-site across the codebase.

Inputs: symbolName (required), entryFile, workspaceRoot.

get_dependency_graphA

Builds a module dependency graph, tracking direct imports, dependents, and circular dependency cycles.

Inputs: workspaceRoot.

get_file_outlineA

Returns high-level symbol declarations (functions, classes, interfaces, types, enums, variables) with line ranges and signatures without dumping raw file bodies.

Inputs: filePath (required), workspaceRoot.

rename_symbolA

Applies syntactically safe, AST-level renames across all consumers and returns unified diffs.

Inputs: newName (required), oldName (required), targetFile (required), line, +2 more.

set_workspace_rootA

Sets or re-indexes the active project workspace root directory.

Inputs: workspaceRoot (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool addresses a clearly distinct concern: per-file symbol outlines, module dependency graphs, exact usages, refactoring, architecture rule validation, and workspace management. Related tools like get_dependency_graph and check_architecture_rules are separated by build vs. evaluate, preventing confusion.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_object pattern (get_file_outline, rename_symbol, set_workspace_root, etc.). There are no vague verbs or mixed casing conventions.

    Tool Count5/5

    Six tools is well-scoped for a code intelligence and refactoring server. Each tool earns its place and covers a distinct phase without redundancy.

    Completeness4/5

    The set covers the core lifecycle: workspace setup, navigation, dependency analysis, usage discovery, renaming, and architecture validation. Minor conveniences like a get_workspace_root or deeper symbol-detail lookup are absent, but they are not required for the main workflows.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables parsing, indexing, and querying source code as structured knowledge, providing code exploration, spec generation, and migration tools via 20 MCP tools.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides structural code intelligence via 26 MCP tools, enabling AI assistants to query code symbols, dependencies, and call graphs accurately without file-pasting.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides code intelligence by indexing source code into SQLite and offering MCP tools for symbol search, flow tracing, and context retrieval to assist with code navigation and understanding.
      -