I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

openapi2mcptools
Spécifications OpenAPI => MCP (Protocole de contexte du modèle)
1
Github Watches
3
Github Forks
12
Github Stars
OPENAPI Specifications => MCP (Model Context Protocol) Tools
- 🔧 An utility library for converting OpenAPI specifications to MCP tools.
- 🚀 Faster the development of MCP servers based on OPENAPI specifications.
Usage
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import {
CallToolRequestSchema,
ListToolsRequestSchema,
} from '@modelcontextprotocol/sdk/types.js';
import { Converter } from 'openapi2mcptools';
const converter = new Converter({
baseURL, // optional
httpClient // optional
});
await converter.load({
// specs
});
const tools = converter.getToolsList();
const toolCaller = converter.getToolsCaller();
const server = new Server(
{
name: 'mcp-server-openapi',
version: '1.0.0',
},
{
capabilities: {
tools: {},
},
},
);
// Define available tools
server.setRequestHandler(ListToolsRequestSchema, async () => {
return {
tools,
};
});
// Handle tool execution
server.setRequestHandler(CallToolRequestSchema, async (request) => {
return await toolCaller(request);
});
const transport = new StdioServerTransport();
await server.connect(transport);
Custom client
Set baseURL
, headers
, etc for http client.
export type RequestConfig = {
url?: string;
method?: string;
headers?: any;
params?: any;
data?: any;
}
export interface HTTPClient {
request: (requestConfig: RequestConfig) => Promise<{ data: any }>;
}
Example:
import axios from axios;
import { Converter } from 'openapi2mcptools';
const converter = new Converter({
httpClient: axios
});
相关推荐
Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.
This GPT assists in finding a top-rated business CPA - local or virtual. We account for their qualifications, experience, testimonials and reviews. Business operators provide a short description of your business, services wanted, and city or state.
I find academic articles and books for research and literature reviews.
Professional Flask/SQLAlchemy code guide. Follow: https://x.com/navid_re
Confidential guide on numerology and astrology, based of GG33 Public information
Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.
Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX
Une passerelle API unifiée pour intégrer plusieurs API d'explorateur de blockchain de type étherscan avec la prise en charge du protocole de contexte modèle (MCP) pour les assistants d'IA.
Reviews

user_hvqHmsKD
As a dedicated MCP application user, I highly recommend the MCP-Recon-Server by seyrup1987. This server has significantly improved my experience by providing reliable and high-performance resources for my projects. The installation was straightforward, and the user interface is intuitive. Excellent product overall!