Skip to content
VectorHub
All posts
MCPOpenAPI

Turning any REST API into an MCP server

Most of an MCP server is mechanical translation from a schema you already have. Here is what generates cleanly and what still needs a human.

The VectorHub team6 min read

The 1,500 connectors get the attention, but the feature teams reach for on day one is usually the converter, because the API that matters most to them is the one only they have.

The mapping is mostly mechanical

An OpenAPI document already contains nearly everything an MCP tool definition needs:

OpenAPIMCP tool
operationIdtool name
summary + descriptiontool description
parameters + request body schemainput JSON Schema
response schemaoutput shape
securitySchemesauth binding

Walk the paths, emit a tool per operation, and you have a working server. GraphQL maps similarly, with queries and mutations standing in for operations.

Where naive generation goes wrong

If you stop at the mechanical translation, you get a server that is technically correct and unpleasant to use.

Too many tools

A large API can have 400 operations. Emitting 400 tools produces a connector no agent can navigate. The fix is selection: generate everything, then expose the operations that represent real tasks and leave the rest addressable but unranked.

Descriptions written for humans

summary: Updates the resource

A model reading that learns nothing. Tool descriptions are prompt text: they are the entire basis on which the model decides whether to call this tool. They need to say what the operation does, when to use it, and what it affects.

Unbounded parameters

An endpoint that accepts a free-form filter string is a bug waiting to happen when the caller is a language model. Enums, ranges and required fields need to be tight, and additionalProperties: false is your friend.

Idempotency and blast radius

DELETE /v1/customers/{id} generates as cleanly as GET /v1/customers. They should not be equally reachable. Destructive operations deserve explicit opt-in, and ideally a confirmation step, before an autonomous caller can reach them.

What we generate, and what we ask you to review

The converter produces the full tool set from your schema, infers auth from securitySchemes, and flags three things for a human:

  1. 1Descriptions it judged too thin to be useful, with a suggested rewrite.
  2. 2Destructive operations: off by default, enabled deliberately.
  3. 3Loose parameter schemas: where narrowing a type would remove a whole class of bad call.

Ten minutes of review on a generated connector is the difference between an agent that uses your internal API correctly and one that uses it enthusiastically in the wrong direction.

Give every agent one endpoint

Connect your apps once, mint a scoped key, and point Claude, Codex, Cursor or your own runtime at a single MCP server.

No credit card required · Free tier available · Self-host on request