Skip to main content
connic
Connectors

MCP Server

Let MCP clients call your agents as tools and get the answer as the tool result, or start runs in the background.

Last updated
ModesInbound, sync
YAML typemcp
CredentialsNone. connic generates the secret.
BridgeNot supported
Custom domainSupported
Linked agentsOne or more. Each linked agent is a tool, and a tool call starts only that agent.
While pausedEvery request gets 400 with the JSON-RPC error MCP endpoint is disabled and starts no runs.

To give agents tools from another MCP server instead, see MCP Servers. To manage a connic project from an AI client, use connic MCP; see Coding agent setup.

Set up

  1. Open the agent. In Connector Flow, click Add inbound connector, then Create New Connector, and select MCP Server.

  2. Choose the Mode: Sync (Wait for Result), the default, returns the agent's answer as the tool result; Inbound (Fire & Forget) returns a run ID right away. Click Create. The details drawer shows the MCP Endpoint URL and Secret Key. To reopen it, hover over the connector in the flow and click the eye icon.

  3. Add the endpoint URL to your MCP client as a remote server, with the secret in an authentication header. Each linked agent appears as a tool.

In code

Declare the connector in connectors/*.yaml. YAML files must set mode. The first deploy generates the endpoint URL and secret, which then appear in the details drawer.

connectors/agent-tools.yaml
type: mcp
mode: sync                 # or inbound
config:
  require_auth: true
  rate_limit:
    per_ip: 30
agents:
  - invoice-processor
  - support-agent

Configuration

The fields of an MCP Server connector, the same in connectors/*.yaml, the REST API, and connic MCP. The descriptions name the matching setting in the dashboard. Connectors in code describes the fields every connector shares, such as agents and environments.

FieldTypeStatusDescription
typestringRequiredmcp.
modestringRequiredsync waits for the run and returns its answer; inbound returns the run ID right away. Dashboard: Mode.
domainstringOptionalHostname or ID of an active custom domain for the endpoint URL.
configobjectOptionalMCP Server settings.
require_authbooleanOptionalClients must send the secret. Dashboard: Require Authentication.Default: true
error_status_fieldstringOptionalSync. Field in the agent's JSON output, as a dot path such as error.status. When it holds a number from 400 to 599, the tool result is marked as an error. See Sync response. Dashboard: Error Status Field.
rate_limitobjectOptionalTool calls per minute, each from 0 to 1,000; 0 turns a limit off. See Rate limits. Dashboard: Rate Limits.
totalintegerOptionalTool calls from all clients together. Dashboard: Total per Minute.Default: 0
per_ipintegerOptionalTool calls from one client IP address. Dashboard: Per IP per Minute.Default: 0
keystringOptionalField of the agent input to count per_key by, as a dot path such as user_id. Required with per_key. Dashboard: Rate Limit Key.
per_keyintegerOptionalTool calls with the same value in key. Dashboard: Per Key per Minute.Default: 0

Generated values

connic creates these when the connector is created and keeps them across updates and deploys. Copy them from the details drawer. Leave them out of YAML files; connic lint rejects them.

ValueModesDescription
MCP Endpoint URLInbound, syncThe address MCP clients send requests to. It uses the connector's custom domain when one is set.
Secret KeyInbound, syncThe secret clients send while Require Authentication is on.

Connect a client

One endpoint serves these MCP protocol versions. tools/list and tools/call work with all of them.

VersionTransport
2026-07-28Stateless requests, with server/discover for discovery.
2025-11-25, 2025-06-18, 2025-03-26Streamable HTTP, with initialize and notifications/initialized.

ping works with every version except 2026-07-28. An initialize request for a version connic doesn't support gets 2025-06-18 back. With 2026-07-28, the discovery and tool-list responses carry ttlMs: 0 and cacheScope: private, so clients revalidate them instead of sharing cached results.

MCP SDKs send the protocol metadata for you. A hand-written 2026-07-28 request needs Content-Type: application/json, a string or integer id, and _meta with the protocol version and client capabilities, as in the example below. The MCP-Protocol-Version and Mcp-Method headers repeat the version and method from the body, and a tools/call also sends the tool name in Mcp-Name.

connic exposes linked agents as tools only. It doesn't offer MCP resources, prompts, or subscriptions, or the optional Tasks and MCP Apps extensions. Inbound mode is connic's own fire-and-forget behavior, not the MCP Tasks extension.

Tools

Each linked agent becomes one tool. tools/list returns the agents linked at the time of the request, each with this schema:

tool.json
{
  "name": "invoice_processor",
  "title": "invoice-processor",
  "description": "Invoke the invoice-processor agent",
  "inputSchema": {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "The message or prompt to send to the agent"
      },
      "payload": {
        "type": "object",
        "description": "Additional structured data to pass to the agent",
        "additionalProperties": true
      }
    },
    "required": ["message"]
  }
}

The tool name is the agent name in lowercase, with spaces and hyphens replaced by underscores: invoice-processor becomes invoice_processor. The title is the agent name.

Call a tool

Call an agent with tools/call. The input schema requires message, the prompt for the agent; payload takes optional structured data. The example shows the 2026-07-28 request metadata.

request.json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "invoice_processor",
    "arguments": {
      "message": "Process this invoice and extract the total",
      "payload": {
        "invoice_id": "INV-12345",
        "customer": "Acme Corp"
      }
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientInfo": {
        "name": "your-mcp-client",
        "version": "1.0.0"
      },
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Agent input

A tool call starts one run of the tool's agent. The run's input is an object with message and the fields of payload at the top level. For the example above:

agent-input.json
{
  "message": "Process this invoice and extract the total",
  "invoice_id": "INV-12345",
  "customer": "Acme Corp"
}

A message field in payload replaces message. Arguments other than message and payload are ignored. Middleware reads the input in context["payload"]. Each tool call creates one connector run with the tool name and arguments.

Files

Attach files in payload.files, each with a name, a mime_type, and the base64-encoded bytes in data:

arguments.json
{
  "message": "Summarize this document",
  "payload": {
    "files": [
      {
        "name": "invoice.pdf",
        "mime_type": "application/pdf",
        "data": "<base64-bytes>"
      }
    ]
  }
}

An input takes up to 50 files, at most 32 MiB combined. A file with missing or invalid fields is omitted on its own. At the first file over a limit, connic keeps the complete files before it and the message, and accepts no further files. Each omitted file is described in file_issues in the input. When a call has attachments, the tool result reports them under structuredContent in accepted, omitted, and issues.

connic doesn't check file types for tool calls. Whether the model can read a type depends on the model, and a file it can't read fails the run; see file input for connic/* models.

Files are optional by default. Turn on Files required for an agent in the connector's details drawer, or set files_required: true on its link in YAML, to fail the run before it starts when a file is missing or was omitted.

Responses

The examples show 2026-07-28 responses. Other versions get the same result without resultType and _meta.

Sync response

In sync mode, the tool call waits for the run and returns the agent's output as text, for up to 5 minutes.

response.json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "resultType": "complete",
    "content": [
      {
        "type": "text",
        "text": "The invoice total is $1,234.56. Payment is due on March 15."
      }
    ],
    "isError": false,
    "_meta": {
      "io.modelcontextprotocol/serverInfo": {
        "name": "connic-mcp-server",
        "title": "connic MCP server",
        "version": "1.0.0"
      }
    }
  }
}

A failed or cancelled run returns isError: true with the error as text, and its connector run is marked failed. Input errors, such as a missing required file, also appear under structuredContent.error. A run that hasn't finished after 5 minutes returns isError: true with Agent execution timed out, but keeps running; find its result under Logs. Time the run waits for an approval counts toward the 5 minutes, so use inbound mode for agents with approvals or long tasks.

A completed run returns isError: false, also when middleware stopped it with StopProcessing. To report a refusal as an error, set error_status_field to a field of the agent's JSON output. When the output is a JSON object and that field holds a number from 400 to 599, the result has isError: true with the same text, for example after raise StopProcessing(json.dumps({"status": 403, "message": "Insufficient permissions"})) with the field set to status. The connector run stays completed.

Inbound response

In inbound mode, the tool call queues the run and returns its ID right away. The agent works in the background; to receive its results, see Results of inbound runs.

response.json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "resultType": "complete",
    "content": [
      {
        "type": "text",
        "text": "Agent run started with ID: 550e8400-e29b-41d4-a716-446655440000"
      }
    ],
    "isError": false,
    "_meta": {
      "io.modelcontextprotocol/serverInfo": {
        "name": "connic-mcp-server",
        "title": "connic MCP server",
        "version": "1.0.0"
      }
    }
  }
}

Authentication

While Require Authentication is on, the default, every request must carry the connector's secret in an Authorization: Bearer or X-Connic-Secret header. Requests without it get 401.

headers
# Authorization header
Authorization: Bearer <secret>

# X-Connic-Secret header
X-Connic-Secret: <secret>

The secret is static: the connector doesn't offer MCP OAuth discovery or an interactive OAuth flow. Requests with an Origin header get 403, so browsers can't call the endpoint; use a native or server-side MCP client.

With Require Authentication off, anyone who knows the endpoint URL can call your agents. Turn it off only for an endpoint that is meant to be public.

Rate limits

Rate limits cap the tool calls a connector accepts per minute. Set them under Rate Limits in the dashboard or in config.rate_limit. All three are off by default. Only tools/call counts; initialize, tools/list, and other methods don't.

  • total counts tool calls from all clients together.
  • per_ip counts tool calls from one client IP address. IPv6 addresses count per /64 network.
  • per_key counts tool calls with the same value in the agent input field named by key. The input holds message and the fields of payload. Calls without that field skip this limit.

A tool call over a limit gets 429 with a Retry-After header and a JSON-RPC error whose data.retry_after holds the seconds to wait. It starts no run and uses no Project credit. Calls rejected per IP or per key don't count toward the total.

Clients choose the key value. A client can change it to get around the per-key limit, or send another user's value to use up that user's limit. Use the per-key limit to share capacity among clients you trust, and the per-IP and total limits against abuse.

Limits and errors

LimitValue
Request bodyRoom for 32 MiB of files with their base64 encoding, plus metadata.
Sync wait5 minutes, including time the run waits in a queue or for an approval.
Files50 per tool call, at most 32 MiB combined.

Errors come back as JSON-RPC errors with these HTTP status codes:

StatusMeaning
200Success. A sync tool call whose run failed or timed out also returns 200, with isError: true in the result.
202A notification was accepted (versions before 2026-07-28).
400The request is invalid: not JSON-RPC 2.0, an unknown tool, arguments that aren't an object, missing or mismatched protocol headers, an unsupported protocol version, or an unknown method before 2026-07-28. A paused connector also answers 400, with MCP endpoint is disabled.
401The secret is missing or wrong.
403The request has an Origin header.
404No MCP endpoint exists at this URL, or a 2026-07-28 request uses an unknown method.
405A method other than POST. connic doesn't open an event stream, so GET requests get 405 too.
413The body is larger than the request body limit. The error data has code: "request_too_large".
415A 2026-07-28 request without Content-Type: application/json.
429A rate limit is reached. Retry after the seconds in Retry-After.
503The project has no active deployment. Deploy it, then call the tool again.