Skip to main content
Glama

mcp-api-translator

npm CI License: AGPL-3.0 Commercial license available MCP mcp-api-translator MCP server – quality and maintenance score on Glama

An MCP server that generates MCP servers. Give it an API definition — OpenAPI 3.0/3.1 or a Postman collection — and it scaffolds a complete, runnable, ownable TypeScript or Python MCP server for that API.

Curate a spec, aggregate a second one, run the generated server, and let an agent call it

Above: curating Firecrawl's 20 operations down to 6, appending the Gmail API to the same server, then an agent calling the self-hosted result. Counts, tool names and paths come from real runs against the published Firecrawl and Gmail descriptions; the API responses are illustrative — the recording runs against a local stub, not live Firecrawl or Gmail accounts.

Why this and not a 1:1 generator

Turning an OpenAPI spec into MCP "tool stubs" is not novel — FastMCP's from_openapi, Speakeasy/Gram, and several openapi-mcp-generator projects already do the mechanical part. A naive endpoint→tool generator has no real advantage. This project focuses on the parts those tools skip:

1. Curation, not just generation. A 200-endpoint API naively becomes 200 tools, which wrecks a model's tool-selection accuracy and blows out context. analyze_spec previews the tool list before anything is written, every command takes includeTags / methods / pathGlob / excludeOperations, and you get a warning when a server grows past 40 tools.

2. Aggregation via append. extend_mcp_server adds another API's tools to an existing project, so you can build one MCP server spanning Firecrawl + Gmail + your internal API. Credentials stay separate: each API also reads namespaced env vars derived from its title.

3. An artifact you own. Output is a normal project, not a hosted black box — readable per-tool files, env-based auth, a Dockerfile, and a server.json plus client snippets for publishing to the official MCP Registry.

If you only need throwaway, in-memory exposure of one API and don't care about owning the code, FastMCP's runtime mode may suit you better — that's a deliberate non-goal here.

Related MCP server: mcp-anything

Install

No install step. npx fetches and runs the latest published version — cross-platform, Node 20+.

Claude Code

Claude Code does not read claude_desktop_config.json — it keeps its own MCP config:

claude mcp add api-translator -- npx -y mcp-api-translator

That registers it at local scope. Use -s user for all your projects, or commit a project-scoped .mcp.json to share it. Verify with claude mcp list.

Claude Desktop

Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "api-translator": {
      "command": "npx",
      "args": ["-y", "mcp-api-translator"]
    }
  }
}

Cursor — ~/.cursor/mcp.json (or project-scoped .cursor/mcp.json), same mcpServers shape as Claude Desktop above.

Cline (VS Code) — sidebar → MCP Servers → Configure, same shape plus "disabled": false.

Continue.dev — ~/.continue/config.json, under experimental.modelContextProtocolServers, as a { transport: { type: "stdio", command, args } } entry.

Docker (no Node required):

{
  "mcpServers": {
    "api-translator": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "ghcr.io/krishgok/mcp-api-translator:latest"]
    }
  }
}

To read specs from disk or write projects to a host path, mount the directory with -v ${PWD}:/workspace and pass /workspace/... as specPath / outputDir.

MCP config is read at startup, so restart your client — quit and reopen Claude Desktop, Cursor, …, or start a new session in Claude Code.

The four tools

Tool

What it does

analyze_spec

Parse a spec and preview the tools that would be generated — no files written.

generate_mcp_server

Generate a complete MCP-server project into outputDir.

extend_mcp_server

Append another spec's tools to an existing project (idempotent).

list_supported_features

Report supported formats, auth schemes, transports, and limits.

All spec inputs accept inline text (spec) or a local path (specPath), JSON or YAML.

Usage

You don't call the tools by hand — you ask your agent, and it drives them.

1. Preview, then curate. See what a spec becomes before writing anything:

"Analyze ./petstore.yaml and show me the proposed tools." "Only the GET endpoints under /pets."

analyze_spec({ specPath: "./petstore.yaml" });
// → proposed tool list, auth scheme, and the env vars the server will need

analyze_spec({ specPath: "./petstore.yaml", methods: ["GET"], pathGlob: "/pets/**" });
// also: includeTags: ["pets"], excludeOperations: ["deletePet"]

