mcpField
G
gctrl

gctrl

Local
gctrl.techMemory & Knowledge7Updated today

About gctrl

gctrl exposes Ground Control knowledge management to AI agents through MCP. It combines graph extraction, hybrid RAG, scoped access, and codebase navigation tools for agents working with organizational knowledge or repositories.

Key features

  1. 01Extract and fuse graph knowledge
  2. 02Query graphs with hybrid RAG
  3. 03Search entities and schemas
  4. 04Store notes with graph extraction
  5. 05Index and navigate codebases
  6. 06Use scoped access tokens

Use cases

  1. 01Building a graph from text
  2. 02Querying stored organizational knowledge
  3. 03Finding code symbols and tracing callers
  4. 04Assessing the impact of code changes

MCP support

The MCP server exposes Ground Control knowledge and codebase operations as tools, including extraction, querying, storage, graph management, and code navigation. Scoped GCTRL Access Tokens restrict which graphs an agent can access.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"gctrl-tech-gctrl": {
"command": "npx",
"args": [
"-y",
"gctrl-mcp"
],
"env": {
"GCTRL_GATEWAY_URL": "<GCTRL_GATEWAY_URL>",
"GCTRL_API_URL": "<GCTRL_API_URL>",
"GCTRL_API_TOKEN": "<GCTRL_API_TOKEN>"
}
}
}
}
Run commandnpx -y gctrl-mcp
Environment variables to set
GCTRL_GATEWAY_URLURL of your GCTRL harness MCP gateway, e.g. http://localhost:4000/api/agent/mcp (recommended mode)
GCTRL_API_URLDirect GCTRL API base URL (alternative to gateway mode), e.g. http://localhost:4000/api
GCTRL_API_TOKENSecretScoped GCTRL Access Token (gctrl_…) created in Settings → Access Control

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmgctrl-mcp1.2.0

Tools

60

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
textstringYesThe text content to extract knowledge from
ontologyIdstringNoOptional ontology ID to guide entity type extraction
compilationIdstringNoOptional: target knowledge graph compilation ID. The extracted job will be auto-linked to this compilation. Use gctrl_list_graphs to find IDs.
discoveryModeenumNostrict = only ontology types, discover = find all types and extend ontologystrict | discover

Details

From the project README

Ground Control (GCTRL) MCP Server

Exposes Ground Control's knowledge management as MCP tools for Claude and other AI agents.

Tools Available

ToolDescription
gctrl_extractExtract knowledge from text → Neo4j entities + Qdrant vectors
gctrl_queryAsk questions about knowledge graphs (hybrid RAG)
gctrl_search_entitiesSearch for specific entities by name/type
gctrl_list_graphsList all knowledge graph compilations
gctrl_fuseMerge extraction jobs into unified graphs
gctrl_list_ontologiesList available ontologies
gctrl_list_extractionsList recent extraction jobs
gctrl_storeStore knowledge (like Obsidian notes, but with KG extraction)
gctrl_schemaGet the knowledge graph schema
gctrl_code_indexIndex a local repo into a Codebase KB (compilation type CODE). Direct mode only (it indexes THIS machine, so a gateway cannot serve it) and needs the optional gctrl-code-indexer package - without it the tool returns an install hint and every other tool keeps working.
gctrl_code_symbolFind code symbols by name/path/regex (proxied to the HTTP gateway)
gctrl_code_traceTrace callers/callees of a symbol (proxied to the HTTP gateway)
gctrl_code_impactImpact analysis for changed symbols/files (proxied to the HTTP gateway)
gctrl_code_architectureLanguages, hotspots, communities for a Codebase KB (proxied to the HTTP gateway)
Deprecated names (alias, removal in v2)

Every tool above is also exposed under its legacy name for backwards compatibility with existing .mcp.json configs. The aliases log a deprecation warning to stderr on every invocation and will be removed in v2.0 — please migrate.

Deprecated aliasUse instead
borghive_extractgctrl_extract
borghive_querygctrl_query
borghive_storegctrl_store
borghive_fusegctrl_fuse
borghive_search_entitiesgctrl_search_entities
borghive_list_graphsgctrl_list_graphs
borghive_list_ontologiesgctrl_list_ontologies
borghive_list_extractionsgctrl_list_extractions
borghive_schemagctrl_schema

Quickstart (npm)

Published on npm as gctrl-mcp and in the official MCP Registry as io.github.GCTRL-TECH/gctrl. Add to your MCP client config (Claude Code, Claude Desktop, Cursor, Codex, …):

{
  "mcpServers": {
    "gctrl": {
      "command": "npx",
      "args": ["-y", "gctrl-mcp"],
      "env": {
        "GCTRL_GATEWAY_URL": "http://localhost:4000/api/agent/mcp",
        "GCTRL_API_TOKEN": "gctrl_..."
      }
    }
  }
}

