Openapi To Tools
БесплатноНе проверенA tool to create MCP compliant tools from an OpenAPI Spec
Описание
A tool to create MCP compliant tools from an OpenAPI Spec
README
npm version code style: prettier
OpenAPI to Tools
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
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 <input_file_path> [-o <output_file_path>]
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: [
{
text: 'Hello, world!',
type: 'text',
},
],
}));
// Add the API tools (generated with CLI or using the library)
addAPIToolsPlugin(server, apiTools);
// Start receiving messages on stdin and sending messages on stdout
const transport = new StdioServerTransport();
await server.connect(transport);
Contributing
These instructions will be updated soon.
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests to us.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Add your changes:
git add . - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :sunglasses:
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
Currently, this is unlicensed and requires explicit permission to use. In the future, we will open up this license.
Установить Openapi To Tools в Claude Desktop, Claude Code, Cursor
unyly install openapi-to-toolsСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add openapi-to-tools -- npx -y @buildwithlayer/openapi-to-toolsFAQ
Openapi To Tools MCP бесплатный?
Да, Openapi To Tools MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Openapi To Tools?
Нет, Openapi To Tools работает без API-ключей и переменных окружения.
Openapi To Tools — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Openapi To Tools в Claude Desktop, Claude Code или Cursor?
Открой Openapi To Tools на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Openapi To Tools with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
