Agents & integration

Agents & MCP

GCTRL exposes its knowledge graph and memory layers to AI agents over the Model Context Protocol (MCP). Connect an agent once and it gains durable, organised, access-controlled memory - GCTRL becomes a memory node in your agent team.

What an agent gets

GCTRL exposes roughly 30 MCP tools, split into read and write operations. Every call is clearance-filtered (an agent only sees the knowledge bases and classifications it is granted) and audited (every call is logged).

Read tools (examples)

ToolReturns
list_graphsAvailable compilations / knowledge bases
search_entitiesEntities matching a query
get_entityA single entity and its attributes
get_neighborsAdjacent entities in the graph
shortest_pathPath between two entities
get_dossierHOT authoritative dossier for an entity
search_chunksWARM evidence passages (vector + lexical)
wiki_pageCurated WIKI prose for an entity/topic
memory_healthTier coverage, sizes, heat/trust snapshot

Write tools (examples)

ToolEffect
extractRun KEX over new source
fuseMerge extraction jobs into the graph
storeWrite a fact / entity
correctCorrect a wrong fact (never re-extracted)
add_relationshipsLink entities
pin_dossierPin a HOT dossier so it is never evicted
run_maintenanceTrigger the memory governance cycle

Two transports

GCTRL offers two ways to connect, depending on where the agent runs.

1. Local stdio MCP server

A local MCP server (services/mcp) for desktop / IDE agents - Claude Code, Claude Desktop, Cursor. It speaks MCP over stdio and authenticates with a scoped token (GCTRL_API_TOKEN).

{
  "mcpServers": {
    "gctrl": {
      "command": "node",
      "args": ["services/mcp/index.js"],
      "env": {
        "GCTRL_API_TOKEN": "gctrl_scoped_token_here"
      }
    }
  }
}

2. MCP-over-HTTP gateway

An HTTP gateway (POST /api/agent/mcp) for remote / multi-agent orchestrators - e.g. Hermes, Codex. It is off by default and enabled per deployment.

# Environment for a remote agent
export GCTRL_API_TOKEN="gctrl_scoped_token_here"
export GCTRL_GATEWAY_URL="https://your-gctrl-host/api/agent/mcp"
// Orchestrator-side MCP config (illustrative)
{
  "mcpServers": {
    "gctrl": {
      "type": "http",
      "url": "https://your-gctrl-host/api/agent/mcp",
      "headers": { "Authorization": "ApiKey ${GCTRL_API_TOKEN}" }
    }
  }
}
stdio MCP serverHTTP gateway
ForClaude Code / Desktop / CursorRemote / multi-agent orchestrators
Locationservices/mcp (local)POST /api/agent/mcp
DefaultOnOff (enable per deployment)
AuthGCTRL_API_TOKENGCTRL_API_TOKEN + GCTRL_GATEWAY_URL

Install the skill

The skill teaches the agent when to retrieve, how to descend the tool ladder without flooding context, and how to write conclusions back so memory compounds. Without it the tools are available but the agent has no discipline about using them. Do this right after wiring up the MCP config above.

The canonical, always-current copy is served at GET /api/agent/skill.md on your own instance, and publicly mirrored at gctrl.tech/skill.md. Full per-client install commands (Claude Code, Cursor, Codex/AGENTS.md, or paste-as-system-prompt) live on the Install the GCTRL Skill page - this section just covers the token you'll need first.

Create a scoped access token

In the GCTRL portal: Settings → Access Control → New Token. Pick a clearance ceiling, grant the knowledge bases the agent may use, and toggle KB-scoped mode. The token is sent as:

Authorization: ApiKey gctrl_your_scoped_token

Settings shortcut - the Settings → Agent Harness tab and the onboarding wizard's "Connect Agent" step both have a one-click Copy skill.md button alongside the MCP config, with your instance URL pre-filled.

GCTRL as a memory node

Once connected, GCTRL slots into your existing agent team as the shared memory node. Your agents gain:

  • Durable memory - knowledge survives across sessions in the backing stores.
  • Organised memory - read the right tier (dossier / chunks / graph / wiki) per question.
  • Access-controlled memory - scoped tokens mean each agent only touches its granted KBs, and every access is audited.

GCTRL also runs its own internal agent - the agentic deep-RAG mode in Talk-to-Graph - which performs multi-hop reasoning over the graph on the platform's behalf.

See also

Modules · Memory Layers · GCTRL Memory Skill · Architecture