Installation
This guide will walk you through installing and building openapi-mcp from source.
Prerequisites
Before you begin, ensure you have the following prerequisites:
- Go 1.21 or higher (Download Go)
- Git for cloning the repository
- An OpenAPI 3.x YAML or JSON specification file that you want to expose as MCP tools
Build from Source
To build openapi-mcp from source, follow these steps:
1. Clone the Repository
git clone https://github.com/jedisct1/openapi-mcp.git
cd openapi-mcp
2. Build the Binaries
openapi-mcp uses a Makefile to simplify the build process. To build all binaries, run:
make
This will place the command-line tools in the bin directory:
bin/openapi-mcp- Main tool that processes OpenAPI specs and serves MCPbin/mcp-client- Interactive client for testing MCP tools
To build specific binaries:
# Build only the main tool
make bin/openapi-mcp
# Build only the client
make bin/mcp-client
3. Clean Build Artifacts (Optional)
To clean build artifacts:
make clean
Verifying Installation
To verify that the installation was successful, run:
bin/openapi-mcp --help
You should see the help message with available command-line options.
Using Pre-built Binaries (When Available)
For some platforms, pre-built binaries may be available from the GitHub releases page.
Download the appropriate binary for your platform, extract it, and place it in your PATH.
Go Library Installation
To use openapi-mcp as a Go library in your own applications:
Main Library
For OpenAPI to MCP conversion functionality:
go get github.com/jedisct1/openapi-mcp/pkg/openapi2mcp
MCP Package
For direct access to MCP server functionality:
go get github.com/jedisct1/openapi-mcp/pkg/mcp/server
For MCP types and utilities:
go get github.com/jedisct1/openapi-mcp/pkg/mcp/mcp
See the Library Usage documentation for detailed examples and API reference.
Next Steps
Now that you have installed openapi-mcp, you can:
- Get started with your first OpenAPI spec
- Use openapi-mcp as a Go library
- Learn about authentication options
- Explore configuration options