What is OpenAPI Slice MCP?
OpenAPI Slice MCP is a Model Context Protocol server that extracts only the relevant portions of large OpenAPI specifications for specific endpoints. It helps developers and LLMs work with large specs by reducing context size through automatic dependency resolution, supporting both local files and remote URLs.
How to use OpenAPI Slice MCP?
Run the server with uvx openapi-slice-mcp. It communicates via STDIO and provides tools to load specs (from file or URL), list endpoints, extract endpoint slices, and check server status.
Key features of OpenAPI Slice MCP
- Endpoint-specific extraction with automatic dependency resolution
- Supports local YAML/JSON files and remote URLs (HTTP/HTTPS)
- Output in YAML or JSON format
- Discovery tool to list all endpoints in a loaded spec
- Recursively includes all referenced components (schemas, parameters, etc.)
Use cases of OpenAPI Slice MCP
- Extracting a minimal spec for a single API endpoint to fit within LLM context limits
- Reducing token usage when sending OpenAPI definitions to AI assistants
- Isolating endpoint definitions for testing or documentation generation
コメント