OpenAPI to ToolsBLOCK
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://badge.fury.io/js/@buildwithlayer%2Fopenapi-to-tools) [](https://github.com/prettier/prettier)
This is a simple package to convert OpenAPI routes to tools to be used by MCP servers or other LLM applications.
Prerequisites
This project requires NodeJS (version 18 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.
$ npm -v && node -v 10.2.4 v20.11.0
Table of contents
- OpenAPI to Tools
- Prerequisites
- Table of contents
- Installation
- Usage
- CLI
- MCP Server
- Contributing
- Versioning
- License
Installation
BEFORE YOU INSTALL: please read the prerequisites
To install and set up the library, run:
$ npm install @buildwithlayer/openapi-to-tools
Or if you prefer using Yarn:
$ yarn add @buildwithlayer/openapi-to-tools
Usage
CLI
input_file_pathis a path to any valid OpenAPI Spec 3.X.Xoutput_file_pathis a path to a JSON file to write the tools
npx @buildwithlayer/openapi-to-tools [-o ]
MCP Server
import {addAPIToolsPlugin} from '@buildwithlayer/openapi-to-tools/index.js';
import {apiTools} from './tools.json';
const server = new McpServer(
{
name: 'very-cool-server',
version: '1.0.0',
},
{
capabilities: {
tools: {},
},
},
);
// Add any manual tools
server.tool('hello-world', async () => ({
content: [
95eca75f43f6OBSERVED · 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.
claude mcp add openapi-to-tools -- npx -y @buildwithlayer/[email protected]
{
"mcpServers": {
"openapi-to-tools": {
"command": "npx",
"args": [
"-y",
"@buildwithlayer/[email protected]"
]
}
}
}Exposed tools (3)
3 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
test | read | |
test1 | read | |
test2 | read |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| 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
- declared (1 observation(s))
- Shell
- declared (2 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (4)
spec = OpenAPISpec.parse(yaml.load(fileContents));
spec = OpenAPISpec.parse(yaml.load(fileContents));
@buildwithlayer/openapi-zod-spec, @modelcontextprotocol/sdk, ajv, axios, js-yaml, zod, zod-to-json-schema, @eslint/js
Gates applied: no_behavioural_pass, no_license.
95eca75f43f6full audit observations/trust-audit/mcp-server/buildwithlayer__openapi-to-tools.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 | 95eca75f43f6 | BLOCK | D | 69 | first audit |
Questions
What tools does @buildwithlayer/openapi-to-tools expose?
3 in total: 3 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is @buildwithlayer/openapi-to-tools safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 2 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does @buildwithlayer/openapi-to-tools need?
No credential environment variables were found in its source, so it appears to need none.
How current is this page?
The grade is for one exact copy of the source (95eca75f43f6), read on 2026-10-12. The repository is watched and re-audited when it changes.