Tutorial

Connect your first API

From a public OpenAPI spec to a governed, published MCP server that Claude can call — sign-up to first tool call.

Overview

This walkthrough takes a public OpenAPI 3.x spec, turns its operations into governed MCP tools, publishes a versioned server, and connects that server to Claude as a custom connector. You'll do this once in the console UI, then verify it by asking Claude a question that triggers a real tool call.

The example API is any public REST service that ships an OpenAPI/Swagger document — pick one you already know so the generated tool names make sense to you. The steps are identical regardless of which spec you use.

1. Sign up and create a tenant

Create an account. Signing up provisions a tenant — an isolated workspace with its own servers, contracts, tools, and audit trail, enforced at the database layer via Postgres Row-Level Security (more on that in the RLS tutorial). You'll land in the admin console once your tenant is ready.

2. Add an environment

In the console, open Environments and add one if you don't already have one you want to use (every tenant starts with a default production environment). An environment groups your servers by deployment target — production, staging, whatever fits how you work — and every MCP server must be bound to one before it can publish.

Why this matters: environments let you point the same server definition at different upstream base URLs (e.g. a sandbox vs. live API key) without duplicating tool definitions.

3. Create a server and choose a trust boundary

Go to Servers → New MCP Server. Give it a name and description, then pick a trust boundary:

  • internal — for your own team only.
  • partner — shared with vetted third parties, generally behind OAuth.
  • public — listed in the marketplace, open to anyone who has the URL.

For a first API you're just testing, internal is the safest default — you can widen the boundary later once you've reviewed the generated tools. (The boundary system is covered in depth in Governing tool risk.) Assign the environment you just created and move on.

4. Import the OpenAPI spec

Under Contracts → Import, either paste a spec URL or upload the JSON/YAML directly. The platform parses and validates it, then runs a validation report that flags missing schemas and risky defaults before you're allowed to generate anything from it.

POST /v1/contracts { "source": "url", "url": "https://example.com/openapi.json", "name": "my-first-api", "env": "env_prod" } → 201 { "contract": { "id": "con_...", "status": "validated", ... } }

Review the validation report in the console before continuing. Fix anything flagged as an error in your source spec and re-import if needed — warnings are informational and won't block generation.

5. Generate tools from the spec

From the contract's operation list, select the operations you want exposed and generate tools. Each operation is mapped deterministically: its operationId becomes the tool name, its method and path decide whether it's read-only, and a risk class (low, medium, or high) is derived from the HTTP method and destructive-sounding verbs in the path or operation id (delete, remove, purge, and similar).

POST /v1/contracts/con_.../generate { "operationIds": ["listWidgets", "getWidget", "createWidget"] } → 200 { "tools": [ { "name": "list_widgets", "risk": "low", ... }, ... ] }

Review each generated tool's description and risk classification in the console before assigning it to your server. This is your chance to tighten a description or override a risk level before anything is callable.

6. Publish the server

Attach the generated tools to your server and publish. Publishing signs an immutable, versioned bundle — future changes require a new version rather than mutating a live one. Once published, the console shows the server's public MCP endpoint, of the form:

https://mcpplatform.dev/mcp/<server-id>

That URL — not a marketing "install" link — is what you paste into an MCP client. It resolves to whichever version is currently active for that server.

7. Connect in Claude

  1. In Claude, go to Settings → Connectors → Add custom connector.
  2. Paste your server's MCP endpoint URL from step 6.
  3. Ask Claude a question that maps to one of your generated tools — for example, "what widgets do you have?" if you generated a list_widgets tool.
  4. Claude calls tools/call against your server; the platform resolves your tenant, checks scopes, applies the policy decision for that tool's risk class, brokers any credentials, calls your upstream API, and returns the result — with an audit event written for the call.
Tip: if your boundary is internal or partner, credentials or an install step may be required before Claude can reach the server. public boundary servers with read-only tools are the fastest path to a no-friction demo — see the live sandbox for a working example you don't even need an account for.

Wondering how this compares to writing your own MCP server by hand? See MCP Platform vs. DIY for a side-by-side on setup time, isolation, and governance.