Skip to main content

MCP Server

Grackle exposes its full API as an MCP (Model Context Protocol) server. This means any AI agent with MCP support — Claude Desktop, Claude Code, or anything else — can create tasks, spawn sessions, post findings, and manage environments through Grackle.

What it enables

With the MCP server, you can:

  • Have Claude Code manage Grackle tasks without the CLI
  • Build orchestration workflows where one agent controls others through Grackle
  • Connect external AI tools to your Grackle instance

Connecting to the MCP server

The MCP server starts automatically with grackle serve on port 7435. Configure your AI tool to connect to it:

{
"mcpServers": {
"grackle": {
"type": "http",
"url": "http://localhost:7435/mcp",
"headers": {
"Authorization": "Bearer <your-api-key>"
}
}
}
}

For tools that support OAuth (like Claude Desktop), the MCP server handles the OAuth flow automatically — no manual API key configuration needed.

Available tools

The MCP server exposes tools grouped by domain:

Environments

ToolDescription
env_listList all environments with status
env_addRegister a new environment
env_provisionStart and connect an environment
env_stopStop a running environment
env_destroyPermanently remove an environment
env_removeUnregister an environment
env_wakeRestart a stopped environment

Sessions

ToolDescription
session_spawnStart a new agent session
session_resumeResume a terminated session
session_statusList sessions (filter by environment)
session_killTerminate a running session
session_attachStream session events
session_send_inputSend input to a waiting session

Tasks

ToolDescription
task_listList tasks (with search and status filters)
task_createCreate a new task
task_showGet full task details
task_updateUpdate task metadata
task_startStart a task (spawns a session)
task_completeMark a task as complete
task_resumeResume a paused task
task_deleteDelete a task

Projects

ToolDescription
project_listList all projects
project_createCreate a new project
project_getGet project details
project_updateUpdate project metadata
project_archiveArchive a project

Findings

ToolDescription
finding_listQuery findings by category/tags
finding_postRecord a finding

Personas

ToolDescription
persona_listList all personas
persona_createCreate a new persona
persona_editUpdate a persona
persona_deleteDelete a persona

Configuration

ToolDescription
config_get_default_personaGet the default persona setting
config_set_default_personaSet the default persona

Scoped vs. global auth

The MCP server supports two authentication modes:

Global auth (API key)

Full access to all tools and all projects. This is what you get when connecting with your API key directly.

Scoped auth (session token)

When Grackle spawns an agent session for a task, it gives that agent a scoped MCP token that restricts access:

  • The agent can only see tasks and findings within its own project
  • Task creation is automatically parented to the agent's own task
  • The projectId is injected automatically — the agent doesn't need to specify it
  • Cross-project access is blocked

This means orchestrator agents can create subtasks and post findings through MCP, but they're sandboxed to their own project scope.

How agents use MCP tools

When an agent runs inside Grackle, the MCP server is automatically configured as an available tool source. The agent sees tools like mcp__grackle__task_create and mcp__grackle__finding_post alongside its built-in tools.

This is what enables patterns like:

  • An orchestrator agent that decomposes a task into subtasks using task_create
  • A researcher agent that posts findings for other agents to read
  • A supervisor agent that monitors task status and provides feedback