2. Generate, with the same filters plus an output directory:

generate_mcp_server({ specPath: "./petstore.yaml", outputDir: "./petstore-mcp" });
// options: language: "python", transport: "http", auth: {...}, force: true

3. Aggregate — add more APIs to the same server:

// any second API — the sources don't have to share a format or a vendor
extend_mcp_server({
  projectDir: "./petstore-mcp",
  specPath: "./billing.postman.json",
  includeTags: ["invoices"],
});
// idempotent; hand-edited tool files are preserved

Aggregated APIs don't share credentials: each also reads namespaced env vars (<NAMESPACE>_API_BASE_URL, <NAMESPACE>_API_KEY, … — namespace derived from the API title) before falling back to the bare ones. The extend summary and .env.example list the exact names.

4. Run it. The output is a normal project you own:

cd petstore-mcp && npm install && npm run build
cp .env.example .env   # set API_BASE_URL + credentials (never embedded in code)
npm start

Register it with your client using the generated client-config.md, and your agent can call the APIs directly.

Full walkthrough with sample outputs and troubleshooting: docs/usage-workflow.md.

Generate, or serve

  • Generate ownable code when you want a project you can hand-edit, self-host, and own — in TypeScript (default) or Python (language: "python").

  • Serve a live runtime proxy when you just want an API exposed to an agent now, with no generated files to build or maintain:

    mcp-api-translator serve --spec ./api.yaml
    mcp-api-translator serve --spec ./a.yaml --spec ./b.yaml --methods GET,POST   # aggregate

serve runs the same request plan and env-based auth the generator emits, so behavior matches generated output exactly — it just skips the codegen step. It speaks stdio by default, or stateless Streamable HTTP with --transport http --port 3000. Logs are structured JSON lines on stderr in containers, readable text on a TTY (LOG_LEVEL, LOG_FORMAT).

Documentation

Doc

What's in it

usage-workflow.md

End-to-end walkthrough, curation loop, auth setup, troubleshooting.

design.md

Tech stack, generated project layout, limitations, security model.

deploy-serve.md

Docker/compose recipes for serve, logging and observability.

serve-api-proposal.md

Design of the runtime proxy and the roadmap.

market-analysis.md

Why both generate and serve models exist.

CONTRIBUTING.md

Dev setup, PR conventions, DCO sign-off.

Known limits at a glance:

  • Inputs: OpenAPI 3.0/3.1 and Postman v2.1 (Swagger 2.0 best-effort). GraphQL and gRPC aren't supported.

  • Auth: no interactive OAuth consent flow yet for the OpenAPI/Postman APIs it does support; planned as R6.

  • Responses: no upstream streaming or auto-pagination.

  • Output quality tracks spec quality.

Details and the security model: docs/design.md.

Development

npm install
npm test          # unit + integration (parsers, curation, emit, append)
npm run typecheck
npm run build
npm run e2e       # generate a sample project from the fixtures into build/e2e-out

Contributions welcome — see CONTRIBUTING.md. All commits must be signed off under the Developer Certificate of Origin (git commit -s).

License

mcp-api-translator is dual-licensed — © 2026 krishgok. Full details in LICENSING.md.

  • Open source: GNU AGPL-3.0-or-later. Running a modified version as a network service requires offering that version's complete source to its users.

  • Commercial: a separate license is available for embedding in proprietary products without AGPL obligations.

  • Your generated output is yours. Projects produced by this tool are covered by a generated-output exception and are not subject to the AGPL.

Redistributions must retain LICENSE and NOTICE. The licenses do not grant the right to use the "mcp-api-translator" name to endorse or promote forked or derivative works without prior written permission.

Available Tools

4 tools
analyze_specAnalyze API spec (preview)A

Parse an OpenAPI or Postman spec and preview the MCP tools that would be generated, without writing any files. Use this to curate (filter/inspect) before generating.

