Portal Community

What Is an External MCP Server?

An external MCP server is any HTTP service that exposes two endpoints:

Octopus discovers the tools at agent startup, presents them to the LLM as part of its capability set, and calls POST /tool/{name}/call whenever the agent decides to use one. From the agent's perspective, an external MCP tool is indistinguishable from a built-in plugin tool.

When to Use External MCP Servers

Legacy System Integration

Wrap an existing REST or SOAP service behind the MCP contract without modifying the Octopus host or writing an IOctopusPlugin.

Polyglot Tool Servers

Write the tool server in Python, Go, or Node.js if that language has better library support for the integration target (e.g. a Python ML model).

Independently Deployed Services

Deploy and scale your tool server independently from the Octopus host — update tools without restarting the agent runtime.

Shared Tool Infrastructure

Multiple Octopus deployments (dev, staging, prod) can share a single external MCP server for common enterprise tools.

Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│                        Octopus Host                             │
│                                                                 │
│   Agent Engine ──(tool call)──► MCPToolProxy                   │
│                                      │                          │
│                              (HTTP POST /tool/{name}/call)      │
└──────────────────────────────────────┼──────────────────────────┘
                                       │
                          Authorization: Bearer {token}
                                       │
                         ┌─────────────▼──────────────┐
                         │   External MCP Tool Server  │
                         │                             │
                         │   GET /tools                │
                         │   POST /tool/{name}/call    │
                         │                             │
                         │   Your business logic here  │
                         └─────────────────────────────┘

MCP Contract at a Glance

EndpointMethodRequestResponse
/toolsGETJSON array of tool descriptors
/tool/{name}/callPOSTJSON object matching inputSchemaJSON result object
/healthGET{"status":"ok"} (recommended)

What This Guide Covers

PageTopic
MCP Server ProtocolFull wire format: GET /tools and POST /tool/.../call JSON shapes
Defining Tool SchemasJSON Schema best practices for inputSchema and outputSchema
C# MinimalAPI ServerComplete C# MinimalAPI implementation with DI, tool registry, and handler routing
Agent RegistrationHow to register an external MCP server in an agent's configuration
AuthenticationBearer token flow via ICredentialResolver, mTLS option
Testing MCP ToolsUnit testing handlers, integration testing the wire contract, curl examples
Packaging and PublishingDocker packaging, health probes, versioning, and community registry submission