Skip to main content

OpenAPI Slice MCP Server

An MCP (Model Context Protocol) server that helps you work with large OpenAPI specifications by extracting only the relevant portions for specific endpoints. This is particularly useful when working with LLMs that have context limitations - instead of loading an entire large OpenAPI spec, you can extract just the parts you need for a specific endpoint.

Features

  • Endpoint-specific extraction: Get minimal OpenAPI specs containing only the requested endpoint and its dependencies
  • Automatic dependency resolution: Recursively finds and includes all referenced components (schemas, parameters, etc.)
  • Multiple formats: Output in YAML or JSON format
  • File support: Load OpenAPI specs from local YAML or JSON files
  • Remote support: Fetch OpenAPI specs directly from URLs (HTTP/HTTPS)
  • Discovery tools: List all available endpoints in a loaded specification

Tools

The server provides the following MCP tools:

  • load_openapi_spec(file_path: str) - Load an OpenAPI specification from a local YAML or JSON file
  • load_openapi_spec_from_url(url: str, timeout: int = 30) - Load an OpenAPI specification from a remote URL
  • list_endpoints() - List all available endpoints in the currently loaded specification
  • extract_endpoint_slice(path: str, method: str, output_format: str = "yaml") - Extract a minimal spec slice for a specific endpoint
  • get_server_status() - Get the current status of the server

Usage

Running the Server

Stdio Mode (Default)

For local development and Claude Desktop integration:

uvx openapi-slice-mcp

The server runs using the STDIO transport and can be integrated with any MCP client.

HTTP Mode

For Smithery deployment or remote access:

# Using the dedicated HTTP entry point (runs on port 8000 by default)
uvx openapi-slice-mcp-http

# Or using the main entry point with --transport flag
uvx openapi-slice-mcp --transport http --host 0.0.0.0 --port 8000

The HTTP server exposes the MCP protocol at http://host:port/mcp.

Metadata

Release files for openapi-slice-mcp 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openapi-slice-mcp 0.2.1
File Size Uploaded Provenance
openapi_slice_mcp-0.2.1.tar.gz 6.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for openapi-slice-mcp 0.2.1
File Interpreter ABI Platform
openapi_slice_mcp-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / openapi_slice_mcp-0.2.1.tar.gz

Download URL openapi_slice_mcp-0.2.1.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
575257747e64e7dd3e342fc0b4818fd916e026140f7f1eeb157259e28adc7ea1
BLAKE2b-256 checksum
How to use checksums
3a05699d7decc5e20af7726ca6b1b55316355eb1560ed14761abd4f1c06dc725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2025.

Transparency log

Release files / openapi_slice_mcp-0.2.1-py3-none-any.whl

Download URL openapi_slice_mcp-0.2.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e89d5a4908103e6cd467cfb765b603ef1b68fed11c096c40ef37a832dbd6bcc
BLAKE2b-256 checksum
How to use checksums
1920b1c5ef92274bea5899f066088f876b694df7f7d44d54097cdd98052505b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2025.

Transparency log

Security for openapi-slice-mcp 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for openapi_slice_mcp-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page