swag2mcp

<p>
<a href="https://github.com/mmadfox/swag2mcp/releases"><img src="https://img.shields.io/github/release/mmadfox/swag2mcp.svg" alt="Latest Release"></a>
<a href="https://coveralls.io/github/mmadfox/swag2mcp?branch=main"><img src="https://coveralls.io/repos/github/mmadfox/swag2mcp/badge.svg?branch=main&v=3" alt="Coverage Status"></a>
<a href="https://glama.ai/mcp/servers/mmadfox/swag2mcp"><img src="https://glama.ai/mcp/servers/mmadfox/swag2mcp/badges/score.svg" alt="swag2mcp MCP server"></a>
</p>
**swag2mcp** is a local-first bridge between OpenAPI/Swagger/Postman API specifications and LLM agents via the Model Context Protocol (MCP).
Not every API speaks MCP — private endpoints, internal services, legacy systems, and third-party APIs rarely do. swag2mcp wraps any REST API in an MCP interface, giving LLM agents instant access to your entire API surface without modifying a single line of server code. Through live API calls, the LLM gains real-world knowledge to make informed decisions, automate workflows, and act on your data — not just guess.
- **16 MCP tools** for discovering, inspecting, and invoking APIs
- **Interactive TUI explorer** with full-text search
- **Zero integration code** — just point to your specs and go
---
- <a href="https://mmadfox.github.io/swag2mcp/getting-started/installation" target="_blank" rel="noopener noreferrer">Installation</a>
- <a href="https://mmadfox.github.io/swag2mcp/getting-started/quickstart" target="_blank" rel="noopener noreferrer">Quickstart</a>
- <a href="https://mmadfox.github.io/swag2mcp" target="_blank" rel="noopener noreferrer">Documentation</a>
---
<p style="font-size:1.2em;font-weight:bold">🎬 <a href="https://swag2mcp.io/concepts/example" target="_blank" rel="noopener noreferrer">Live session</a></p>
---
## Quick Start
### Install
**macOS (Homebrew):**
```bash
brew install mmadfox/tap/swag2mcp
```
**macOS / Linux (one-liner):**
```bash
curl -fsSL https://swag2mcp.io/install.sh | bash
```
**Windows (Scoop):**
```powershell
scoop bucket add mmadfox https://github.com/mmadfox/scoop-bucket
scoop install mmadfox/swag2mcp
```
**All platforms (go install):**
```bash
go install github.com/mmadfox/swag2mcp/cmd/swag2mcp@latest
```
**All platforms (Docker):**
```bash
docker pull ghcr.io/mmadfox/swag2mcp:latest
docker run --rm -i -v ~/.swag2mcp:/home/nonroot/.swag2mcp ghcr.io/mmadfox/swag2mcp:latest mcp
```
> For detailed installation instructions, see [Installation](https://mmadfox.github.io/swag2mcp/getting-started/installation).
TDQS
Scored across 19 tools
Each tool targets a distinct entity (spec, collection, tag, endpoint) and scope (list, get, by_spec, by_tag, etc.) or a distinct action (search, inspect, invoke, info, response_*). The response_* tools are clearly differentiated: outline for structure, slice for extraction, filter for search/pagination, and compress for size reduction. Even the similar endpoint_by_id vs inspect are explicitly separated by 'quick summary' vs 'full technical details'.
The naming follows a strong `resource_by_scope` pattern (e.g., endpoint_by_tag, collection_by_spec, tag_by_id) and consistent action verbs (search, invoke, info). The response_* prefix is uniform. Minor deviations: `spec_list` doesn't follow the `*_by_*` pattern, and `inspect` is an exception to the endpoint detail retrieval naming compared to `endpoint_by_id`.
With 19 tools, this is slightly above the 'well-scoped' range (3–15) and in the 'heavy' band, but the count is justified by the domain: the spec-collection-tag-endpoint hierarchy yields 11 navigation tools, plus essential action tools (search, inspect, invoke, info) and 4 dedicated response-handling tools for large payloads. Each tool earns its place, though scope-combining could reduce redundancy.
The hierarchical navigation is complete: list and get for spec, collection, tag, and endpoint; search for discovery; inspect for full schemas; invoke for execution; and a full response post-processing pipeline (outline → slice/filter/compress). The only notable gap is the absence of a tool to export the raw OpenAPI specification document, but that is not essential for the stated purpose of discovering, inspecting, and invoking endpoints.