Skip to content

MCP Server

The standalone MCP server (mcp-server/) in Node.js exposes Octipus capabilities as MCP tools for external CLI models. External tools like Claude Code and Gemini CLI can then call these tools to:

  • Search the web and fetch pages
  • Spawn and manage agents
  • Execute filesystem, shell, git, Docker tools
  • Manage recurring tasks and automations
  • Access knowledge base and semantic search
  • And more — 22 tool modules with 59+ individual tools

Tools are organized by module. Each module exposes 1–5 individual tools:

ModuleTools
Searchoctipus_search, octipus_fetch_page
Agentsoctipus_list_agents, octipus_spawn_agent, octipus_stop_agent, octipus_send_message, octipus_get_agent_events
Sessionsoctipus_list_sessions, octipus_get_messages
Modelsoctipus_list_models, octipus_model_health
Chatoctipus_chat
Expertsoctipus_list_experts, octipus_chat_with_expert
Toolsoctipus_list_tools, octipus_execute_tool
Skillsoctipus_list_skills, octipus_get_skill, octipus_create_skill, octipus_update_skill, octipus_delete_skill
Knowledgeoctipus_search_knowledge, octipus_index_file
Recurring Tasksoctipus_list_recurring_tasks, octipus_create_recurring_task, octipus_update_recurring_task, octipus_delete_recurring_task
Hooksoctipus_toggle_hook
Plus 11 moreProfiles, Messaging, Pipelines, Documents, Settings, Gateway, Health, Audit, Artifacts, Plugins, etc.

See mcp-server/src/tools/ for the full list.

Terminal window
cd mcp-server
npm install
npm run build

Add to .mcp.json at your project root:

{
"mcpServers": {
"octipus": {
"command": "node",
"args": ["/path/to/octipus/mcp-server/dist/index.js"],
"env": {
"OCTIPUS_URL": "http://localhost:3005",
"OCTIPUS_API_KEY": "<your-api-key>"
}
}
}
}

The MCP server uses one of these authentication methods:

MethodEnvironment VariablesDescription
API KeyOCTIPUS_API_KEYPersonal octi_… token, or the mcp-bootstrap token at ~/.octipus/mcp-token
User/PasswordOCTIPUS_USER, OCTIPUS_PASSWORDAuto-login with JWT caching

On first startup of Octipus, the backend auto-generates a bootstrap token and saves it to ~/.octipus/mcp-token (mode 600). The bin/octi CLI reads this file and auto-configures .mcp.json.

To rotate the token:

Terminal window
rm ~/.octipus/mcp-token
octi restart

For multiple users on one host, each person should mint their own token in Settings → API Tokens and set OCTIPUS_API_KEY per shell session.

CLI models can interact with your real browser through the MCP bridge:

Terminal window
# From Claude Code or Gemini CLI
octipus_execute_tool(tool_id="browser-ext", tool_name="get_tabs", args={})
octipus_execute_tool(tool_id="browser-ext", tool_name="screenshot", args={})
octipus_execute_tool(tool_id="browser-ext", tool_name="navigate", args={"url": "https://example.com"})

Requires the Browser Extension to be installed and connected.

Run the MCP server as a standalone HTTP service (instead of spawning a subprocess):

Terminal window
node mcp-server/dist/index.js --transport http --port 3010

Then point your CLI tool to http://localhost:3010 (for local) or a remote URL.

IssueSolution
Connection refusedEnsure Octipus backend is running on the URL specified in OCTIPUS_URL.
401 UnauthorizedCheck OCTIPUS_API_KEY is a valid token. Regenerate if needed: rm ~/.octipus/mcp-token && octi restart.
Tools not discoveredVerify MCP server process is running. Check .mcp.json syntax. Hard-refresh CLI tool.
Permission denied executing toolUse /status in web UI to check your user role and permissions.