ONLINESVR 开发者文档 / ONLINESVR MCP server

ONLINESVR MCP server

Connect Claude, Cursor, and other MCP clients to published Store Capabilities — same Gateway runtime as Console and REST.

What it is

The ONLINESVR MCP server exposes published Capabilities as typed MCP tools. Agents can discover tools (tools/list) and run them (tools/call) over Streamable HTTP, with platform API Key auth, grants, quota, and billing unchanged.

For a copy-paste client configurator (URL, Cursor / Claude / Codex snippets, featured Capabilities), use https://mcp.onlinesvr.com (lab: mcp app on :3203). This page is the protocol and ops guide; production docs host is docs.onlinesvr.com.

If you are building a Capability that should call third-party MCP servers on a user’s behalf, that is a different integration path (MCP connectors) and is not covered here.

MCP server vs Console

MCP server — programmatic interface for external AI agents, IDEs, and CLIs. Use it when you operate your own agent.

Console / Playground — human UI for trying and operating Capabilities. Both paths submit through Gateway → Scheduler → Worker; they do not invent a second execution stack.

Prerequisites

An ONLINESVR account and a platform API Key with permission to submit tasks (and grants for the Capabilities you will call).

An MCP client that supports remote Streamable HTTP (Claude Desktop / Claude.ai, Cursor, VS Code MCP, Codex, and other clients that follow the MCP transport spec).

At least one Capability published as an MCP tool (binding + published release). Draft tools never appear in tools/list.

Connect and authorize

Hosted entry (production): https://mcp.onlinesvr.com — Streamable HTTP. Lab / self-host often mounts the same protocol at https://api.onlinesvr.com/mcp or http://127.0.0.1:8091/mcp.

Recommended today: pass your platform API Key as Authorization: Bearer <API_KEY>. OAuth-style “URL only” connect may land later; do not put secrets in frontend bundles.

Cursor / Claude — Streamable HTTP + API Key
{
  "mcpServers": {
    "onlinesvr": {
      "url": "https://mcp.onlinesvr.com",
      "headers": {
        "Authorization": "Bearer <YOUR_API_KEY>"
      }
    }
  }
}
Local lab
{
  "mcpServers": {
    "onlinesvr-lab": {
      "url": "http://127.0.0.1:8091/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_API_KEY>"
      }
    }
  }
}

How tools are selected

Unlike category query strings on some public MCP hosts, ONLINESVR selects tools via MCP Server Profiles and published tool bindings in the platform.

Operators bind a Capability → tool name/schema, publish a release, then agents see it in tools/list. Withdrawing a release removes it from the catalog immediately.

Browse Capabilities on the Store first, then ask an operator (or Console when available) to publish the MCP binding you need.

Call flow and results

initialize — negotiate protocol (Streamable HTTP, e.g. 2025-03-26) and receive Mcp-Session-Id when the client Accept includes text/event-stream.

tools/list — returns published tools only, each with name, description, and inputSchema derived from the Capability contract (or an audited override).

tools/call — validates the key and Capability grant, then SubmitTask through Gateway. Long-running work returns a task_id (order id); poll task status via the platform API / Gateway order endpoint rather than inventing a private result protocol.

Production tips

Pin explicit tool bindings in production; do not rely on draft or unpublished releases.

Scope API Keys with Capability grants; avoid legacy “allow all” keys in shared agents.

Monitor usage and failures in Console / platform logs (tool_key, capability_id, task_id, latency).

Prefer the hosted MCP URL in client configs so protocol improvements stay transparent to agents.

Troubleshooting

401 / WWW-Authenticate — missing or invalid Bearer API Key on tools/call.

Empty tools/list — no published releases on the active profile, or you are pointed at the wrong environment.

Tool not found — draft/withdrawn release, or tool_name mismatch.

Capability not granted / quota errors — fix grants or billing on the key before retrying.

Unknown Mcp-Session-Id (404) — re-run initialize without the old session header.

Related

Store — discover Capabilities: /store

Run a Capability — Console / API quickstart: /getting-started/run-a-capability

API — REST task submit and order status: /api

Model Context Protocol — https://modelcontextprotocol.io