⚡ Model Context Protocol · Open Source · Local-First

Turn any API
into an AI tool
in seconds.

MCPForge auto-generates Model Context Protocol (MCP) servers from OpenAPI specs. Connect Claude Desktop, Cursor, or any AI tool to any API — instantly.

Install MCPForge → View on GitHub
terminal — mcpforge
# Generate an MCP server from the GitHub API spec
$ mcpforge generate https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json
Fetching OpenAPI spec...
Parsed 847 endpoints — selecting top tools
Enhancing descriptions with local AI...
Generated 24 MCP tools
Validated server — syntax OK
→ Written: github_mcp.py (32 tools, ready to run)
# Add to Claude Desktop — it now knows your API!
$ python github_mcp.py
MCP server running — connected to Claude Desktop

Three steps. Zero boilerplate.

MCPForge handles all the plumbing so you can focus on building.

01
Point at your API spec
Pass an OpenAPI URL, Swagger file, or YAML spec. MCPForge fetches and parses it automatically — local or remote.
02
AI understands the API
Uses your local Ollama model to analyze endpoints, generate human-friendly descriptions, and identify the most useful tools to expose.
03
Run your MCP server
Get a single, self-contained Python file. Run it with python my_server.py. Point Claude Desktop or Cursor at it. Done.

Everything you need to
build AI-ready tools

📄
OpenAPI → MCP in one command
Parse OpenAPI 3.0 and Swagger 2.0 specs. Every endpoint becomes an MCP tool with proper type hints, param validation, and docstrings.
🦙
AI-enhanced descriptions
Ollama models read your API docs and write developer-friendly tool descriptions. Better descriptions = better AI behavior. No cloud required.
🔑
Auth handled automatically
Detects Bearer tokens, API keys, and Basic auth. Injects them from environment variables so secrets never appear in your code.
Built-in validation
Every generated server is syntax-checked and structure-validated before being written to disk. No broken files, ever.
🌐
Web UI included
Paste a spec URL, click generate, copy the result. The web UI lets non-CLI users generate MCP servers with zero friction.
📦
Ready-to-use examples
GitHub, Weather, and Calculator MCP servers included. Run mcpforge demo github to see a working MCP server in 10 seconds.
🔌
Works with every MCP client
Claude Desktop, Cursor, Zed, and any MCP-compatible tool. The output is standard MCP — no lock-in, no proprietary formats.
Zero config start
Works offline with local Ollama models. No API keys needed for the generator itself. Ollama enhancement is opt-in.

See it in action

MCPForge ships with working examples you can run immediately.

🐙 GitHub API
Search repos, manage issues, view code — all from your AI assistant.
list_repos search_repos get_repo list_issues
🌤 Weather API
Get current weather and forecasts for any city — no API key needed.
get_weather get_forecast
🧮 Calculator
A simple math MCP server — perfect for testing your MCP client setup.
add subtract multiply calculate
bash
# Run the GitHub MCP example immediately
$ mcpforge demo github
# Or generate your own from any OpenAPI spec
$ mcpforge generate https://petstore.swagger.io/v2/swagger.json --output petstore_mcp.py
$ python petstore_mcp.py

Clean, readable, production-ready

MCPForge generates Python you'd actually write yourself — with proper types, docstrings, and error handling.

python — github_mcp.py (auto-generated)
#!/usr/bin/env python3
"""MCP server for GitHub API — auto-generated by MCPForge"""
import os
import httpx
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("GitHub API")
BASE_URL = "https://api.github.com"
GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN", "")
@mcp.tool()
def list_repos(owner: str, per_page: int = 30) -> dict:
    """List public repositories for a GitHub user."""
    headers = {"Authorization": f"Bearer {GITHUB_TOKEN}"} if GITHUB_TOKEN else {}
    resp = httpx.get(f"{BASE_URL}/users/{owner}/repos", params={"per_page": per_page}, headers=headers)
    resp.raise_for_status()
    return resp.json()
# ... 23 more tools generated ...
if __name__ == "__main__":
    mcp.run()

Up and running in 30 seconds

bash
# Install
$ pip install mcpforge
# Generate your first MCP server
$ mcpforge generate https://petstore.swagger.io/v2/swagger.json
# Generate + print Claude Desktop config in one step
$ mcpforge generate https://petstore.swagger.io/v2/swagger.json --claude-config
# Run it
$ python petstore_mcp.py

Add to Claude Desktop — use --claude-config to auto-generate, or manually edit claude_desktop_config.json:

json
{ "mcpServers": { "github": { "command": "python", "args": ["/path/to/github_mcp.py"], "env": { "GITHUB_TOKEN": "your-token-here" } } } }
Open source

Ready to forge your first
MCP server?

Free, open source, and works offline with Ollama.
No API keys. No signup. No cloud dependency.

Get Started → ★ Star on GitHub