Skip to content

Model Context Protocol (MCP) Server Integration

Set up Forge as an MCP server to serve repository context and symbol queries over stdio to any MCP client.

Last updated: 16 Aug 2026Concepts

The Model Context Protocol

The Model Context Protocol (MCP) is an open standard that allows LLMs to query local applications, databases, and filesystem contexts securely. Forge exposes its indexing engine as a standard local MCP server.

Configuring Forge as an MCP Server

Forge supports stdio communication. To connect it to tools like Claude Desktop or Cursor, configure it as an external command in your client settings:

{
  "mcpServers": {
    "forge": {
      "command": "forge",
      "args": ["mcp"]
    }
  }
}

Available MCP Tools

Once connected, Forge registers tools that the model can invoke dynamically:

  • get_optimized_context: Primary ranked/pruned repository context for the session.
  • get_summary: Short repository overview.
  • file_lookup / symbol_lookup / semantic_search: Targeted file and symbol queries.
  • get_dependency_graph: Import relationship scan (not a knowledge-graph builder).