{"id":47842172,"url":"https://github.com/type-mcp/mcp-anything","last_synced_at":"2026-04-19T03:00:46.744Z","repository":{"id":345834919,"uuid":"1181541535","full_name":"Type-MCP/mcp-anything","owner":"Type-MCP","description":"One command to turn any codebase into an MCP server","archived":false,"fork":false,"pushed_at":"2026-04-08T08:09:13.000Z","size":5455,"stargazers_count":29,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-08T10:07:53.400Z","etag":null,"topics":["ai","anthropic","automation","claude","cli","code-generation","developer-tools","fastapi","flask","llm","mcp","mcp-server","model-context-protocol","openapi","python","spring-boot","swagger"],"latest_commit_sha":null,"homepage":"https://mcp-anything.com/waitlist","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Type-MCP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-14T09:29:24.000Z","updated_at":"2026-04-08T08:09:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Type-MCP/mcp-anything","commit_stats":null,"previous_names":["gabrielekarra/mcp-anything"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Type-MCP/mcp-anything","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Type-MCP%2Fmcp-anything","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Type-MCP%2Fmcp-anything/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Type-MCP%2Fmcp-anything/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Type-MCP%2Fmcp-anything/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Type-MCP","download_url":"https://codeload.github.com/Type-MCP/mcp-anything/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Type-MCP%2Fmcp-anything/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31992822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","automation","claude","cli","code-generation","developer-tools","fastapi","flask","llm","mcp","mcp-server","model-context-protocol","openapi","python","spring-boot","swagger"],"created_at":"2026-04-03T21:00:28.302Z","updated_at":"2026-04-19T03:00:46.690Z","avatar_url":"https://github.com/Type-MCP.png","language":"Python","funding_links":[],"categories":["Utilities"],"sub_categories":["Development Tools"],"readme":"# MCP-Anything\n\n**One command to turn any codebase into an MCP server. Not just REST APIs. Not just OpenAPI specs.**\n\n[![Discord](https://img.shields.io/badge/Discord-Join%20us-7289da?logo=discord\u0026logoColor=white)](https://discord.gg/5zCwnfJBxG)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n[![PyPI](https://img.shields.io/pypi/v/mcp-anything.svg)](https://pypi.org/project/mcp-anything/)\n\n![mcp-anything](banner.png)\n\n## Get started\n\n```bash\npip install mcp-anything\n\n# Generate an MCP server from any codebase\nmcp-anything generate /path/to/your/app\n\n# Or from a URL (OpenAPI, GraphQL, gRPC spec)\nmcp-anything generate https://api.example.com/openapi.json\n\n# Or directly from a local spec file\nmcp-anything generate ./openapi.json\n```\n\nYou get a complete, pip-installable MCP server in `./mcp-\u003cname\u003e-server/`. Add it to your agent in seconds:\n\n**stdio (local, default):** add `mcp.json` to your Claude Code `.mcp.json`:\n```json\n{\n  \"mcpServers\": {\n    \"my-app\": { \"command\": \"mcp-my-app\", \"args\": [] }\n  }\n}\n```\n\n**HTTP (remote/shared, recommended):** start the server and point your agent at it:\n```bash\nmcp-anything generate /path/to/app --transport http\nmcp-my-app  # server runs on http://localhost:8000/sse\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"my-app\": { \"url\": \"http://localhost:8000/sse\" }\n  }\n}\n```\n\n## Targets\n\nBy default, mcp-anything generates a **Python / FastMCP** server. Use `--target=mcp-use` to generate a **TypeScript / mcp-use** server instead:\n\n```bash\nmcp-anything generate /path/to/app --target mcp-use\n```\n\nThe TypeScript server uses the [mcp-use](https://github.com/mcp-use/mcp-use) SDK and ships with a built-in inspector.\n\n| | `--target fastmcp` (default) | `--target mcp-use` |\n|---|---|---|\n| Language | Python | TypeScript |\n| SDK | FastMCP | mcp-use |\n| Transport | stdio / HTTP | HTTP (port 3000) |\n| Inspector | External | Built-in at /inspector |\n| Install | `pip install -e .` | `npm install \u0026\u0026 npm run dev` |\n\n## What's supported\n\nmcp-anything detects and wraps source code across 8 ecosystems — REST frameworks, CLI tools, API specs, and protocol-based services.\n\n| Ecosystem | Framework / Source | Confidence |\n|---|---|---|\n| **Python** | argparse CLI | 0.90 |\n| | Click CLI | 0.90 |\n| | Typer CLI | 0.85 |\n| | Flask | 0.95 |\n| | FastAPI | 0.95 |\n| | Django REST Framework | 0.95 |\n| **Java / Kotlin** | Spring Boot (Java + Kotlin) | 0.95 |\n| | Spring MVC (Java + Kotlin) | 0.85 |\n| | JAX-RS / Quarkus (Java + Kotlin) | 0.90 |\n| | Micronaut | 0.90 |\n| **JavaScript / TypeScript** | Express.js | 0.95 |\n| **Go** | Gin | 0.95 |\n| | Echo | 0.95 |\n| | Chi | 0.95 |\n| | Fiber | 0.95 |\n| | gorilla/mux | 0.90 |\n| | net/http | 0.85 |\n| **Ruby** | Rails | 0.95 |\n| **Rust** | Actix-web | 0.95 |\n| | Axum | 0.95 |\n| | Rocket | 0.95 |\n| | Warp | 0.90 |\n| **API Specs** | OpenAPI 3.x / Swagger 2.x | 0.88 |\n| | GraphQL SDL | 0.95 |\n| | gRPC / Protobuf | 0.95 |\n| **Protocol / IPC** | WebSocket (JSON-RPC) | 0.85 |\n| | MQTT / paho-mqtt | 0.90 |\n| | ZeroMQ | 0.90 |\n| | XML-RPC / raw socket | 0.90 |\n| | D-Bus | 0.90 |\n\n\u003e Pass a URL directly for API specs: `mcp-anything generate https://api.example.com/openapi.json`\n\n---\n\n## Scoping: control what gets exposed\n\nLarge codebases can have hundreds or thousands of endpoints. You don't want all of them as MCP tools. Three mechanisms let you control scope:\n\n**Quick filter with `--include` / `--exclude`:**\n```bash\n# Only expose /api/v2 endpoints\nmcp-anything generate ./my-app --include \"/api/v2/*\"\n\n# Exclude internal and debug routes\nmcp-anything generate ./my-app --exclude \"/internal/*\" --exclude \"debug_*\"\n```\n\n**Review mode — curate before generating:**\n```bash\n# Step 1: analyze and pause\nmcp-anything generate ./my-app --review\n\n# Step 2: edit the generated scope.yaml (enable/disable per capability)\nvim mcp-my-app-server/scope.yaml\n\n# Step 3: resume generation with your curated scope\nmcp-anything generate ./my-app --resume\n```\n\n**Reusable scope file:**\n```bash\n# Use a pre-built scope file (check it into your repo)\nmcp-anything generate ./my-app --scope-file ./mcp-scope.yaml\n```\n\nPatterns match against capability names, source file paths, and descriptions using glob syntax. In the scope file, you can also set `enabled: false` on individual capabilities for precise control.\n\n## Description overrides: customize tool descriptions\n\nAuto-generated descriptions come from source code (docstrings, OpenAPI summaries, route comments). They're usually good enough, but sometimes you want cleaner wording for your LLM agent.\n\nAfter generation, a `descriptions.yaml` file is written to the output directory with every tool and parameter description. Edit it, then re-run with `--description` to apply your changes:\n\n```bash\n# 1. Generate as usual\nmcp-anything generate ./my-app\n\n# 2. Edit descriptions\nvim mcp-my-app-server/descriptions.yaml\n```\n\nThe file looks like this:\n\n```yaml\n# Edit tool descriptions below. Run `mcp-anything generate --description` to apply.\ntools:\n  list_users:\n    description: \"List all users with optional filtering\"\n    parameters:\n      role:\n        description: \"Filter by user role\"\n      limit:\n        description: \"Max results to return\"\n  create_user:\n    description: \"Create a new user account\"\n    parameters:\n      name:\n        description: \"Full name of the user\"\n```\n\n```bash\n# 3. Apply overrides — run from the generated server directory\ncd mcp-my-app-server\nmcp-anything generate --description\n\n# Or from anywhere, pointing to the output directory\nmcp-anything generate --description -o ./mcp-my-app-server\n```\n\nOnly changed descriptions are applied. The pipeline detects edits and re-generates only the affected phases (implement, document, package), keeping everything else intact.\n\n## Output\n\n```\nmcp-\u003cname\u003e-server/\n├── src/\u003cname\u003e/\n│   ├── server.py        # FastMCP server (stdio or HTTP/SSE)\n│   ├── backend.py       # Backend adapter (CLI / HTTP proxy / Python call)\n│   ├── tools/           # Tool modules, one file per capability group\n│   ├── prompts.py       # Server-delivered MCP prompts\n│   └── resources.py     # Dynamic MCP resources\n├── AGENTS.md            # Tool index for coding agents\n├── Dockerfile           # Container deployment (HTTP mode)\n├── mcp.json             # Ready-to-paste MCP client config\n└── pyproject.toml       # pip install -e .\n```\n\n### Why we generate AGENTS.md\n\nMCP solves tool *invocation* — an agent calls a tool and gets a result. It doesn't solve tool *discovery* at the project level.\n\nWhen an agent like Claude Code opens your repo, it reads `AGENTS.md` before making any MCP calls. That file tells it what the server can do, which tools exist, and how to use them — without needing an active connection. As [this article](https://itnext.io/mcp-is-dead-long-live-mcp-a67bd74a6576) argues, the next generation of agent workflows depends on agents being able to reason about available capabilities *before* invoking them. `AGENTS.md` is that bridge: a human-readable, agent-indexed map of everything the generated server exposes.\n\n### Why prefer HTTP transport\n\nstdio MCP runs the server as a local subprocess — one process per agent session, tied to your machine. It works for personal use but doesn't scale.\n\nHTTP transport (`--transport http`) lets you:\n- Deploy once, connect from anywhere (CI, cloud agents, teammates)\n- Share a single server instance across multiple agent sessions\n- Run in Docker or any container platform\n\nFor anything beyond local prototyping, HTTP is the right default.\n\n## Concrete example: GitHub MCP Server\n\nThe [official GitHub MCP server](https://github.com/github/github-mcp-server) is a hand-built Go project exposing ~80 curated tools (issues, PRs, repos, actions, security alerts, etc.). It took a team months to build and maintain.\n\nWhat happens if you point mcp-anything at GitHub's public OpenAPI spec instead?\n\n```bash\nmcp-anything generate https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json --name github --no-llm\n```\n\n|  | Official (hand-built) | **mcp-anything (auto-generated)** |\n|--|----------------------|----------------------------------|\n| **Language** | Go | Python |\n| **Build time** | Months | Seconds |\n| **Tools** | ~80 (curated subset) | ~1,093 (every API operation) |\n| **Backend** | Native Go SDK + GraphQL | `httpx` HTTP proxy from OpenAPI spec |\n| **Auth** | PAT / OAuth | PAT via `GITHUB_API_KEY` env var |\n| **Transport** | stdio, HTTP | stdio (default), HTTP (`--transport http`) |\n| **Docs** | Hand-written README | Auto-generated AGENTS.md + MCP resources |\n\nThe generated server covers **every** GitHub REST API endpoint — repos, issues, PRs, actions, packages, security advisories, code search, gists, orgs, teams, notifications, and more. Each endpoint becomes an MCP tool with typed parameters extracted from the OpenAPI spec.\n\nThe official server is **curated**: 80 tools chosen for what LLMs actually need, with custom logic and GraphQL integration. The auto-generated server is **comprehensive**: 1,093 tools covering the entire API surface. It's the difference between a bespoke suit and an instant wardrobe — one fits perfectly, the other covers everything immediately.\n\nSee [`examples/github-server/`](examples/github-server/) for the full generated code.\n\n### Scoping down to match the official server\n\nBut what if you only want the same ~80 tools the official server exposes? Use `--scope-file`:\n\n```bash\nmcp-anything generate \\\n  https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json \\\n  --name github-scoped --no-llm \\\n  --scope-file examples/github-server-scoped/scope.yaml \\\n  -o examples/github-server-scoped\n```\n\n|  | Official (hand-built) | Full auto-generated | **Scoped auto-generated** |\n|--|----------------------|---------------------|--------------------------|\n| **Tools** | ~80 (curated) | 1,093 (every endpoint) | **67 (matching official)** |\n| **Build time** | Months | ~6 seconds | ~6 seconds |\n| **Coverage** | Curated subset + GraphQL | Entire REST API | Same REST endpoints as official |\n| **Scope control** | Hardcoded in Go | None needed | `scope.yaml` (69 lines) |\n\nThe scope file ([`examples/github-server-scoped/scope.yaml`](examples/github-server-scoped/scope.yaml)) uses `exclude_patterns: [\"*\"]` to exclude everything by default, then `enabled: true` on the 67 specific tools that map to official endpoints. 11 official tools use GraphQL or Copilot-specific APIs and have no REST equivalent — these are documented in the scope file.\n\n**Reproduce it yourself:**\n\n```bash\n# 1. Generate the full server (1,093 tools)\nmcp-anything generate \\\n  https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json \\\n  --name github --no-llm\n\n# 2. Generate the scoped server (67 tools, matching official)\nmcp-anything generate \\\n  https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json \\\n  --name github-scoped --no-llm \\\n  --scope-file examples/github-server-scoped/scope.yaml\n\n# 3. Or use review mode to curate interactively\nmcp-anything generate \\\n  https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json \\\n  --name github-custom --no-llm --review\n# Edit mcp-github-custom-server/scope.yaml, then:\nmcp-anything generate \\\n  https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json \\\n  --name github-custom --resume\n```\n\nSee [`examples/github-server-scoped/`](examples/github-server-scoped/) for the scoped output.\n\n## Roadmap\n\nSee [ROADMAP.md](ROADMAP.md) for the full roadmap. See [CONTRIBUTING.md](CONTRIBUTING.md) to know how to contribute to the project.\n\n---\n\n## Star History\n\n\u003ca href=\"https://www.star-history.com/?repos=gabrielekarra%2Fmcp-anything\u0026type=date\u0026legend=top-left\"\u003e\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/image?repos=gabrielekarra/mcp-anything\u0026type=date\u0026theme=dark\u0026legend=top-left\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/image?repos=Type-MCP/mcp-anything\u0026type=date\u0026legend=top-left\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/image?repos=Type-MCP/mcp-anything\u0026type=date\u0026legend=top-left\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e\n\n---\n\nStop writing MCP servers by hand.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftype-mcp%2Fmcp-anything","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftype-mcp%2Fmcp-anything","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftype-mcp%2Fmcp-anything/lists"}