Skip to main content

MCP Server

Grackle's whole API, handed to an agent as tools. Let an agent drive your agents.

The server speaks MCP (Model Context Protocol). Any MCP-capable agent — Claude Desktop, Claude Code, anything else — gets the same verbs you do: create tasks, spawn sessions, manage environments, search the knowledge graph. An agent with these tools can run Grackle itself.

For the worked example, see Claude drives Grackle.

Connecting

The MCP server comes up with grackle serve on port 7435. Point your tool at it:

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

Tools that speak OAuth (Claude Desktop, say) skip the key entirely — the server runs the flow and advertises its metadata at /.well-known/oauth-protected-resource/mcp.

The tool surface

Roughly 80 tools, grouped by domain across 15 groups. Every tool is namespaced at call time: task_create is invoked as mcp__grackle__task_create. Which groups appear depends on which plugins are enabled.

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
env_list_docker_containersList running Docker containers an environment can attach to (Docker adapter attach mode)

Sessions

A session is an agent on the wire. These tools spawn it, watch it, kill it when it strays.

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 (status / parent filters)
task_searchFuzzy search tasks by title/description, ranked by relevance
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

Workspaces

ToolDescription
workspace_listList all workspaces
workspace_createCreate a new workspace
workspace_getGet workspace details
workspace_updateUpdate workspace metadata
workspace_archiveArchive a workspace
workspace_link_environmentLink an environment into the workspace's dispatch pool
workspace_unlink_environmentRemove a linked environment from the workspace pool

Personas

A persona is an agent's preset — its system prompt, its runtime, the slice of tools it's allowed to touch. See Personas & runtimes.

ToolDescription
persona_listList all personas
persona_createCreate a new persona
persona_showGet full persona details (system prompt, script, config)
persona_editUpdate a persona
persona_deleteDelete a persona

Knowledge

ToolDescriptionParameters
knowledge_searchNatural-language semantic search over the knowledge graph, ranked by similarityquery, limit?, workspaceId?, expand?, expandDepth?
knowledge_get_nodeRetrieve a knowledge node by ID, with its edgesid, expand?, expandDepth?

These come from the knowledge graph plugin, enabled by default. They vanish only if you disable the plugin (grackle plugin disable knowledge, or the plugin_set_enabled tool — then restart). GRACKLE_KNOWLEDGE_ENABLED only sets the initial state when the database is first seeded; on an existing install it does nothing.

Configuration

ToolDescription
config_get_default_personaGet the default persona setting
config_set_default_personaSet the default persona

Schedules

A schedule fires a persona on a cadence — interval shorthand like 5m, or a 5-field cron expression like 0 9 * * MON. The agent wakes on its own clock.

ToolDescriptionParameters
schedule_listList scheduled triggersworkspaceId?
schedule_createCreate a scheduled triggertitle, scheduleExpression, personaId, description?, workspaceId?, parentTaskId?
schedule_showGet details of a schedule by IDscheduleId
schedule_updateUpdate a schedule (only provided fields change)scheduleId, title?, description?, scheduleExpression?, personaId?, enabled?
schedule_deleteDelete a schedulescheduleId

Escalations

When an agent hits a wall it can't decide, it asks the human. The message routes to your configured notification channels.

ToolDescriptionParameters
escalate_to_humanEscalate a question/decision to the humanmessage, urgency? (low/normal/high)
escalation_listList recent escalations and their delivery statusworkspaceId?, status?, limit?
escalation_acknowledgeMark an escalation as seen by the humanid

Workpad

A workpad is structured context bolted to a task — what the agent did, recorded before it completes.

ToolDescriptionParameters
workpad_writeWrite structured context to a tasktask content (defaults to current task)
workpad_readRead a task's workpad (current task or a child)taskId?

Inter-agent IPC

How agents talk to each other while they work — spawn children, pass messages, share named streams sibling-to-sibling and child-to-parent. These need scoped auth: they only fire from inside a Grackle session, never from an external API-key client. The fd values returned by ipc_spawn/ipc_create_stream name a connection; permission is one of r/w/rw, and deliveryMode/pipe is one of sync/async/detach. Full mechanics in Coordination.

