Connect to Orbit Local via MCP

Not yet available. Orbit Local cannot run as an MCP server yet. The orbit mcp serve and glab orbit local mcp serve commands do not exist in any released version of the Orbit CLI. The configuration examples below describe the planned interface, not a feature you can use today. If you add this MCP config to your agent, it will fail silently: the server never starts and the agent cannot query anything.

Until the MCP server ships, use the workaround below. Track progress in merge request !1377.

When it ships, Orbit Local will run as a stateless MCP server over stdio, pointed at the local DuckDB graph instead of a GitLab instance. Unlike Orbit Remote (which exposes a JSON query DSL), Orbit Local speaks raw DuckDB SQL - agents compose SQL directly against the property graph tables.

Prerequisites

  • The Orbit CLI (orbit) is installed. See Use the Orbit CLI directly.
  • A local repository has been indexed (orbit index <path> or glab orbit local index <path>).

Workaround: query from the terminal

Until the MCP server ships, query your local graph directly from a terminal with glab orbit local. This is the supported way to use Orbit Local today.

Run a raw read-only SQL query against the local DuckDB graph:

glab orbit local sql "SELECT name, definition_type FROM gl_definition LIMIT 10"

Describe the graph schema (table names, columns, and data types). Add --raw for JSON instead of the default table view:

glab orbit local schema

You can paste the output of these commands into your AI agent as context. You can also install the Orbit skill manually today to give the agent query recipes, SQL guidance, and troubleshooting.

Planned interface

Everything in this section describes the planned MCP server. None of these commands or config blocks work yet. They are preserved here as the specification for the contributor who implements the feature, and so you can see what is coming.

Planned MCP tools

ToolDescription
run_sqlExecute a read-only SQL query against the local DuckDB graph. Returns JSON rows.
get_graph_schemaFetch the schema: table names, columns, and data types present in the local DuckDB.
indexIndex a repository (or a directory of repositories) into the local graph.

Planned config: Claude Code

The planned interface will let you add the following to ~/.claude/mcp_servers.json or your project’s .claude/mcp_servers.json:

{
  "mcpServers": {
    "orbit-local": {
      "command": "orbit",
      "args": ["mcp", "serve"]
    }
  }
}

Or, if you prefer to drive it through glab:

{
  "mcpServers": {
    "orbit-local": {
      "command": "glab",
      "args": ["orbit", "local", "mcp", "serve"]
    }
  }
}

Planned config: other MCP clients

Any MCP client will be able to connect by running orbit mcp serve (or glab orbit local mcp serve). The server will speak MCP over stdio and expose run_sql, get_graph_schema, and index.

Planned usage

Once connected, you will instruct your AI agent to use Orbit directly.

Discover the schema:

“Use get_graph_schema to show me what tables are in my local graph.”

Find definitions by type:

“Use Orbit to count the definitions in this repository by type, and list the ten largest classes.”

Map a module:

“Use Orbit to list every definition declared in src/auth/ and show its kind.”

What’s in the local graph

Orbit Local indexes code only: files, directories, definitions, and imported symbols across all 11 supported languages. SDLC data (merge requests, pipelines, users, vulnerabilities) is not available locally - that requires Orbit Remote.

Billing

Orbit Local does not consume GitLab Credits. All local traffic stays on your machine.