MCP.so
ログイン

OpenAPI to MCP Server

@higress-group

OpenAPI to MCP Server について

A tool&lib that can automatically convert OpenAPI documents into Higress remote MCP server configurations.

基本情報

カテゴリ

その他

ライセンス

Apache-2.0

ランタイム

go

トランスポート

stdio

公開者

higress-group

設定

標準の設定はありません

このサーバーの README には解析可能な MCP 設定ブロックが含まれていません。インストール手順はリポジトリをご確認ください。

リポジトリ

ツール

ツールは検出されませんでした

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is OpenAPI to MCP Server?

A command-line tool that converts OpenAPI specifications (JSON or YAML) into MCP (Model Context Protocol) server configurations. It generates tool definitions, parameter mappings, and response templates, making it easy to expose REST APIs as MCP tools.

How to use OpenAPI to MCP Server?

Install via go install github.com/higress-group/openapi-to-mcpserver/cmd/openapi-to-mcp@latest. Then run openapi-to-mcp --input <openapi-file> --output <mcp-config.yaml> with optional flags such as --server-name, --tool-prefix, --format, --validate, and --template to customize the output.

Key features of OpenAPI to MCP Server

  • Converts OpenAPI paths to MCP tools with correct parameter positions
  • Supports JSON and YAML input and output formats
  • Generates response templates with field descriptions for LLM readability
  • Handles path, query, header, cookie, and body parameters automatically
  • Optionally validates OpenAPI specifications before conversion
  • Supports template-based patching for custom headers, auth, and output schemas

Use cases of OpenAPI to MCP Server

  • Quickly generate MCP tool definitions from any OpenAPI‑described API
  • Integrate REST APIs with Higress REST‑to‑MCP gateway configuration
  • Automate creation of consistent MCP server configurations for multiple APIs
  • Add global authentication headers or default output schemas via template patching

FAQ from OpenAPI to MCP Server

What input formats does the tool support?

It accepts OpenAPI specifications in both JSON and YAML formats.

Can I customize the server name or tool prefix?

Yes. Use the --server-name flag to set the server name (default: openapi-server) and --tool-prefix to add a prefix to all generated tool names.

How are security schemes from OpenAPI handled?

Security schemes defined in components.securitySchemes are converted to a list under server.securitySchemes in the MCP configuration. The tool also supports x-defaultCredential for MCP‑specific default credentials.

How can I add global headers or authentication to all tools?

Use the --template flag to provide a YAML file that patches the generated configuration. Example: adding an Authorization header or an apiKey config field to every tool.

Does the tool require any runtime dependencies?

No runtime dependencies beyond the compiled binary. Installation requires Go, but the produced MCP configuration can be used with any compatible MCP server (e.g., Higress).

コメント

「その他」の他のコンテンツ