ToolDescriptionParameters
ipc_spawnSpawn a child agent with an optional IPC pipeprompt, environmentId, pipe?, personaId?, maxTurns?
ipc_writeWrite a message to a child/stream via an open fdfd, message
ipc_closeClose an fd (stops the child if it was the last fd)fd
ipc_list_fdsList your open fds (close owned child fds before exiting)(none)
ipc_terminateSend a graceful SIGTERM to a child via its fdfd
ipc_list_streamsList active IPC streams with subscribers and buffer depth(none)
ipc_create_streamCreate a named stream; returns an rw fdname, selfEcho?
ipc_attachGrant another session access to a stream you holdfd, targetSessionId, permission?, deliveryMode?
ipc_share_streamShare a stream with your parent (auto-discovers the parent pipe)fd? or streamName?, permission?, deliveryMode?

Components & widgets (MCP Apps)

An agent can author and render UI inline in the chat — one-off renders, or reusable components persisted in the workspace registry. Default renderer is grackle-react (JSX); mcp-app-html renders raw HTML. Promote a component with component_promote and it gains a dynamic, per-workspace render_<name> tool whose input schema is the component's propsSchema. See Generative UX.

ToolDescriptionParameters
component_registerPersist a reusable component in the workspace registryname, source, rendererKind?, description?, propsSchema?, workspaceId?
component_updateUpdate a registered component (bumps its version)id, source?, name?, description?, propsSchema?, workspaceId?
component_listList components registered in the workspaceworkspaceId?
component_searchSearch the registry (incl. Grackle built-ins) by keywordquery, limit?, workspaceId?
component_promotePromote (or demote) a component to a render_<name> toolid? or name?, promoted?, workspaceId?
component_renderRender a registered component by id/name with propsid? or name?, props?, workspaceId?
component_showRender a one-off React/JSX component (no persistence)source, props?, workspaceId?
widget_showRender a one-off raw-HTML widget (no persistence)body, props?, workspaceId?
show_hello_widgetDemo widget that echoes a message (MCP Apps sample)message?

Each promoted component also adds a dynamic render_<name> tool to that workspace's tool list, so any agent can render it by name with validated props.

Credentials & tokens

Every agent gets its own name and its own key. These tools wire the keys.

ToolDescriptionParameters
credential_provider_listList credential-provider auto-forwarding configuration(none)
credential_provider_setSet a provider mode (claude/github/copilot/codex)provider, mode
token_listList configured tokens (values are never returned)(none)
token_setSet a token auto-forwarded to environments (encrypted at rest)name, value, target
token_deleteDelete a configured token by namename

Plugins

ToolDescriptionParameters
plugin_listList known plugins with state (enabled/loaded/required)(none)
plugin_set_enabledEnable/disable a plugin (a server restart is required for the change to take effect; core plugins cannot be disabled)name, enabled

Diagnostics

ToolDescriptionParameters
usage_getAggregated token usage and USD cost for a session/task/tree/workspace/environmentscope id
logs_getRetrieve session logs (raw events, transcript, or live tail)session id
get_version_statusCheck whether a newer Grackle version is available (and whether running in Docker)(none)

Two endpoints, one codebase

Grackle exposes the tools through two doors. Same tools underneath; different auth, different reach.

Global MCP server (port 7435)

The standalone server you point external tools at. API key or OAuth. Full access to every tool and every workspace. This is the door you walk through.

PowerLine MCP broker (per-session)

When Grackle spawns an agent, the server hands it a scoped MCP URL and session token over PowerLine. The agent connects with that token — never your API key:

  • It holds a session token that identifies it, not your key.
  • Tool access is filtered by its persona — a reviewer agent might see only read-only tools.
  • Tasks it creates are parented to its own task automatically.
  • workspaceId is injected. No reaching across workspaces.

This is the orchestrator pattern's spine: an agent spawns subtasks and watches them through MCP, and sees nothing outside its own scope.

How an agent sees the tools

An agent running inside Grackle finds the MCP server already wired as a tool source. It sees mcp__grackle__task_create, mcp__grackle__session_spawn, and the rest, sitting alongside its built-in tools. That's all it takes:

  • An orchestrator decomposes a task into subtasks with task_create.
  • A researcher searches the knowledge graph for prior context.
  • A supervisor watches task status and feeds corrections back down.

One agent, the whole API, a fleet of agents at its command.