NameRequiredDescriptionDefault
specNoInline spec text (OpenAPI or Postman; JSON or YAML).
formatNoForce a format; defaults to auto-detect.
methodsNoKeep only these HTTP methods, e.g. [GET, POST].
pathGlobNoKeep only matching paths, e.g. "/v1/**".
specPathNoPath to a local spec file (JSON or YAML).
includeTagsNoKeep only operations with these tags.
excludeOperationsNoDrop operations by operationId, tool name, or tag.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and it delivers the single most important trait: this is a read-only preview that writes no files, which is exactly the side-effect information an agent needs before calling. It still omits auth/credential needs and error behavior on invalid specs, keeping it below 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler, and the core guarantee ('without writing any files') plus the intended use are front-loaded before any elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-param, all-optional tool with no output schema and no annotations, the description covers purpose, the non-destructive guarantee, and the intended workflow. It would be stronger if it sketched the preview's return shape, since no output schema exists to do so.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and all 7 parameters carry inline descriptions, so the schema does the heavy lifting. The description only hints at filtering via 'curate (filter/inspect)' without adding syntax or semantics beyond what the schema already documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Parse') plus resource ('OpenAPI or Postman spec') and the output ('preview the MCP tools that would be generated'). The clause 'without writing any files' implicitly distinguishes it from generate_mcp_server, so an agent can route correctly without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use this to curate (filter/inspect) before generating' gives a clear usage context and implies the workflow with generate_mcp_server. It does not name the alternative explicitly or state exclusions, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

extend_mcp_serverExtend an existing generated MCP serverA

Append the operations from another spec to an already-generated project (identified by its .mcp-translator.json manifest). Idempotent: operations already present are skipped, and hand-edited tool files are preserved unless force is set. Enables aggregating multiple APIs into one MCP server.

NameRequiredDescriptionDefault
authNoAuth to use when the spec declares no security schemes of its own. Applied only to operations whose own security list is empty; credentials are read from env vars as usual.
specNoInline spec text (OpenAPI or Postman; JSON or YAML).
forceNoOverwrite existing tool files of the same name.
formatNoForce a format; defaults to auto-detect.
methodsNoKeep only these HTTP methods, e.g. [GET, POST].
pathGlobNoKeep only matching paths, e.g. "/v1/**".
specPathNoPath to a local spec file (JSON or YAML).
projectDirYesPath to an existing generated project.
includeTagsNoKeep only operations with these tags.
toolCatalogNoAlso write tool-catalog.json; defaults to refreshing it if the project has one.
excludeOperationsNoDrop operations by operationId, tool name, or tag.

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses idempotency, that already-present operations are skipped, and that hand-edited tool files are preserved unless force is set. It omits the return/report shape and any permission or failure behavior, but the core mutation semantics are unusually well covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the action and precondition, then the idempotency guarantees. The final sentence is mild rationale but is short and doubles as usage context, so nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter mutation tool with no annotations and no output schema, the description covers purpose, preconditions, and the key destructive/preservation behavior. It stops short of describing what the call returns or how partial failures are reported, which is the main remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema by tying projectDir to the .mcp-translator.json manifest and clarifying that force overwrites hand-edited files specifically, which the schema's generic 'Overwrite existing tool files' does not convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (append) and resource (operations from another spec) and scopes it to 'an already-generated project (identified by its .mcp-translator.json manifest)', which cleanly separates it from the sibling generate_mcp_server that creates new projects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The closing sentence 'Enables aggregating multiple APIs into one MCP server' implies the intended scenario, and the existing-project precondition is stated. However, no alternative is named and no when-not condition is given (e.g. 'use generate_mcp_server for a fresh project'), so usage must be inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_mcp_serverGenerate MCP serverB

Generate a complete, runnable TypeScript MCP server project from an OpenAPI or Postman spec. Writes the project to outputDir. Use force to overwrite a non-empty directory.