Requires a running GCTRL harness (get started).

Coding with GCTRL (recommended for coding agents)

Run the server in direct mode next to your gateway entry so the agent gets the local code tools, and let it keep the repository's Codebase KB current on its own:

{
  "mcpServers": {
    "gctrl":      { "command": "npx", "args": ["-y", "gctrl-mcp"],
                    "env": { "GCTRL_GATEWAY_URL": "https://<host>/api/agent/mcp", "GCTRL_API_TOKEN": "gctrl_..." } },
    "gctrl-code": { "command": "npx", "args": ["-y", "gctrl-mcp"],
                    "env": { "GCTRL_API_URL": "https://<host>/api", "GCTRL_API_TOKEN": "gctrl_...",
                             "GCTRL_MCP_TOOLS": "code", "GCTRL_CODE_AUTO_INDEX": "cwd" } }
  }
}

With GCTRL_CODE_AUTO_INDEX=cwd the server indexes the directory the MCP client launched it in (incremental - a warm repo takes seconds) right after start-up, and the agent's first gctrl_code_symbol hits a current graph. The server's instructions carry the coding protocol every connected agent follows: index once per session, navigate through gctrl_code_symbol / gctrl_code_trace / gctrl_code_architecture BEFORE reading files, run gctrl_code_impact before changing a symbol, re-index after larger edits, ask gctrl_query for the why and store decisions next to the symbols with gctrl_store. Measured on GCTRL's own repository: structural questions answered through the graph used 95.6 % fewer tokens than grep-and-read.

Configuration
Env varPurpose
GCTRL_GATEWAY_URLRecommended: URL of your harness's MCP gateway (http://<host>:4000/api/agent/mcp). The stdio server acts as a thin authenticated proxy.
GCTRL_API_URLAlternative direct mode: GCTRL API base URL (http://<host>:4000/api); tools run locally against the API.
GCTRL_API_TOKENScoped GCTRL Access Token (gctrl_…), created in Settings → Access Control with a clearance level + per-graph grants. Least privilege — the agent sees exactly what the token is cleared for.
GCTRL_MCP_TOOLSOptional tool-set filter. Set to code to register only the local code tools (gctrl_code_index, gctrl_code_symbol, gctrl_code_trace, gctrl_code_impact, gctrl_code_architecture) — used for the Anvil/Hermes gctrl-code stdio entry, kept separate from the HTTP-gateway gctrl/gctrl-projekt entries. Direct mode only: in gateway mode the gateway's own tool list is proxied verbatim, so the filter has no effect and the server says so on startup.

| GCTRL_CODE_AUTO_INDEX | Direct mode: cwd (or a repository path) indexes that repository in the background right after start-up - incremental, never fatal. Makes the Codebase KB automatic instead of a habit. | | GCTRL_CODE_COMPILATION_ID | Direct mode: the CODE compilation gctrl_code_index uses when the agent passes none (one project = one repo = one code graph). An explicit compilationId from the agent still wins. | | GCTRL_CODE_FOLDER | Direct mode: folder path (Users/<name>/Code) for a code graph the server auto-creates as <repo> (code). Hosts that launch the server per user (Anvil) set it so every colleague's code lands in their own folder; without it GCTRL files under the account owner's Users/<owner>/Code. |

Dev-only fallback: GCTRL_EMAIL + GCTRL_PASSWORD (full-clearance JWT). Avoid in production.

Build from source

cd borghive/services/mcp
npm install
npm run build
Working on the code indexer

gctrl-code-indexer is an optional dependency and is not on npm yet, so a plain npm install here will not fetch it. To develop or test gctrl_code_index against the in-repo package, link it once:

cd borghive/packages/code-indexer && npm ci && npm run build
cd ../../services/mcp && npm install ../../packages/code-indexer --no-save
# or: npm link ../../packages/code-indexer

The server's types for the indexer are declared locally, so npm run build passes with or without the package installed - the difference is only whether gctrl_code_index works at runtime or returns its install hint.

Publish order

gctrl-mcp and gctrl-code-indexer are two npm packages and must go out in this order:

  1. Publish [email protected].
  2. Switch optionalDependencies in services/mcp/package.json to a real registry range (it already reads ^0.1.0; confirm it resolves) and re-run npm install.
  3. Bump gctrl-mcp to 1.1.0 (package.json + package-lock.json root).
  4. Publish gctrl-mcp.

Bumping gctrl-mcp BEFORE the indexer is on npm would break npx gctrl-mcp for every existing user - which is exactly why the version sits at 1.0.1 today.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.