swag2mcp

package module
v0.1.0-beta.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

README

swag2mcp

Latest Release Coverage Status

swag2mcp is a local-first bridge between OpenAPI/Swagger/Postman API specifications and LLM agents via the Model Context Protocol (MCP).

  • 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


Quick Start

Install

macOS / Linux (one-liner):

curl -fsSL https://raw.githubusercontent.com/mmadfox/swag2mcp/main/scripts/install.sh | bash

Windows (Scoop):

scoop bucket add mmadfox https://github.com/mmadfox/scoop-bucket
scoop install mmadfox/swag2mcp

All platforms (go install):

go install github.com/mmadfox/swag2mcp/cmd/swag2mcp@latest

All platforms (Docker):

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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
swag2mcp command
swag2mcp-mock command
internal
auth
Package auth provides authentication methods for API specifications.
Package auth provides authentication methods for API specifications.
cache
Package cache provides disk-based caching for downloaded OpenAPI/Swagger spec files.
Package cache provides disk-based caching for downloaded OpenAPI/Swagger spec files.
config
Package config provides YAML-based configuration loading, validation, and filtering.
Package config provides YAML-based configuration loading, validation, and filtering.
env
Package env provides environment variable resolution for $(VAR_NAME) patterns and tilde expansion for file paths.
Package env provides environment variable resolution for $(VAR_NAME) patterns and tilde expansion for file paths.
httpclient
Package httpclient provides a configurable HTTP client with support for proxy, cookies, headers, redirects, timeouts, and response size limits.
Package httpclient provides a configurable HTTP client with support for proxy, cookies, headers, redirects, timeouts, and response size limits.
id
Package id provides deterministic MD5-based ID generation for specs, collections, tags, and endpoints.
Package id provides deterministic MD5-based ID generation for specs, collections, tags, and endpoints.
index
Package index provides a full-text search index for API endpoints using the bluge library.
Package index provides a full-text search index for API endpoints using the bluge library.
model
Package model defines the core domain types used across the application: Spec, Collection, Tag, Endpoint, and HTTPClientConfig.
Package model defines the core domain types used across the application: Spec, Collection, Tag, Endpoint, and HTTPClientConfig.
ratelimit
Package ratelimit provides a per-endpoint rate limiter for API invoke operations.
Package ratelimit provides a per-endpoint rate limiter for API invoke operations.
reader
Package reader provides streaming and path-based access to large JSON response files stored in the workspace.
Package reader provides streaming and path-based access to large JSON response files stored in the workspace.
server/mockserver
Package mockserver provides mock HTTP servers for API specifications and authentication methods defined in the swag2mcp configuration.
Package mockserver provides mock HTTP servers for API specifications and authentication methods defined in the swag2mcp configuration.
service
Package service implements the core business logic for swag2mcp.
Package service implements the core business logic for swag2mcp.
spec
Package spec provides parsing of OpenAPI v2, OpenAPI v3, and Postman collection specifications.
Package spec provides parsing of OpenAPI v2, OpenAPI v3, and Postman collection specifications.
tui
workspace
Package workspace manages the workspace directory layout for swag2mcp.
Package workspace manages the workspace directory layout for swag2mcp.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL