# gctrl

gctrl gives AI agents access to a governed knowledge graph, hybrid retrieval, and code analysis tools. It fits projects that need reusable context.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 7
- Author: GCTRL-TECH
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/GCTRL-TECH/platform/tree/HEAD/services/mcp
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/gctrl

## What it does

gctrl exposes tools for turning text into Neo4j entities and Qdrant vectors, asking questions through hybrid retrieval, finding entities, merging extraction jobs, and storing notes with knowledge extraction. Agents can also inspect graph schemas, ontologies, compilations, and recent extraction jobs.

Direct mode adds local repository indexing plus symbol lookup, call tracing, change-impact checks, and architecture data. The `gctrl_code_index` tool needs the optional `gctrl-code-indexer` package; the other tools keep working without it. Authentication uses `GCTRL_API_TOKEN`, while `GCTRL_GATEWAY_URL` or `GCTRL_API_URL` selects the connection path.

A running `GCTRL harness` is required for the server to operate through the gateway. Legacy `borghive_*` names remain aliases for existing configurations, emit a deprecation warning on each call, and are scheduled for removal in v2.0.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `GCTRL_GATEWAY_URL`, `GCTRL_API_URL`, `GCTRL_API_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env GCTRL_GATEWAY_URL=<GCTRL_GATEWAY_URL> --env GCTRL_API_URL=<GCTRL_API_URL> --env GCTRL_API_TOKEN=<GCTRL_API_TOKEN> --transport stdio mcp -- npx -y gctrl-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add mcp --env GCTRL_GATEWAY_URL=<GCTRL_GATEWAY_URL> --env GCTRL_API_URL=<GCTRL_API_URL> --env GCTRL_API_TOKEN=<GCTRL_API_TOKEN> -- npx -y gctrl-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp": {
            "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>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp": {
            "type": "stdio",
            "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>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e GCTRL_GATEWAY_URL=<GCTRL_GATEWAY_URL> -e GCTRL_API_URL=<GCTRL_API_URL> -e GCTRL_API_TOKEN=<GCTRL_API_TOKEN> mcp npx -y gctrl-mcp
```
Replace <…> with your own values

## When to use it
- extract entities and relations from text
- query a project knowledge graph
- locate entities by name or type
- merge several extraction jobs
- index a local repository and trace symbols

## Example prompts
- Extract the entities and relations from `architecture.md`, then store the result in the knowledge graph.
- Query the graph for the payment service and explain the dependencies connected to it.
- Index the current repository, find `UserService`, and show its callers.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
