TutorialsMay 8, 20267 min read

Swagger to MCP in under an hour

A step-by-step walkthrough of the LegacyAI pipeline, from spec upload to synced tools.

Key Takeaways

  • A validated swagger.json can become MCP tools quickly.
  • LegacyAI handles schema mapping and tool generation.
  • Read-only defaults keep early pilots safe.
  • Sync tools when the spec changes.

Fast path to MCP

If you already publish swagger.json, you can generate MCP tools in under an hour. The workflow is straightforward: validate, upload, generate, and test.

Step-by-step flow

  1. Export swagger.json from your API or CI.
  2. Validate the spec for missing schemas and auth.
  3. Upload to LegacyAI to generate MCP tools.
  4. Enable read-only mode and review tool catalog.
  5. Register the MCP server in Claude Desktop and test.

Common fixes

  • Add missing request body definitions.
  • Ensure response schemas are typed.
  • Declare security schemes and scopes.

FAQ

Does Swagger 2.0 work?

Yes. LegacyAI supports Swagger 2.0 and OpenAPI 3.x, with normalization for older specs.

How long does generation take?

On average, most specs generate in minutes, but large schemas can take longer.

Do I need to expose the spec publicly?

No. Upload the file directly or generate it in CI.

Can I limit tool access?

Yes. Use read-only mode or disable tools before publishing.

What if my spec changes?

Enable dynamic sync or regenerate tools in CI when the spec updates.

Written by LegacyAI Team · Updated May 2026