# Neurouter and FastMCP's OpenAPI integration

> FastMCP can generate an MCP server from an OpenAPI spec inside your Python code. How that compares with Neurouter's compiled, governed and measured approach.

Source: https://neurouter.com/compare/fastmcp-openapi · Last updated: 2026-11-26

[FastMCP](https://gofastmcp.com) is a Python framework for building MCP servers. Its OpenAPI integration generates an MCP server from an OpenAPI spec. Sources: FastMCP documentation, [OpenAPI integration](https://gofastmcp.com/integrations/openapi), checked 2026-11-26.

## What FastMCP's OpenAPI integration does

According to its documentation:

- `FastMCP.from_openapi()` takes a spec and an HTTP client and generates tools, resources and resource templates. By default every endpoint becomes a tool.
- **Route maps** decide what each route becomes: they match on HTTP methods, a path pattern and tags, and can map a route to a tool, a resource, a resource template, or exclude it. A `route_map_fn` can override the decision per route.
- **Names** come from the `operationId` (with fallbacks), are slugified and limited to 56 characters, and can be set with `mcp_names`. Components, including descriptions and tags, can be changed in code with `mcp_component_fn`.
- **Authentication** is configured on the HTTP client you pass in, for example an Authorization header. Some client headers are forwarded to the API, with `Authorization`, `Cookie`, `Host` and MCP transport headers excluded.
- The documentation itself recommends curation: it notes that LLMs perform significantly better with well-designed, curated MCP servers than with auto-converted ones, and positions the OpenAPI integration for bootstrapping and prototyping.

The OpenAPI integration page does not describe evaluation, an audit log or code execution. It filters which operations are exposed with route maps but doesn't describe a read-only enforcement mode.

## How the approaches differ

| | FastMCP OpenAPI integration | Neurouter (v0.1 design) |
|---|---|---|
| What it is | A Python library; you write and run the server | A self-hosted server and console; you configure it |
| Spec formats | OpenAPI | OpenAPI 3.x and GraphQL ([docs](https://neurouter.com/docs/importing-specs)) |
| Choosing what's exposed | Route maps and `route_map_fn` in code | Overlay YAML: hide by operation or tag, pin, profiles ([docs](https://neurouter.com/docs/overlays)) |
| Renaming and descriptions | `mcp_names`, `mcp_component_fn` in code | Overlay YAML, kept across re-imports ([docs](https://neurouter.com/docs/overlays)) |
| Response shaping | Not described on the integration page | `include`/`exclude`, `maxItems`, `maxBytes`, `redact` ([docs](https://neurouter.com/docs/overlays#response-shaping)) |
| Credentials | On the HTTP client you construct | Per environment, by reference; never visible to agents ([docs](https://neurouter.com/docs/environments#credentials)) |
| Writes | Exclude routes via route maps | Read-only by default, per-tool switches, prod confirmation ([docs](https://neurouter.com/docs/environments)) |
| Measuring agent success | Not described on the integration page | Generated evals and a readiness score ([docs](https://neurouter.com/docs/evals)) |
| Code execution | Not described on the integration page | Governed code mode ([docs](https://neurouter.com/docs/code-mode)) |
| Audit | Not described on the integration page | Hash-chained audit log ([docs](https://neurouter.com/docs/observability)) |

"Not described on the integration page" means exactly that: FastMCP is a framework, and you can build many of these things yourself in Python. The difference is whether you write them or configure them.

## When to choose which

- **Choose FastMCP** when you want an MCP server in your own Python code, with full control, and you're happy to build curation, safety and testing around it.
- **Choose Neurouter** when you want a governed server for an existing API without writing one, with environments, policy, audit and a score for how well agents do, and curation in a file that survives spec updates.
