# mcp-server-any-openapi

> MCP Server

This repository provides a scalable solution for OpenAPI endpoint discovery and API requests, utilizing in-memory semantic search and a FastAPI server to efficiently serve API documentation to MCP clients.

## Overview

- **Category:** Developer Tools
- **Language:** Python
- **Stars:** 82
- **Forks:** 1
- **Owner:** baryhuang
- **GitHub:** https://github.com/baryhuang/mcp-server-any-openapi
- **Created:** 2025-02-09T04:12:26+00:00
- **Updated:** 2025-03-28T22:07:33+00:00
- **Source:** https://model-context-protocol.com/servers/openapi-endpoint-discovery-api-requests-server

## Setup

## Setup

**Installing via Smithery:**
```bash
npx -y @smithery/cli install @baryhuang/mcp-server-any-openapi --client claude
```

**Using pip:**
```bash
pip install mcp-server-any-openapi
```

**Docker - Option 1: Use Prebuilt Image (Docker Hub):**
```bash
docker pull buryhuang/mcp-server-any-openapi:latest
```

**Docker - Option 2: Local Development Build:**
```bash
docker build -t mcp-server-any-openapi .
```

**Running the Container:**
```bash
docker run \
  -e OPENAPI_JSON_DOCS_URL=https://api.example.com/openapi.json \
  -e MCP_API_PREFIX=finance \
  buryhuang/mcp-server-any-openapi:latest
```

**Running from Source:**
```bash
python -m mcp_server_any_openapi
```

**Integration with Claude Desktop:**
Configure the MCP server in your Claude Desktop settings as shown in the example configuration.

## Tools

## Available Tools

1.  Use remote openapi json file as source, no local file system access, no updating required for API changes.
2.  Semantic search using optimized MiniLM-L3 model (43MB vs original 90MB).
3.  FastAPI-based server with async support.
4.  Endpoint based chunking OpenAPI specs (handles 100KB+ documents), no loss of endpoint context.
5.  In-memory FAISS vector search for instant endpoint discovery.
6.  `{prefix}_api_request_schema`: Get API endpoint schemas that match your intent.
7.  `{prefix}_make_request`: Essential for reliable execution with complex APIs where simplified implementations fail.