NameRequiredDescriptionDefault
authNoAuth to use when the spec declares no security schemes of its own. Applied only to operations whose own security list is empty; credentials are read from env vars as usual.
specNoInline spec text (OpenAPI or Postman; JSON or YAML).
forceNoOverwrite a non-empty / existing project.
formatNoForce a format; defaults to auto-detect.
methodsNoKeep only these HTTP methods, e.g. [GET, POST].
languageNoOutput language. Defaults to typescript.
pathGlobNoKeep only matching paths, e.g. "/v1/**".
specPathNoPath to a local spec file (JSON or YAML).
outputDirYesDirectory to write the generated project into.
transportNoTransport(s) to generate (TypeScript only). Defaults to stdio.
serverNameNonpm/package name; defaults from the API title.
includeTagsNoKeep only operations with these tags.
toolCatalogNoAlso write tool-catalog.json (name/summary/tags per tool) for discovery layers.
pythonVariantNoPython server flavor (requires language: python): the low-level MCP SDK (default) or FastMCP. Both serve the same raw JSON-Schema tool inputs.
serverVersionNo
excludeOperationsNoDrop operations by operationId, tool name, or tag.

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It does disclose two useful behavioral facts: the tool writes files to outputDir and will refuse/require force for a non-empty directory, which signals destructiveness. But it omits permissions, network access, whether generation is deterministic, and what is actually produced.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight, front-loaded sentences with no filler; the core action comes first and the force caveat last. It is efficient, though arguably undersized for a 16-parameter generator, and the 'TypeScript' framing wastes a few words on an inaccuracy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex 16-parameter generator with no output schema, the description is thin: it never says what artifacts land in outputDir or how spec/specPath/methods/pathGlob interact with a spec that has no security schemes. Low parameter count relative to schema richness is not the issue here; the missing behavioral context is.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 94% across 16 parameters, so the schema already documents nearly everything and the baseline is 3. The description reinforces only outputDir and force and adds no meaning for the higher-leverage options (spec vs specPath, auth, transport, language, pythonVariant).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb+resource ('Generate a complete, runnable ... MCP server project') plus the accepted input formats (OpenAPI or Postman), which is enough to separate it from siblings like extend_mcp_server and analyze_spec. However, it hardcodes 'TypeScript' even though the schema supports language: python, so the stated scope contradicts the tool's actual capability.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The only usage rule given is 'Use force to overwrite a non-empty directory,' which is really a parameter hint rather than when-to-use guidance. Nothing tells the agent when to pick this over analyze_spec (inspect first) or extend_mcp_server (modify an existing project), leaving the sibling routing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_supported_featuresList supported featuresA

Report the input formats, auth schemes, transports, and limits this tool supports.

NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It does disclose the categories of information returned, which is real content rather than tautology, but it says nothing about side-effect freedom, whether the answer is static or environment-dependent, or how the result is structured (and there is no output schema to fall back on).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler; every clause names a distinct category of supported capability. Appropriate size for a zero-argument tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a no-parameter, no-annotation, no-output-schema informational tool, the sentence effectively doubles as a return-value summary, which is largely sufficient. It could be tightened only by stating when to call it relative to the spec-analysis and server-generation siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so the baseline is 4; the schema is empty and there is nothing further for the description to clarify.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Report) and a concrete resource set (input formats, auth schemes, transports, limits), so an agent knows this is a capability/introspection tool. It does not, however, differentiate itself from the sibling tools (analyze_spec, generate_mcp_server, extend_mcp_server), leaving the boundary between 'report capabilities' and 'analyze a spec' to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can guess this is the tool to call to discover what the server supports, but there is no explicit trigger, no ordering guidance (e.g., call before generate_mcp_server), and no statement of when a sibling is the better choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.4.1
    • First observedanalyze_spec
    • First observedextend_mcp_server
    • First observedgenerate_mcp_server
    • First observedlist_supported_features

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: analyze_spec previews without writing, generate_mcp_server creates a new project, extend_mcp_server appends to an existing one, and list_supported_features reports capabilities. There is no overlap in verbs or intended outcomes, so an agent can easily select the right tool.

Naming Consistency5/5

All four names follow a strict verb_noun snake_case convention. The generate_mcp_server / extend_mcp_server pair even shares a consistent resource suffix, reinforcing the pattern.

Tool Count5/5

Four tools is well-scoped for a spec-to-MCP-server translator: preview, generate, extend, and capability reporting. Each tool is substantive and earns its place with no redundancy.

Completeness4/5

The lifecycle is largely covered: inspect a spec, generate a project, aggregate additional specs, and query supported features. Minor gaps exist around updating or regenerating an existing project from a changed spec and removing operations, but agents can work around these via force-based regeneration.

Maintenance

ActivityMaintained
ResponsivenessResponsive

Related MCP Connectors

Related MCP Servers