> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mitu.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mitu.ai/_mcp/server.

# OpenAPI import

If your API already has an OpenAPI document, you can use it as the starting point for your MCP configuration instead of creating every endpoint and schema manually. Mitu reads the operations in the document and creates endpoint definitions using the routing, descriptions and schemas that are already available.

Importing is a starting point rather than an automatic publishing step. An OpenAPI document describes an API for developers, while an MCP tool definition also needs to help an AI model decide whether and when an operation should be called.

## What can be imported

The importer can derive much of the technical contract directly from the OpenAPI operation.

| MCP field       | OpenAPI source                                       |
| --------------- | ---------------------------------------------------- |
| `path`          | Operation path                                       |
| `method`        | HTTP operation                                       |
| `name`          | Operation identifier or available operation metadata |
| `description`   | Operation description                                |
| `input_schema`  | Parameters and request body                          |
| `output_schema` | Response schema                                      |

Review each imported endpoint before making it available to AI clients. The imported technical shape may be correct even when the resulting tool name or description needs to be made clearer for an agent.

## Add agent-specific guidance

Some MCP configuration cannot be derived reliably from an OpenAPI specification. In particular, your OpenAPI document does not normally explain the circumstances in which an AI model should choose one operation over another.

Add `when_to_use` guidance to the endpoints where sequencing or context matters. For example, a `create_booking` operation might explain that it should only be used after the customer has confirmed the location, date, time and party size.

Pricing also needs to be reviewed separately. Decide which imported operations should remain free and configure the appropriate pricing model for operations the agent should pay to use.

See [Endpoints](/platform/mcp/endpoints) for writing tool descriptions and [Pricing](/platform/payments/pricing) for paid operations.

## Review what should be published

An API specification often contains more operations than an AI agent should have access to. Internal administration endpoints, maintenance operations and routes intended only for other backend services may all be valid parts of your OpenAPI document without being appropriate MCP tools.

Review the imported set and keep only the operations that serve a meaningful customer or agent workflow. For each endpoint you keep, confirm its authentication requirements, description, usage guidance, schemas and pricing before making it available.

A focused set of well-defined tools is easier for an AI model to use correctly than a large collection of overlapping or irrelevant operations.

## Keep OpenAPI and MCP aligned

If OpenAPI is the source of truth for your API contract, keep it current as request and response shapes change. Revisit the corresponding MCP endpoints when those changes affect tool arguments, output schemas or behaviour an AI agent needs to understand.

The imported schema can describe the technical contract, while the MCP-specific fields provide the additional context needed for good tool selection.

## Related

#### [Endpoints](/platform/mcp/endpoints)

Review and configure imported operations.

#### [Tool schemas](/platform/mcp/tool-schemas)

Understand how request and response schemas are presented to AI agents.

#### [Pricing](/platform/payments/pricing)

Configure pricing for imported operations.