Skip to content

MCP Integration

Octipus integrates with the Model Context Protocol (MCP) in two ways: as an MCP client that connects to external MCP servers, and as an MCP server that exposes its capabilities to external tools.

The client bridge connects to external MCP servers and makes their tools available to agents.

TransportDescription
StdioSubprocess-based MCP servers — spawns a local process
SSEHTTP Server-Sent Events for remote MCP servers
  • Tool discovery: Automatically enumerates tools from connected servers
  • Resource discovery: Lists available resources
  • Prompt discovery: Lists available prompt templates
  • Dynamic loading: MCP servers can be added and removed at runtime

Configure MCP servers through the web UI MCP page or via the API.

The mcp-server/ package exposes Octipus’s capabilities as MCP tools for external CLI models like Claude Code and Gemini CLI.

CategoryToolDescription
Searchoctipus_searchSearch the web via SearXNG
octipus_fetch_pageFetch and extract text from a URL (browser-rendered)
Agentsoctipus_list_agentsList running agents with status
octipus_spawn_agentSpawn a new autonomous agent
octipus_stop_agentStop a running agent
octipus_send_messageSend a message to a running agent
octipus_get_agent_eventsGet agent events (polling with cursor)
Sessionsoctipus_list_sessionsList recent chat sessions
octipus_get_messagesGet messages from a session
Modelsoctipus_list_modelsList available AI models
octipus_model_healthGet model health status
Chatoctipus_chatSend a message through the orchestrator
Expertsoctipus_list_expertsList available expert personas
octipus_chat_with_expertChat using a specific expert (bypass orchestrator)
Toolsoctipus_list_toolsList all available tools and their actions
octipus_execute_toolExecute any tool action (filesystem, shell, git, docker, etc.)
Skillsoctipus_list_skillsList domain knowledge skills
octipus_get_skillGet skill details
octipus_create_skillCreate a custom skill
octipus_update_skillUpdate an existing skill
octipus_delete_skillDelete a skill
Knowledgeoctipus_search_knowledgeSemantic search across indexed documents
octipus_index_fileIndex a file for semantic search
Hooksoctipus_list_recurring_tasksList hooks and scheduled tasks
octipus_create_recurring_taskCreate a hook or scheduled task
octipus_update_recurring_taskUpdate a hook or task
octipus_delete_recurring_taskDelete a hook or task
octipus_toggle_hookEnable or disable a hook

Build the MCP server:

Terminal window
cd mcp-server && npm install && npm run build

Add to .mcp.json at your project root:

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

The MCP server supports two authentication methods:

MethodEnvironment VariablesDescription
API KeyOCTIPUS_API_KEYDirect JWT or MASTER_KEY token
User/PasswordOCTIPUS_USER, OCTIPUS_PASSWORDAuto-login with JWT caching

The MCP server uses the tool execution API endpoint to bridge tool calls:

POST /api/tools/:toolId/tools/:toolName/execute

This allows external CLI models to execute any tool through the MCP protocol, with full permission enforcement and audit logging.