APICP — Turn Any OpenAPI Spec Into an MCP Server | Diaphora
Any API to MCP, in minutes.
APICP turns any OpenAPI spec into a focused MCP server in minutes — the right operations exposed, auth handled, responses cleaned. Then your Frags blueprints call it like any other tool. No bespoke MCP server to build or maintain.
apicp.yaml
context: {}
server:
url: https://api.example.com/v2
mappers:
- name: searchPlans
description: Search for blueprints by partial name match.
values:
- path: header.Authorization
value: "Bearer {{ .token }}"
inputSchema:
search:
path: query.search
description: Partial blueprint name to search for.
outputTransformer: "[*].{id: id, name: name}"
Why it exists
API access that matches how agent workflows actually run.
Most OpenAPI specs are written for client libraries and human developers. APICP makes the same APIs legible to models by narrowing scope, stabilizing inputs, and cleaning responses before they enter context.
Select the operations worth exposing
Define one mapper per MCP tool so the model sees a small, intentional API surface instead of an entire OpenAPI catalog.
Shape inputs for the model
Move auth, tenancy, defaults, and server overrides into config while keeping only the right fields in the LLM-facing schema.
Return clean context
Use JMESPath transformers to trim noisy API payloads into the exact fields a workflow needs for reliable downstream reasoning.
How it works
From spec to MCP server in minutes.
APICP is the on-ramp between the APIs you already have and the deterministic blueprints you run on Frags. Bring a spec; leave with a tool your workflows can call.
01
Point it at your OpenAPI spec
Bring any REST API's spec. No SDK to wrap, no bespoke MCP server to write and keep in sync.
02
Map what matters, in YAML
Pick the operations worth exposing, move auth and tenancy into config, and trim noisy responses with JMESPath — all declarative.
03
Frags blueprints call it as a tool
The generated MCP drops straight into your blueprints. Frags calls it like any other tool — deterministic and schema-validated, on your infra or Diaphora cloud.
Config surface
Small primitives, explicit control.
APICP keeps API mapping declarative. You decide which request fields are fixed, which ones the model supplies, and how response data should be shaped before it is handed back to the workflow.
- context: Inbound headers and shared variables
- values: Hardcoded or templated request fields
- server.url: A clean base URL when the spec is wrong
- mappers: The MCP tools APICP exposes
- inputSchema: LLM-facing inputs mapped to request paths
- outputTransformer: JMESPath cleanup before the model sees data