DOCS/FEATURES/MCP

mcp

Model Context Protocol (MCP)

Andromity features native support for the Model Context Protocol (MCP), allowing your AI agent to interact with external databases, APIs, search engines, and local developer systems.


Smart Lazy-Loading

A common limitation of AI agents with 50+ connected tools is context window bloating. Injecting full JSON schemas for every tool wastes tokens and causes LLM confusion.

Andromity addresses this with Smart Lazy-Loading:

  1. Schema Indexing: On startup, Andromity indexes your configured MCP servers and caches simple, compact summaries of what each server's tools do.
  2. On-Demand Loading: Full tool schemas are only injected into the active prompt context if the LLM explicitly requests information about that tool or displays intent to call it.
  3. Efficiency: Reduces tool-related token overhead by up to 85%, preserving context space for actual code files.

Configuring MCP Servers

You can manage MCP servers via .andromity/mcp.json (global) or a project-specific .vscode/mcp.json or mcp.json in your repository.

Example configuration:

JSON
{
  "mcpServers": {
    "sqlite-db": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-sqlite", "--db", "project.db"]
    },
    "github-api": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "github_pat_..."
      }
    }
  }
}

Listing and Inspecting Tools

Run the /mcp command in the TUI to view loaded servers, verify connection states, and check available tool names.