mcp-anything 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mcp_anything-0.3.0/.claude-plugin/marketplace.json +25 -0
- mcp_anything-0.3.0/.github/workflows/release.yml +40 -0
- mcp_anything-0.3.0/.github/workflows/tests.yml +22 -0
- mcp_anything-0.3.0/.gitignore +21 -0
- mcp_anything-0.3.0/CLAUDE.md +433 -0
- mcp_anything-0.3.0/CONTRACT.md +116 -0
- mcp_anything-0.3.0/CONTRIBUTING.md +250 -0
- mcp_anything-0.3.0/LICENSE +184 -0
- mcp_anything-0.3.0/PKG-INFO +346 -0
- mcp_anything-0.3.0/README.md +307 -0
- mcp_anything-0.3.0/RELEASE_NOTES.md +161 -0
- mcp_anything-0.3.0/ROADMAP.md +106 -0
- mcp_anything-0.3.0/action.yml +53 -0
- mcp_anything-0.3.0/banner.jpg +0 -0
- mcp_anything-0.3.0/docs/demo.tape +20 -0
- mcp_anything-0.3.0/docs/launch.md +38 -0
- mcp_anything-0.3.0/examples/README.md +207 -0
- mcp_anything-0.3.0/examples/github-server/AGENTS.md +10040 -0
- mcp_anything-0.3.0/examples/github-server/README.md +11149 -0
- mcp_anything-0.3.0/examples/github-server/mcp.json +8 -0
- mcp_anything-0.3.0/examples/github-server/pyproject.toml +20 -0
- mcp_anything-0.3.0/examples/github-server/src/mcp_github/__init__.py +1 -0
- mcp_anything-0.3.0/examples/github-server/src/mcp_github/backend.py +200 -0
- mcp_anything-0.3.0/examples/github-server/src/mcp_github/models.py +8506 -0
- mcp_anything-0.3.0/examples/github-server/src/mcp_github/prompts.py +47 -0
- mcp_anything-0.3.0/examples/github-server/src/mcp_github/resources.py +73 -0
- mcp_anything-0.3.0/examples/github-server/src/mcp_github/server.py +40 -0
- mcp_anything-0.3.0/examples/github-server/src/mcp_github/state.py +23 -0
- mcp_anything-0.3.0/examples/github-server/src/mcp_github/tools/__init__.py +1 -0
- mcp_anything-0.3.0/examples/github-server/src/mcp_github/tools/api.py +31229 -0
- mcp_anything-0.3.0/examples/github-server/tests/conftest.py +10 -0
- mcp_anything-0.3.0/examples/github-server/tests/test_protocol.py +12 -0
- mcp_anything-0.3.0/examples/github-server/tests/test_tools.py +5477 -0
- mcp_anything-0.3.0/examples/github-server-scoped/AGENTS.md +1081 -0
- mcp_anything-0.3.0/examples/github-server-scoped/README.md +1177 -0
- mcp_anything-0.3.0/examples/github-server-scoped/mcp.json +11 -0
- mcp_anything-0.3.0/examples/github-server-scoped/pyproject.toml +20 -0
- mcp_anything-0.3.0/examples/github-server-scoped/scope.yaml +195 -0
- mcp_anything-0.3.0/examples/github-server-scoped/src/mcp_github_scoped/__init__.py +1 -0
- mcp_anything-0.3.0/examples/github-server-scoped/src/mcp_github_scoped/backend.py +211 -0
- mcp_anything-0.3.0/examples/github-server-scoped/src/mcp_github_scoped/models.py +653 -0
- mcp_anything-0.3.0/examples/github-server-scoped/src/mcp_github_scoped/prompts.py +47 -0
- mcp_anything-0.3.0/examples/github-server-scoped/src/mcp_github_scoped/resources.py +491 -0
- mcp_anything-0.3.0/examples/github-server-scoped/src/mcp_github_scoped/server.py +42 -0
- mcp_anything-0.3.0/examples/github-server-scoped/src/mcp_github_scoped/state.py +23 -0
- mcp_anything-0.3.0/examples/github-server-scoped/src/mcp_github_scoped/tools/__init__.py +1 -0
- mcp_anything-0.3.0/examples/github-server-scoped/src/mcp_github_scoped/tools/api.py +2391 -0
- mcp_anything-0.3.0/examples/github-server-scoped/tests/conftest.py +23 -0
- mcp_anything-0.3.0/examples/github-server-scoped/tests/test_backend.py +54 -0
- mcp_anything-0.3.0/examples/github-server-scoped/tests/test_protocol.py +245 -0
- mcp_anything-0.3.0/examples/github-server-scoped/tests/test_runtime.py +65 -0
- mcp_anything-0.3.0/examples/github-server-scoped/tests/test_tools.py +4120 -0
- mcp_anything-0.3.0/plugins/mcp-anything/.claude-plugin/plugin.json +12 -0
- mcp_anything-0.3.0/plugins/mcp-anything/skills/generate/SKILL.md +54 -0
- mcp_anything-0.3.0/pyproject.toml +72 -0
- mcp_anything-0.3.0/scripts/leaderboard.py +85 -0
- mcp_anything-0.3.0/scripts/servers.yaml +41 -0
- mcp_anything-0.3.0/src/mcp_anything/__init__.py +3 -0
- mcp_anything-0.3.0/src/mcp_anything/__main__.py +5 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/__init__.py +1 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/ast_analyzer.py +981 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/__init__.py +65 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/api_detector.py +64 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/base.py +26 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/cli_detector.py +63 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/django_detector.py +67 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/express_detector.py +77 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/file_detector.py +59 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/flask_fastapi_detector.py +89 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/go_web_detector.py +120 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/graphql_detector.py +61 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/grpc_detector.py +73 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/jaxrs_detector.py +108 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/micronaut_detector.py +105 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/openapi_detector.py +88 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/protocol_detector.py +72 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/rails_detector.py +78 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/rust_web_detector.py +93 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/socket_detector.py +62 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/spring_detector.py +96 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/detectors/zustand_detector.py +66 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/django_analyzer.py +313 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/express_analyzer.py +674 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/flask_fastapi_analyzer.py +642 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/go_analyzer.py +330 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/graphql_analyzer.py +182 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/grpc_analyzer.py +212 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/help_parser.py +325 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/import_resolver.py +124 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/java_analyzer.py +1048 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/java_ast.py +743 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/llm_analyzer.py +143 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/openapi_analyzer.py +534 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/rails_analyzer.py +300 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/route_utils.py +84 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/rust_web_analyzer.py +367 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/scanner.py +132 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/schema_extractor.py +301 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/websocket_analyzer.py +278 -0
- mcp_anything-0.3.0/src/mcp_anything/analysis/zustand_analyzer.py +340 -0
- mcp_anything-0.3.0/src/mcp_anything/cli.py +667 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/__init__.py +1 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/emitter.py +219 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/renderer.py +294 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/agents_md.j2 +82 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/backend_api.py.j2 +28 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/backend_cli.py.j2 +96 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/backend_file.py.j2 +28 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/backend_http.py.j2 +232 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/backend_protocol.py.j2 +352 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/backend_socket.py.j2 +187 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/backend_zustand.py.j2 +218 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/bridge_zustand.tsx.j2 +117 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/mcp_use/server.ts.j2 +189 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/models.py.j2 +18 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/prompts_module.py.j2 +15 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/pyproject.toml.j2 +35 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/readme.md.j2 +190 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/resource_module.py.j2 +122 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/server.py.j2 +73 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/state.py.j2 +23 -0
- mcp_anything-0.3.0/src/mcp_anything/codegen/templates/tool_module.py.j2 +337 -0
- mcp_anything-0.3.0/src/mcp_anything/config.py +47 -0
- mcp_anything-0.3.0/src/mcp_anything/conformance/__init__.py +1 -0
- mcp_anything-0.3.0/src/mcp_anything/conformance/brief_fixture.py +76 -0
- mcp_anything-0.3.0/src/mcp_anything/conformance/parity.py +51 -0
- mcp_anything-0.3.0/src/mcp_anything/conformance/reporter.py +54 -0
- mcp_anything-0.3.0/src/mcp_anything/conformance/runner.py +112 -0
- mcp_anything-0.3.0/src/mcp_anything/emit/__init__.py +1 -0
- mcp_anything-0.3.0/src/mcp_anything/emit/base.py +121 -0
- mcp_anything-0.3.0/src/mcp_anything/emit/python_fastmcp/__init__.py +1 -0
- mcp_anything-0.3.0/src/mcp_anything/emit/python_fastmcp/phase.py +665 -0
- mcp_anything-0.3.0/src/mcp_anything/emit/typescript_mcp_use/__init__.py +1 -0
- mcp_anything-0.3.0/src/mcp_anything/emit/typescript_mcp_use/phase.py +456 -0
- mcp_anything-0.3.0/src/mcp_anything/evaluate.py +152 -0
- mcp_anything-0.3.0/src/mcp_anything/grade/__init__.py +118 -0
- mcp_anything-0.3.0/src/mcp_anything/grade/client.py +230 -0
- mcp_anything-0.3.0/src/mcp_anything/grade/rules.py +219 -0
- mcp_anything-0.3.0/src/mcp_anything/install.py +106 -0
- mcp_anything-0.3.0/src/mcp_anything/llm.py +285 -0
- mcp_anything-0.3.0/src/mcp_anything/models/__init__.py +17 -0
- mcp_anything-0.3.0/src/mcp_anything/models/analysis.py +98 -0
- mcp_anything-0.3.0/src/mcp_anything/models/design.py +147 -0
- mcp_anything-0.3.0/src/mcp_anything/models/domain.py +51 -0
- mcp_anything-0.3.0/src/mcp_anything/models/manifest.py +62 -0
- mcp_anything-0.3.0/src/mcp_anything/models/validation.py +51 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/__init__.py +1 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/analyze.py +606 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/context.py +33 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/descriptions.py +75 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/design.py +813 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/document.py +49 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/domain_modeling.py +286 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/engine.py +337 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/implement.py +168 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/implement_mcp_use.py +63 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/llm_client.py +97 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/package.py +179 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/package_mcp_use.py +242 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/phase.py +22 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/scope.py +151 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/skill_bundle.py +217 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/tool_design.py +1101 -0
- mcp_anything-0.3.0/src/mcp_anything/pipeline/validation_harness.py +264 -0
- mcp_anything-0.3.0/src/mcp_anything/py.typed +0 -0
- mcp_anything-0.3.0/src/mcp_anything/quick.py +168 -0
- mcp_anything-0.3.0/src/mcp_anything/serve.py +82 -0
- mcp_anything-0.3.0/src/mcp_anything/url_fetcher.py +207 -0
- mcp_anything-0.3.0/tests/conftest.py +160 -0
- mcp_anything-0.3.0/tests/fixtures/fake_axum_app/.gitignore +1 -0
- mcp_anything-0.3.0/tests/fixtures/fake_axum_app/Cargo.lock +608 -0
- mcp_anything-0.3.0/tests/fixtures/fake_axum_app/Cargo.toml +10 -0
- mcp_anything-0.3.0/tests/fixtures/fake_axum_app/src/main.rs +57 -0
- mcp_anything-0.3.0/tests/fixtures/fake_cli_app/main.py +56 -0
- mcp_anything-0.3.0/tests/fixtures/fake_cli_app/utils.py +21 -0
- mcp_anything-0.3.0/tests/fixtures/fake_click_app/cli.py +36 -0
- mcp_anything-0.3.0/tests/fixtures/fake_django_app/urls.py +5 -0
- mcp_anything-0.3.0/tests/fixtures/fake_django_app/views.py +44 -0
- mcp_anything-0.3.0/tests/fixtures/fake_express_app/app.js +29 -0
- mcp_anything-0.3.0/tests/fixtures/fake_express_app/routes/users.js +27 -0
- mcp_anything-0.3.0/tests/fixtures/fake_fastapi_app/main.py +61 -0
- mcp_anything-0.3.0/tests/fixtures/fake_fastapi_app/routers.py +19 -0
- mcp_anything-0.3.0/tests/fixtures/fake_flask_app/app.py +40 -0
- mcp_anything-0.3.0/tests/fixtures/fake_go_app/handlers/user.go +38 -0
- mcp_anything-0.3.0/tests/fixtures/fake_go_app/main.go +22 -0
- mcp_anything-0.3.0/tests/fixtures/fake_go_chi_app/main.go +53 -0
- mcp_anything-0.3.0/tests/fixtures/fake_go_echo_app/main.go +51 -0
- mcp_anything-0.3.0/tests/fixtures/fake_go_mux_app/main.go +53 -0
- mcp_anything-0.3.0/tests/fixtures/fake_go_nethttp_app/main.go +35 -0
- mcp_anything-0.3.0/tests/fixtures/fake_graphql_app/schema.graphql +27 -0
- mcp_anything-0.3.0/tests/fixtures/fake_grpc_app/user.proto +54 -0
- mcp_anything-0.3.0/tests/fixtures/fake_jaxrs_app/src/main/java/com/example/api/ItemResource.java +38 -0
- mcp_anything-0.3.0/tests/fixtures/fake_jaxrs_app/src/main/resources/application.properties +2 -0
- mcp_anything-0.3.0/tests/fixtures/fake_kotlin_jaxrs_app/src/main/kotlin/com/example/api/ItemResource.kt +37 -0
- mcp_anything-0.3.0/tests/fixtures/fake_kotlin_spring_app/src/main/kotlin/com/example/api/UserController.kt +32 -0
- mcp_anything-0.3.0/tests/fixtures/fake_micronaut_app/build.gradle +7 -0
- mcp_anything-0.3.0/tests/fixtures/fake_micronaut_app/src/main/java/com/example/api/OrderController.java +32 -0
- mcp_anything-0.3.0/tests/fixtures/fake_rails_app/app/controllers/users_controller.rb +31 -0
- mcp_anything-0.3.0/tests/fixtures/fake_rails_app/config/routes.rb +7 -0
- mcp_anything-0.3.0/tests/fixtures/fake_rails_explicit_routes_app/app/controllers/users_controller.rb +34 -0
- mcp_anything-0.3.0/tests/fixtures/fake_rails_explicit_routes_app/config/routes.rb +20 -0
- mcp_anything-0.3.0/tests/fixtures/fake_rocket_app/.gitignore +1 -0
- mcp_anything-0.3.0/tests/fixtures/fake_rocket_app/Cargo.lock +1708 -0
- mcp_anything-0.3.0/tests/fixtures/fake_rocket_app/Cargo.toml +9 -0
- mcp_anything-0.3.0/tests/fixtures/fake_rocket_app/src/main.rs +57 -0
- mcp_anything-0.3.0/tests/fixtures/fake_rust_app/src/main.rs +53 -0
- mcp_anything-0.3.0/tests/fixtures/fake_socket_xmlrpc_app/server.py +49 -0
- mcp_anything-0.3.0/tests/fixtures/fake_spring_app/src/main/java/com/example/demo/DemoApplication.java +11 -0
- mcp_anything-0.3.0/tests/fixtures/fake_spring_app/src/main/java/com/example/demo/UserController.java +41 -0
- mcp_anything-0.3.0/tests/fixtures/fake_spring_app/src/main/resources/application.properties +2 -0
- mcp_anything-0.3.0/tests/fixtures/fake_spring_mvc_app/src/main/java/com/example/web/ProductController.java +28 -0
- mcp_anything-0.3.0/tests/fixtures/fake_ts_express_app/server.ts +39 -0
- mcp_anything-0.3.0/tests/fixtures/fake_warp_app/.gitignore +1 -0
- mcp_anything-0.3.0/tests/fixtures/fake_warp_app/Cargo.lock +1232 -0
- mcp_anything-0.3.0/tests/fixtures/fake_warp_app/Cargo.toml +10 -0
- mcp_anything-0.3.0/tests/fixtures/fake_warp_app/src/main.rs +40 -0
- mcp_anything-0.3.0/tests/fixtures/fake_websocket_app/socket_io.js +22 -0
- mcp_anything-0.3.0/tests/fixtures/fake_websocket_app/ws_server.py +20 -0
- mcp_anything-0.3.0/tests/fixtures/fake_ws_protocol_app/server.py +57 -0
- mcp_anything-0.3.0/tests/fixtures/grade/clean_tools.json +25 -0
- mcp_anything-0.3.0/tests/fixtures/grade/eval_server.py +34 -0
- mcp_anything-0.3.0/tests/fixtures/grade/fake_server.py +21 -0
- mcp_anything-0.3.0/tests/fixtures/leaderboard/good.json +92 -0
- mcp_anything-0.3.0/tests/fixtures/leaderboard/servers.yaml +12 -0
- mcp_anything-0.3.0/tests/fixtures/leaderboard/sloppy.json +304 -0
- mcp_anything-0.3.0/tests/fixtures/petstore_openapi.json +195 -0
- mcp_anything-0.3.0/tests/fixtures/petstore_swagger.yaml +74 -0
- mcp_anything-0.3.0/tests/fixtures/realworld_express_app/routes/api.js +13 -0
- mcp_anything-0.3.0/tests/fixtures/realworld_go_app/handler/handler.go +28 -0
- mcp_anything-0.3.0/tests/fixtures/realworld_rails_app/config/routes.rb +12 -0
- mcp_anything-0.3.0/tests/fixtures/realworld_rust_app/src/main.rs +41 -0
- mcp_anything-0.3.0/tests/fixtures/realworld_spring_app/src/main/java/com/petclinic/controller/ArticleController.java +26 -0
- mcp_anything-0.3.0/tests/llm_fakes.py +50 -0
- mcp_anything-0.3.0/tests/test_ast_analyzer.py +577 -0
- mcp_anything-0.3.0/tests/test_auth.py +209 -0
- mcp_anything-0.3.0/tests/test_cli.py +76 -0
- mcp_anything-0.3.0/tests/test_codegen.py +303 -0
- mcp_anything-0.3.0/tests/test_conformance_parity.py +89 -0
- mcp_anything-0.3.0/tests/test_contract_items.py +223 -0
- mcp_anything-0.3.0/tests/test_detectors.py +75 -0
- mcp_anything-0.3.0/tests/test_django.py +91 -0
- mcp_anything-0.3.0/tests/test_domain_codebase_fusion.py +483 -0
- mcp_anything-0.3.0/tests/test_domain_modeling.py +153 -0
- mcp_anything-0.3.0/tests/test_e2e_http.py +424 -0
- mcp_anything-0.3.0/tests/test_e2e_mcp_session.py +477 -0
- mcp_anything-0.3.0/tests/test_e2e_realworld_session.py +314 -0
- mcp_anything-0.3.0/tests/test_emit_review_fixes.py +306 -0
- mcp_anything-0.3.0/tests/test_enterprise.py +286 -0
- mcp_anything-0.3.0/tests/test_eval.py +127 -0
- mcp_anything-0.3.0/tests/test_express.py +131 -0
- mcp_anything-0.3.0/tests/test_flask_fastapi.py +305 -0
- mcp_anything-0.3.0/tests/test_functional.py +869 -0
- mcp_anything-0.3.0/tests/test_github_scope_comparison.py +492 -0
- mcp_anything-0.3.0/tests/test_go.py +97 -0
- mcp_anything-0.3.0/tests/test_grade.py +230 -0
- mcp_anything-0.3.0/tests/test_graphql.py +105 -0
- mcp_anything-0.3.0/tests/test_grpc.py +110 -0
- mcp_anything-0.3.0/tests/test_help_parser.py +137 -0
- mcp_anything-0.3.0/tests/test_implement.py +36 -0
- mcp_anything-0.3.0/tests/test_import_resolver.py +118 -0
- mcp_anything-0.3.0/tests/test_integration.py +1312 -0
- mcp_anything-0.3.0/tests/test_java_ast_analyzer.py +583 -0
- mcp_anything-0.3.0/tests/test_jaxrs.py +177 -0
- mcp_anything-0.3.0/tests/test_kotlin.py +197 -0
- mcp_anything-0.3.0/tests/test_leaderboard.py +38 -0
- mcp_anything-0.3.0/tests/test_llm.py +185 -0
- mcp_anything-0.3.0/tests/test_micronaut.py +186 -0
- mcp_anything-0.3.0/tests/test_openapi.py +425 -0
- mcp_anything-0.3.0/tests/test_pipeline_engine.py +80 -0
- mcp_anything-0.3.0/tests/test_quick_install.py +161 -0
- mcp_anything-0.3.0/tests/test_rails.py +72 -0
- mcp_anything-0.3.0/tests/test_readme.py +58 -0
- mcp_anything-0.3.0/tests/test_release.py +38 -0
- mcp_anything-0.3.0/tests/test_rust_web.py +80 -0
- mcp_anything-0.3.0/tests/test_scanner.py +85 -0
- mcp_anything-0.3.0/tests/test_schema_extractor.py +113 -0
- mcp_anything-0.3.0/tests/test_scope.py +378 -0
- mcp_anything-0.3.0/tests/test_skill_bundle.py +139 -0
- mcp_anything-0.3.0/tests/test_spring.py +392 -0
- mcp_anything-0.3.0/tests/test_tool_design.py +250 -0
- mcp_anything-0.3.0/tests/test_typescript_types.py +61 -0
- mcp_anything-0.3.0/tests/test_url_fetcher.py +235 -0
- mcp_anything-0.3.0/tests/test_websocket.py +106 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mcp-anything",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "gabrielekarra",
|
|
5
|
+
"url": "https://github.com/gabrielekarra/mcp-anything"
|
|
6
|
+
},
|
|
7
|
+
"description": "Turn any codebase, API spec, or plain-language description into a production-ready MCP server, right from Claude Code.",
|
|
8
|
+
"plugins": [
|
|
9
|
+
{
|
|
10
|
+
"name": "mcp-anything",
|
|
11
|
+
"source": "./plugins/mcp-anything",
|
|
12
|
+
"description": "Generate a full MCP server (Python/FastMCP or TypeScript/mcp-use) from a codebase, an OpenAPI/gRPC/GraphQL spec, or a plain-language brief.",
|
|
13
|
+
"version": "0.2.1",
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "gabrielekarra",
|
|
16
|
+
"url": "https://github.com/gabrielekarra"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/gabrielekarra/mcp-anything",
|
|
19
|
+
"repository": "https://github.com/gabrielekarra/mcp-anything",
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"keywords": ["mcp", "mcp-server", "codegen", "openapi", "grpc", "fastmcp"],
|
|
22
|
+
"category": "code-generation"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
# Publishes to PyPI when a tag like v0.3.0 is pushed, with trusted publishing:
|
|
4
|
+
# on pypi.org, add this repository and workflow (release.yml, environment "pypi")
|
|
5
|
+
# as a trusted publisher of the mcp-anything project. No token is stored.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
tags: ["v*"]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.12"
|
|
19
|
+
- name: Check the tag matches the version
|
|
20
|
+
run: |
|
|
21
|
+
version=$(python -c "import re; print(re.search(r'__version__ = \"(.+)\"', open('src/mcp_anything/__init__.py').read()).group(1))")
|
|
22
|
+
test "v$version" = "${GITHUB_REF_NAME}" || { echo "tag ${GITHUB_REF_NAME} does not match version $version"; exit 1; }
|
|
23
|
+
- run: pip install build && python -m build
|
|
24
|
+
- uses: actions/upload-artifact@v4
|
|
25
|
+
with:
|
|
26
|
+
name: dist
|
|
27
|
+
path: dist/
|
|
28
|
+
|
|
29
|
+
publish:
|
|
30
|
+
needs: build
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
environment: pypi
|
|
33
|
+
permissions:
|
|
34
|
+
id-token: write
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/download-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: dist
|
|
39
|
+
path: dist/
|
|
40
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pytest:
|
|
10
|
+
runs-on: ${{ matrix.os }}
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, macos-latest]
|
|
15
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python-version }}
|
|
21
|
+
- run: pip install -e ".[dev,llm]"
|
|
22
|
+
- run: pytest -m "not realworld and not live"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.eggs/
|
|
8
|
+
*.egg
|
|
9
|
+
.venv/
|
|
10
|
+
venv/
|
|
11
|
+
.env
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.mypy_cache/
|
|
14
|
+
*.so
|
|
15
|
+
.DS_Store
|
|
16
|
+
mcp-anything-manifest.json
|
|
17
|
+
node_modules/
|
|
18
|
+
package-lock.json
|
|
19
|
+
.mcp.json
|
|
20
|
+
http-mcp-server/
|
|
21
|
+
tests/fixtures/realworld_rust_app/target/
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
# MCP-Anything
|
|
2
|
+
|
|
3
|
+
## What this project does
|
|
4
|
+
LLM-driven pipeline that takes a customer's domain brief (use-cases in natural language)
|
|
5
|
+
and a data source (OpenAPI / gRPC / DB schema / SDK), and produces a fully-implemented,
|
|
6
|
+
optimized MCP server plus skill bundle and validation artifacts.
|
|
7
|
+
|
|
8
|
+
Two output backends: **Python/FastMCP** (default) and **TypeScript/mcp-use**.
|
|
9
|
+
|
|
10
|
+
Legacy path: `mcp-anything generate <path>` (codebase scanner, backwards-compatible).
|
|
11
|
+
Domain path: `mcp-anything build --brief <brief.yaml>` (new, recommended).
|
|
12
|
+
|
|
13
|
+
## Development
|
|
14
|
+
- Install: `pip install -e ".[dev,llm]"`
|
|
15
|
+
- Run tests: `pytest tests/ -v`
|
|
16
|
+
- Run CLI: `mcp-anything --help`
|
|
17
|
+
|
|
18
|
+
## Architecture
|
|
19
|
+
|
|
20
|
+
### Domain Pipeline (new, primary)
|
|
21
|
+
5 phases: DOMAIN_MODELING → TOOL_DESIGN → EMIT → SKILL_BUNDLE → VALIDATION_HARNESS
|
|
22
|
+
- Phase 1 (`domain_modeling.py`): LLM reads brief + data source → `domain_model.json`
|
|
23
|
+
- Phase 2 (`tool_design.py`): LLM shapes tools per 2026 rules → `tool_spec.yaml`
|
|
24
|
+
- Phase 3 (`emit/python_fastmcp/` or `emit/typescript_mcp_use/`): code generation
|
|
25
|
+
- Phase 4 (`skill_bundle.py`): LLM generates `SKILL.md` + `quick_queries.json`
|
|
26
|
+
- Phase 5 (`validation_harness.py`): LLM generates `eval_cases.json`, optional live eval
|
|
27
|
+
- Output contract: `CONTRACT.md` — 28 testable items (C-01..C-28) both emitters must satisfy
|
|
28
|
+
- Conformance suite: `src/mcp_anything/conformance/` with parity assertion and CI reporter
|
|
29
|
+
|
|
30
|
+
### Legacy Pipeline (preserved, unchanged)
|
|
31
|
+
5 phases: ANALYZE → DESIGN → IMPLEMENT → DOCUMENT → PACKAGE
|
|
32
|
+
- Static detectors + optional LLM analysis
|
|
33
|
+
- Jinja2 templates in `src/mcp_anything/codegen/templates/`
|
|
34
|
+
- `mcp-anything generate <path>` — unchanged
|
|
35
|
+
|
|
36
|
+
### 2026 Stack Defaults (wired into domain pipeline)
|
|
37
|
+
- Group CRUD: ≥3 CRUD ops on same resource → single `manage_X(operation=...)` tool
|
|
38
|
+
- Composed tools: multi-step workflows promoted to single callable
|
|
39
|
+
- Progressive disclosure: `disclosure_level` on every tool, verbose-only tools hidden by default
|
|
40
|
+
- Compact responses: every tool has `verbose` flag (C-10)
|
|
41
|
+
- Discovery endpoint: `GET /.well-known/mcp` (C-01..C-03)
|
|
42
|
+
- Telemetry: anonymized per-call logging, `MCP_TELEMETRY_ENDPOINT` env var (C-19..C-20)
|
|
43
|
+
- Docker: `Dockerfile` in every generated server (C-17)
|
|
44
|
+
- SKILL.md: required sections Overview, Tools, Usage Patterns, Gotchas, Recipes, Anti-patterns (C-22)
|
|
45
|
+
|
|
46
|
+
## Key Files
|
|
47
|
+
- `src/mcp_anything/cli.py` — CLI entry point (subcommands: quick, build, model, validate, generate, analyze, design, status, serve, install, grade, eval)
|
|
48
|
+
- `src/mcp_anything/pipeline/engine.py` — phase orchestration; ALL_PHASES (legacy) + DOMAIN_PHASES
|
|
49
|
+
- `src/mcp_anything/pipeline/domain_modeling.py` — Phase 1: domain brief → DomainModel
|
|
50
|
+
- `src/mcp_anything/pipeline/tool_design.py` — Phase 2: DomainModel → ServerDesign (2026 rules)
|
|
51
|
+
- `src/mcp_anything/pipeline/llm_client.py` — shared LLM call utility with JSON retry
|
|
52
|
+
- `src/mcp_anything/emit/python_fastmcp/phase.py` — Phase 3 (Python): ServerDesign → FastMCP server
|
|
53
|
+
- `src/mcp_anything/emit/typescript_mcp_use/phase.py` — Phase 3 (TS): ServerDesign → mcp-use server
|
|
54
|
+
- `src/mcp_anything/emit/base.py` — EmitPhase ABC + structural CONTRACT.md checker
|
|
55
|
+
- `src/mcp_anything/pipeline/skill_bundle.py` — Phase 4: SKILL.md + quick_queries.json
|
|
56
|
+
- `src/mcp_anything/pipeline/validation_harness.py` — Phase 5: eval_cases + conformance_report
|
|
57
|
+
- `src/mcp_anything/conformance/` — EvalRunner, ConformanceParity, ConformanceReporter
|
|
58
|
+
- `src/mcp_anything/models/domain.py` — DomainBrief, DomainModel, UseCase, GlossaryTerm
|
|
59
|
+
- `src/mcp_anything/models/validation.py` — EvalCase, EvalResult, ConformanceReport
|
|
60
|
+
- `src/mcp_anything/models/design.py` — ServerDesign + ToolGroup, ComposedTool (extended)
|
|
61
|
+
- `src/mcp_anything/models/manifest.py` — GenerationManifest v0.2.0 (dual pipeline_mode)
|
|
62
|
+
- `CONTRACT.md` — 29 testable output contract items for both emitters
|
|
63
|
+
- `src/mcp_anything/pipeline/scope.py` — scope filtering (--include/--exclude/--review/--scope-file)
|
|
64
|
+
- `src/mcp_anything/codegen/emitter.py` — legacy Jinja2 template rendering
|
|
65
|
+
- `src/mcp_anything/url_fetcher.py` — URL spec fetching and type detection
|
|
66
|
+
|
|
67
|
+
## Detectors (17 total)
|
|
68
|
+
Located in `src/mcp_anything/analyzers/`:
|
|
69
|
+
- Python: CLI (argparse/click/typer), AST (functions/classes), Flask/FastAPI, Django DRF
|
|
70
|
+
- Java: Spring Boot, Spring MVC, JAX-RS/Quarkus, Micronaut
|
|
71
|
+
- JS/TS: Express.js
|
|
72
|
+
- Go: Gin, Echo, Chi, net/http, gorilla/mux
|
|
73
|
+
- Ruby: Rails
|
|
74
|
+
- Rust: Actix, Axum, Rocket, Warp
|
|
75
|
+
- Specs: OpenAPI 3.x/Swagger 2.x, GraphQL SDL, gRPC/Protobuf
|
|
76
|
+
- Other: Socket, File I/O, WebSocket, --help text parser
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Current Status (verified 2026-03-23)
|
|
81
|
+
|
|
82
|
+
### What's WORKING (tested end-to-end with real generation)
|
|
83
|
+
|
|
84
|
+
All of these produce valid Python and install correctly.
|
|
85
|
+
All have integration tests + were validated against real open-source repositories.
|
|
86
|
+
|
|
87
|
+
| Source Type | Detection | Tools | Real Repo Tested |
|
|
88
|
+
|---|---|---|---|
|
|
89
|
+
| Python CLI (argparse) | 0.90 confidence | Correct | httpie/httpie |
|
|
90
|
+
| Flask REST | 0.95 | Routes → tools | synthetic fixture |
|
|
91
|
+
| FastAPI + Pydantic | 0.95 | Routes + params | synthetic fixture |
|
|
92
|
+
| Express.js | 0.95 | Routes → tools | synthetic fixture |
|
|
93
|
+
| Spring Boot | 0.95 | Annotations → tools | synthetic fixture |
|
|
94
|
+
| Go Gin | 0.95 | Routes → tools | synthetic fixture |
|
|
95
|
+
| Go Echo | 0.95 | Routes → tools | labstack/echo |
|
|
96
|
+
| Go Chi | 0.90 | Routes → tools | go-chi/chi |
|
|
97
|
+
| Go gorilla/mux | 0.90 | Routes → tools | gorilla/mux (33 tools) |
|
|
98
|
+
| Go net/http | 0.80 | Routes → tools | synthetic fixture |
|
|
99
|
+
| Django DRF ViewSets | 0.95 | Actions → tools | synthetic fixture |
|
|
100
|
+
| OpenAPI 3.0 spec | 0.88 | Operations → tools | GitHub API (1,093 tools) |
|
|
101
|
+
| gRPC / Protobuf | 0.95 | RPCs → tools | synthetic fixture |
|
|
102
|
+
| GraphQL SDL | 0.95 | Queries/mutations → tools | synthetic fixture |
|
|
103
|
+
| Ruby on Rails | 0.95 | resources + explicit routes | rails/rails activestorage (9 tools) |
|
|
104
|
+
| Rust Actix | 0.95 | Macros → tools | actix/examples (3 tools) |
|
|
105
|
+
| Rust Axum | 0.95 | .route() → tools | tokio-rs/axum examples (36 tools) |
|
|
106
|
+
| Rust Rocket | 0.95 | Macros → tools | SergioBenitez/Rocket examples (44 tools) |
|
|
107
|
+
| JAX-RS / Quarkus | 0.90 | Annotations → tools | quarkusio/rest-json-quickstart (4 tools) |
|
|
108
|
+
| Micronaut | 0.90 | Annotations → tools | micronaut-core benchmarks (2 tools) |
|
|
109
|
+
| Kotlin Spring | 0.95 | Annotations → tools | synthetic fixture |
|
|
110
|
+
| Kotlin JAX-RS | 0.90 | Annotations → tools | synthetic fixture |
|
|
111
|
+
| Spring MVC | 0.95 | Annotations → tools | synthetic fixture |
|
|
112
|
+
| TypeScript Express | 0.95 | Routes → tools | synthetic fixture |
|
|
113
|
+
| Python Click CLI | 0.90 | Commands → tools | synthetic fixture |
|
|
114
|
+
| Rust Warp | 0.80 | Filter chains → tools | synthetic fixture |
|
|
115
|
+
| WebSocket (raw) | 0.85 | Functions → protocol_call | synthetic fixture |
|
|
116
|
+
| Socket / XML-RPC | 0.85 | Functions → protocol_call | synthetic fixture |
|
|
117
|
+
|
|
118
|
+
Working features:
|
|
119
|
+
- All 5 pipeline phases execute
|
|
120
|
+
- 6 backend strategies: cli_subcommand, cli_function, python_call, http_call, protocol_call, stub
|
|
121
|
+
- HTTP transport mode (`--transport http`)
|
|
122
|
+
- `mcp-anything serve` command
|
|
123
|
+
- `--resume` for interrupted pipelines
|
|
124
|
+
- Auto-install of generated server
|
|
125
|
+
- MCP config (mcp.json) generation
|
|
126
|
+
- AGENTS.md generation
|
|
127
|
+
- MCP resources and prompts generation
|
|
128
|
+
- LLM-enhanced analysis (optional, via Claude API)
|
|
129
|
+
- Auth support on backend calls (API key, Bearer, Basic, OAuth2)
|
|
130
|
+
- URL-based generation (`mcp-anything generate https://api.example.com/openapi.json`)
|
|
131
|
+
- Scope filtering: `--include`/`--exclude` patterns, `--review` mode, `--scope-file`
|
|
132
|
+
|
|
133
|
+
### What's BROKEN (bugs to fix)
|
|
134
|
+
|
|
135
|
+
**Bug 1: TEST phase — REMOVED 2026-03-21**
|
|
136
|
+
- Test generation phase removed entirely. Generated tests were fake (didn't mock
|
|
137
|
+
backends) and created false confidence or visible failures.
|
|
138
|
+
|
|
139
|
+
**Bug 2: Package `_verify_structure` uses wrong path — FIXED 2026-03-16**
|
|
140
|
+
- Fixed by prepending `mcp_` to the package name in `package.py` to match
|
|
141
|
+
what the emitter actually creates.
|
|
142
|
+
|
|
143
|
+
**Bug 3: Express Router routes lose mount path prefix — FIXED 2026-03-16**
|
|
144
|
+
- Fixed by capturing the router variable name in `_ROUTE_RE` and `_ROUTE_CHAIN_RE`,
|
|
145
|
+
then looking it up in `router_prefixes` to prepend the mount path to routes.
|
|
146
|
+
- Also added cross-file router mount resolution: `build_router_mount_map()` scans
|
|
147
|
+
all JS/TS files for `require`/`import` + `app.use()` patterns to build a
|
|
148
|
+
file→prefix map, so router files in separate directories get the correct prefix.
|
|
149
|
+
|
|
150
|
+
**Bug 4: OpenTelemetry is dead code — FIXED 2026-03-16**
|
|
151
|
+
- Fixed by passing `_tracer` from `server.py.j2` to `register_tools()` in
|
|
152
|
+
`tool_module.py.j2`, which defines a `_trace` decorator that wraps each
|
|
153
|
+
tool handler with `tracer.start_as_current_span("tool.<name>")`.
|
|
154
|
+
|
|
155
|
+
**Bug 5: HTTP tools send conflicting OpenAPI defaults — FIXED 2026-03-16**
|
|
156
|
+
- Generated HTTP tools baked OpenAPI spec default values into Python function
|
|
157
|
+
signatures (e.g. `type: str = "all"`, `affiliation: str = "owner,..."`).
|
|
158
|
+
When both params had defaults, they were always sent as query params even
|
|
159
|
+
when the user didn't provide them — causing 422 errors on APIs that reject
|
|
160
|
+
mutually exclusive params (e.g. GitHub's `type` + `affiliation`).
|
|
161
|
+
- Fixed in `src/mcp_anything/codegen/renderer.py`: `_default_value()` now
|
|
162
|
+
always returns `None` for optional params. Only explicitly provided values
|
|
163
|
+
are sent to the backend.
|
|
164
|
+
|
|
165
|
+
**Bug 7: `analyze.py` missing `Path` import — FIXED 2026-03-23**
|
|
166
|
+
- `AnalyzePhase._ast_fallback` used `Path | None` type hint but `Path` was never
|
|
167
|
+
imported. Caused `NameError: name 'Path' is not defined` at import time, blocking
|
|
168
|
+
all 25 integration tests. Fixed by adding `from pathlib import Path`.
|
|
169
|
+
|
|
170
|
+
**Bug 8: Rust Rocket/Warp not supported in analyzer — FIXED 2026-03-23**
|
|
171
|
+
- `rust_web_analyzer.py` returned `None` for any non-Actix/non-Axum Rust file.
|
|
172
|
+
Added `_ROCKET_MACRO_RE` (handles `#[get("/path")]` with optional extra attrs like
|
|
173
|
+
`data="<body>"`), `_normalize_rocket_path()` (converts `<id>` to `{id}`), and
|
|
174
|
+
basic Warp filter chain detection via `_WARP_FILTER_RE`.
|
|
175
|
+
|
|
176
|
+
**Bug 11: WebSocket PROTOCOL env var overridden by FastAPI detector — FIXED 2026-03-23**
|
|
177
|
+
- `fake_websocket_app` (FastAPI WebSocket) had `PROTOCOL=http` set by the FastAPI
|
|
178
|
+
detector, which caused `backend_protocol.py.j2` to render the generic
|
|
179
|
+
`{% else %}` stub (NotImplementedError) instead of the websocket branch.
|
|
180
|
+
- Fixed in `design.py` `_build_backend_config()`: after processing IPC mechanism
|
|
181
|
+
details, if any capability has `category == 'websocket'`, override PROTOCOL to
|
|
182
|
+
'websocket'. This ensures WS apps always get the real WebSocket backend.
|
|
183
|
+
|
|
184
|
+
**Bug 12: gRPC backend was an unimplemented stub — FIXED 2026-03-23**
|
|
185
|
+
- gRPC tools used `protocol_call` strategy, but the protocol backend only had
|
|
186
|
+
websocket and mqtt branches. gRPC apps got the generic `{% else %}` stub with
|
|
187
|
+
`NotImplementedError`.
|
|
188
|
+
- Fixed: added `ToolImpl.grpc_service`, `grpc_method`, `grpc_proto_module` fields.
|
|
189
|
+
`design.py` populates them from the capability name (`ServiceName.MethodName`).
|
|
190
|
+
`implement.py` compiles `.proto` files to `proto_stubs/` using `grpcio-tools`
|
|
191
|
+
if available. `backend_protocol.py.j2` now has a `{% elif protocol == 'grpc' %}`
|
|
192
|
+
branch that imports compiled stubs and makes real `grpc.aio` calls.
|
|
193
|
+
|
|
194
|
+
**Bug 10: Emitter picks wrong backend for WebSocket apps — FIXED 2026-03-23**
|
|
195
|
+
- `emitter.py` `_emit_backend()` checked `env_vars.get("PROTOCOL") == "http"` to decide
|
|
196
|
+
between `backend_http.py.j2` and `backend_protocol.py.j2`. HTTP detectors set
|
|
197
|
+
`PROTOCOL=http` for all web frameworks including FastAPI WebSocket apps, causing
|
|
198
|
+
the HTTP backend to be emitted for WebSocket tools. Since WebSocket tools call
|
|
199
|
+
`backend.execute()` which doesn't exist on the HTTP backend, every protocol_call
|
|
200
|
+
tool would raise `BackendError("no protocol mapping")` at runtime.
|
|
201
|
+
- Fixed in `src/mcp_anything/codegen/emitter.py`: replaced the `env_vars` check
|
|
202
|
+
with pure tool-strategy logic: `is_http = has_http_tools and not has_protocol_tools`.
|
|
203
|
+
|
|
204
|
+
**Bug 9: Rails explicit route syntax not supported — FIXED 2026-03-23**
|
|
205
|
+
- `_parse_routes_rb` only matched `to: 'controller#action'` syntax but real Rails
|
|
206
|
+
apps (including Rails own engines) use `=> 'controller#action'` and namespaced
|
|
207
|
+
controllers like `'active_storage/blobs/redirect#show'`.
|
|
208
|
+
Also `scope <expression> do` (not just `scope 'string' do`) was not handled,
|
|
209
|
+
causing routes inside engine scope blocks to be silently skipped.
|
|
210
|
+
Fixed: regex now accepts both `to:` and `=>`, allows `/` in controller paths,
|
|
211
|
+
and pushes a placeholder for variable-expression scopes.
|
|
212
|
+
|
|
213
|
+
### ROADMAP accuracy — FIXED 2026-03-16
|
|
214
|
+
- OTel marked complete, v0.5.0 items moved to Completed
|
|
215
|
+
- Version bumped to 0.1.1
|
|
216
|
+
|
|
217
|
+
### Docs sync — FIXED 2026-03-17
|
|
218
|
+
- Detector count: 15 → 17 across README, ROADMAP, CLAUDE.md (JAX-RS/Quarkus, Micronaut were missing)
|
|
219
|
+
- Moved URL-based generation from "Future" to "Completed" in ROADMAP
|
|
220
|
+
- Added JAX-RS/Micronaut to ROADMAP detector list and completed sections
|
|
221
|
+
- README Java section now mentions JAX-RS/Quarkus and Micronaut
|
|
222
|
+
- Replaced old examples (ffmpeg, httpstat, click, imagemagick) with single concrete
|
|
223
|
+
example: auto-generated GitHub MCP server from OpenAPI spec (1,093 tools in ~6s)
|
|
224
|
+
- `examples/github-server/` contains the full generated output
|
|
225
|
+
|
|
226
|
+
### Protocol backend support — IMPLEMENTED 2026-03-17
|
|
227
|
+
- **Problem**: `backend_protocol.py.j2` was a pure stub with TODOs; protocol/socket
|
|
228
|
+
capabilities fell through to `"stub"` strategy calling nonexistent `run_subcommand()`
|
|
229
|
+
- **New `protocol_call` strategy**: PROTOCOL and SOCKET capabilities now get
|
|
230
|
+
`protocol_call` in `design.py` instead of `stub`. Tool handlers call
|
|
231
|
+
`backend.execute(tool_name, **kwargs)` with JSON-RPC messaging.
|
|
232
|
+
- **WebSocket backend** (`backend_protocol.py.j2`): Real implementation using
|
|
233
|
+
`websockets` library — JSON-RPC 2.0 messages, retry with exponential backoff,
|
|
234
|
+
connection pooling, version-compatible close detection. MQTT gets scaffolding,
|
|
235
|
+
other protocols (D-Bus, OSC) get clear "manual wiring required" documentation.
|
|
236
|
+
- **Socket backend** (`backend_socket.py.j2`): Upgraded with `BackendError`,
|
|
237
|
+
retry logic, JSON-RPC response parsing, env var configuration.
|
|
238
|
+
- **Tool template** (`tool_module.py.j2`): Added `protocol_call` handler between
|
|
239
|
+
`cli_function` and `python_call`, imports `BackendError` for protocol tools.
|
|
240
|
+
- **Dependencies**: `websockets>=12.0` auto-added when protocol_call tools exist.
|
|
241
|
+
- **Live tested**: WebSocket JSON-RPC server → 5 calls all returned correct results.
|
|
242
|
+
- **Real-world tested**: Podnet/json-rpc-websocket-server → 13 tools, 15 tests pass.
|
|
243
|
+
|
|
244
|
+
### Scope filtering — IMPLEMENTED 2026-03-20
|
|
245
|
+
- **Problem**: Large codebases (e.g. 1500-route monoliths) expose everything as MCP tools.
|
|
246
|
+
Users need to curate which capabilities are exposed incrementally.
|
|
247
|
+
- **Three mechanisms**:
|
|
248
|
+
1. `--include`/`--exclude` CLI flags: glob patterns on capability name, source path, description
|
|
249
|
+
2. `--review` mode: pause after ANALYZE, write `scope.yaml`, user edits, then `--resume`
|
|
250
|
+
3. `--scope-file`: point to a pre-existing scope YAML for repeatable builds
|
|
251
|
+
- **Scope file semantics**: per-capability `enabled: false` = always excluded,
|
|
252
|
+
`enabled: true` = always included (overrides patterns), omitted = patterns decide
|
|
253
|
+
- **Implementation**: `src/mcp_anything/pipeline/scope.py` + wired into engine.py
|
|
254
|
+
between ANALYZE and DESIGN phases. On `--resume`, auto-loads `scope.yaml` if present.
|
|
255
|
+
- **28 tests** in `tests/test_scope.py` covering: file I/O, include/exclude patterns,
|
|
256
|
+
scope file overrides, combined CLI+file patterns, edge cases, review/resume workflow.
|
|
257
|
+
|
|
258
|
+
### High-Confidence Framework Promotion — DONE (2026-03-23)
|
|
259
|
+
|
|
260
|
+
**Root cause fixed**: `analyze.py` was missing `from pathlib import Path`, blocking
|
|
261
|
+
all 25 integration tests with `NameError` at import time.
|
|
262
|
+
|
|
263
|
+
**New framework coverage added** (fixtures + integration tests + real-repo validation):
|
|
264
|
+
- **Rust Axum**: `fake_axum_app/`, real-tested against tokio-rs/axum (36 tools)
|
|
265
|
+
- **Rust Rocket**: `fake_rocket_app/`, real-tested against SergioBenitez/Rocket (44 tools)
|
|
266
|
+
- Fixed: `_ROCKET_MACRO_RE` now handles extra attrs like `data="<body>"`
|
|
267
|
+
- Fixed: `_normalize_rocket_path()` converts `<id>` to `{id}` for path params
|
|
268
|
+
- **Go Echo**: `fake_go_echo_app/`, real-tested against labstack/echo (22 tools)
|
|
269
|
+
- **Go Chi**: `fake_go_chi_app/`, real-tested against go-chi/chi (15 tools)
|
|
270
|
+
- **Go gorilla/mux**: `fake_go_mux_app/`, real-tested against gorilla/mux (33 tools)
|
|
271
|
+
- **Go net/http**: `fake_go_nethttp_app/`, unit-tested
|
|
272
|
+
- **Socket/XML-RPC**: `fake_socket_xmlrpc_app/`, integration test added
|
|
273
|
+
- **Rails explicit routes**: `fake_rails_explicit_routes_app/` covering `=>`, `to:`,
|
|
274
|
+
`namespace`, `only:`, and variable-expression `scope`. Real-tested against
|
|
275
|
+
rails/rails activestorage (9 tools).
|
|
276
|
+
|
|
277
|
+
### Full Framework Coverage — DONE (2026-03-23)
|
|
278
|
+
|
|
279
|
+
All supported frameworks now have integration tests + real-repo or fixture validation.
|
|
280
|
+
Remaining gap closed:
|
|
281
|
+
- **Kotlin Spring** — `TestKotlinSpring` added (path params, 4+ tools)
|
|
282
|
+
- **Kotlin JAX-RS** — `TestKotlinJaxRS` added (path params, 4+ tools)
|
|
283
|
+
- **Spring MVC** — `TestSpringMVC` added (separate from Spring Boot test)
|
|
284
|
+
- **TypeScript Express** — `TestTypeScriptExpress` added
|
|
285
|
+
- **Python Click CLI** — `TestPythonClick` added (`cli_subcommand` strategy)
|
|
286
|
+
- **Rust Warp** — `fake_warp_app` fixture created + `TestRustWarp` added
|
|
287
|
+
|
|
288
|
+
### Integration Test Coverage (updated 2026-03-23)
|
|
289
|
+
|
|
290
|
+
484 total tests. `tests/test_integration.py` covers every supported framework.
|
|
291
|
+
`tests/test_functional.py` (35 tests) verifies tool functions **actually call the backend**
|
|
292
|
+
with correct method/path/params by injecting mock backends into generated tool modules.
|
|
293
|
+
`tests/test_e2e_http.py` (4 tests) proves end-to-end round-trips against real servers:
|
|
294
|
+
HTTP (Flask→mock HTTP server), CLI (subprocess spawn), WebSocket (real WS JSON-RPC server),
|
|
295
|
+
gRPC (real gRPC server with compiled proto stubs).
|
|
296
|
+
Every supported framework has a functional test — not just a structural one.
|
|
297
|
+
- Python CLI (argparse + Click), Flask, FastAPI, Django DRF
|
|
298
|
+
- Express.js (JS + TypeScript, including cross-file router mount prefix regression)
|
|
299
|
+
- Spring Boot, Spring MVC, JAX-RS, Micronaut
|
|
300
|
+
- **Kotlin Spring, Kotlin JAX-RS**
|
|
301
|
+
- **Go Gin, Go Echo, Go Chi, Go gorilla/mux, Go net/http** (all 5 Go frameworks)
|
|
302
|
+
- **Ruby Rails** (resources + explicit `=>` + `to:` + namespace + only:)
|
|
303
|
+
- **Rust Actix, Rust Axum, Rust Rocket, Rust Warp** (all 4 Rust frameworks)
|
|
304
|
+
- OpenAPI 3.0 spec, GraphQL SDL, gRPC/Protobuf
|
|
305
|
+
- **WebSocket protocol** (raw websockets library, protocol_call strategy)
|
|
306
|
+
- **Socket/XML-RPC** (SimpleXMLRPCServer, socket IPC detection)
|
|
307
|
+
- HTTP transport (SSE config)
|
|
308
|
+
- stdio transport (command-based mcp.json)
|
|
309
|
+
- Pipeline resume (partial run → resume completes remaining phases)
|
|
310
|
+
- Manifest integrity (analysis + design populated, files tracked)
|
|
311
|
+
- AGENTS.md content (tool names documented)
|
|
312
|
+
- **Scope filtering** (include/exclude patterns, scope file, review/resume workflow)
|
|
313
|
+
|
|
314
|
+
### Protocol & SDK currency — DONE (2026-09-13)
|
|
315
|
+
|
|
316
|
+
The MCP spec moved to **2026-07-28** (stateless core, `server/discover`, Multi Round-Trip
|
|
317
|
+
Requests replacing server-initiated `sampling`/`roots`/`elicitation`, `CacheableResult`
|
|
318
|
+
list caching) and `mcp-use` shipped **v2.5** (built on the split
|
|
319
|
+
`@modelcontextprotocol/{core,client,server,ext-apps}` v2 SDK, CLI-driven `dev`/`build`/`start`
|
|
320
|
+
lifecycle, HTTP-first/stateless runtime). Both emitters were updated accordingly:
|
|
321
|
+
- **Removed the Skybridge emitter** — only `fastmcp` (default) and `mcp-use` targets remain.
|
|
322
|
+
Deleted `emit/typescript_skybridge/`, its test, the `examples/spotify-playlist-generator/`
|
|
323
|
+
generated example, and the `--target skybridge` CLI/engine wiring.
|
|
324
|
+
- **TypeScript/mcp-use, both pipelines** (`emit/typescript_mcp_use/phase.py` for `build`,
|
|
325
|
+
`pipeline/implement_mcp_use.py` + `codegen/templates/mcp_use/server.ts.j2` +
|
|
326
|
+
`pipeline/package_mcp_use.py` for legacy `generate`): import `MCPServer` from `"mcp-use"`
|
|
327
|
+
(root, not the old `"mcp-use/server"` or `@modelcontextprotocol/sdk` v1 paths), use
|
|
328
|
+
`inputSchema` (not `schema`), return raw `CallToolResult` (`content` + `structuredContent`)
|
|
329
|
+
instead of the now-deprecated `text()`/`object()` response helpers, and end with
|
|
330
|
+
`export default server;` — no more hand-rolled `StdioServerTransport`/`server.listen(3000)`.
|
|
331
|
+
`package.json` scripts now call `mcp-use dev/build/start` (pinned to `--host 0.0.0.0 --port 8000`
|
|
332
|
+
in `start`, matching CONTRACT C-15) and depend only on `mcp-use>=2.5` + `zod>=4.0`.
|
|
333
|
+
- **Python/FastMCP** (`emit/python_fastmcp/phase.py`): dependency floors bumped to
|
|
334
|
+
`fastmcp>=4.0`, `mcp>=2.0` (was `fastmcp>=0.1`, `mcp>=1.0` — also fixed the same stale
|
|
335
|
+
default in `models/design.py` and `pipeline/tool_design.py`, which otherwise shadowed the
|
|
336
|
+
emitter's own floor via the dependency-merge logic in `_emit_pyproject`).
|
|
337
|
+
- **Tool annotations** — both emitters now emit `readOnlyHint`/`destructiveHint`/`openWorldHint`
|
|
338
|
+
for `http_call` tools, inferred from the HTTP method.
|
|
339
|
+
- **Compact responses fixed in TypeScript** — the TS emitter previously never truncated
|
|
340
|
+
non-verbose payloads (only Python did); it now shares the same `compact()` behavior.
|
|
341
|
+
- **Hardened docstring interpolation** (`emit/python_fastmcp/phase.py`): `server_description`/
|
|
342
|
+
`tool.description` are now escaped before landing inside triple-quoted Python docstrings
|
|
343
|
+
(matching the `safe_docstring` Jinja filter the legacy templates already used) — an
|
|
344
|
+
unescaped `"""` in a domain brief or OpenAPI description could otherwise break out of the
|
|
345
|
+
docstring and inject code into the generated server.
|
|
346
|
+
- **CONTRACT.md**: C-14 (stdio) is now **[py]**-only; C-15 (HTTP) documents that the TS target
|
|
347
|
+
reaches `0.0.0.0:8000` via `npm run start`, not an `MCP_TRANSPORT` env var; C-28 [ts] drops
|
|
348
|
+
the `@modelcontextprotocol/sdk` requirement (supplied transitively by `mcp-use`); C-01..C-28
|
|
349
|
+
count corrected (was mis-stated as C-01..C-29 in this file and ROADMAP.md).
|
|
350
|
+
|
|
351
|
+
### v0.3.0 — DONE (2026-11-16)
|
|
352
|
+
|
|
353
|
+
- **Model layer** (`src/mcp_anything/llm.py`): every model call goes through it. `--model provider:model`
|
|
354
|
+
or `MCP_ANYTHING_MODEL`; providers anthropic, openai, openrouter, ollama, lmstudio, llamacpp, vllm
|
|
355
|
+
(stdlib HTTP for all but Anthropic). Default `claude-opus-5-5` with server-side refusal fallbacks.
|
|
356
|
+
`tests/test_llm.py` fails if a `claude-*` model id appears anywhere else in `src/`.
|
|
357
|
+
`tool_step()` adds tool calling for `eval --agent`.
|
|
358
|
+
- **One command** (`quick.py`): `mcp-anything <source>` is rewritten to `quick <source>` in `cli.main`
|
|
359
|
+
when the first word is not a subcommand (keep `COMMANDS` in `cli.py` in sync with the parser).
|
|
360
|
+
- **Install** (`install.py`): client config paths and entry shapes for claude-code, claude-desktop,
|
|
361
|
+
cursor, vscode.
|
|
362
|
+
- **Grade** (`grade/`): `client.py` is a stdlib MCP client (stdio, streamable HTTP, JSON file, server
|
|
363
|
+
folder) with sessions that can call tools; `rules.py` holds the 15 rules (G01..G15) and their
|
|
364
|
+
weights; `__init__.py` scores and renders. Generated servers must keep scoring >= 90
|
|
365
|
+
(`test_grade_generated_server`).
|
|
366
|
+
- **Eval** (`evaluate.py`): direct and agent modes over the grade client's sessions.
|
|
367
|
+
- **Emitter fix**: `emit/python_fastmcp/phase.py` writes `Annotated[..., Field(description=...)]`,
|
|
368
|
+
`Literal[...]` for enums, borrows descriptions of same-named params, completes short tool
|
|
369
|
+
descriptions with method and path.
|
|
370
|
+
- **Domain modeling** falls back to the deterministic model on incomplete LLM JSON.
|
|
371
|
+
- CI (`.github/workflows/tests.yml`), PyPI release on tags (`release.yml`), version single-sourced
|
|
372
|
+
in `src/mcp_anything/__init__.py`, `action.yml` (GitHub Action for grade),
|
|
373
|
+
`scripts/leaderboard.py` + `scripts/servers.yaml`.
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## Implementation Plan
|
|
378
|
+
|
|
379
|
+
### Phase 1: Fix Bugs — DONE (2026-03-16)
|
|
380
|
+
|
|
381
|
+
All three bugs (1.1 test phase ordering, 1.2 verify_structure path, 1.3 Express
|
|
382
|
+
Router tool naming) have been fixed. 314 unit tests pass.
|
|
383
|
+
|
|
384
|
+
### Phase 2: Add Integration Tests — DONE (2026-03-16)
|
|
385
|
+
|
|
386
|
+
20 integration tests in `tests/test_integration.py` covering all 12 source types,
|
|
387
|
+
transport modes, resume, manifest integrity, and AGENTS.md generation. Each test
|
|
388
|
+
runs the full 6-phase pipeline and verifies: file structure, Python syntax validity,
|
|
389
|
+
server importability, and correct tool names/strategies.
|
|
390
|
+
|
|
391
|
+
### Phase 3: Wire Up OpenTelemetry Properly — DONE (2026-03-16)
|
|
392
|
+
|
|
393
|
+
Passed `_tracer` to `register_tools()` and added a `_trace` decorator in
|
|
394
|
+
`tool_module.py.j2` that wraps each tool handler with
|
|
395
|
+
`tracer.start_as_current_span("tool.<name>")`.
|
|
396
|
+
|
|
397
|
+
### Phase 4: URL-based generation — DONE (2026-03-16)
|
|
398
|
+
|
|
399
|
+
`mcp-anything generate https://api.example.com/openapi.json` now works.
|
|
400
|
+
New module `src/mcp_anything/url_fetcher.py` handles URL detection, spec
|
|
401
|
+
fetching, type detection (OpenAPI JSON/YAML, Swagger, GraphQL SDL, Protobuf),
|
|
402
|
+
name derivation from spec title or hostname, and Swagger UI/ReDoc URL resolution.
|
|
403
|
+
24 tests in `tests/test_url_fetcher.py` including full pipeline integration.
|
|
404
|
+
|
|
405
|
+
### Phase 5: Protocol backend support — DONE (2026-03-17)
|
|
406
|
+
|
|
407
|
+
New `protocol_call` strategy for WebSocket and Socket backends. Replaced the
|
|
408
|
+
protocol stub with a real WebSocket backend using `websockets` library. Socket
|
|
409
|
+
backend upgraded with BackendError, retry logic, JSON-RPC parsing. Added
|
|
410
|
+
integration test for WebSocket protocol. 359 total tests pass.
|
|
411
|
+
|
|
412
|
+
### Phase 6: Scope Filtering — DONE (2026-03-20)
|
|
413
|
+
|
|
414
|
+
`--include`, `--exclude`, `--review`, `--scope-file` CLI flags. Scope YAML file
|
|
415
|
+
for per-capability curation. 28 tests in `tests/test_scope.py`. See scope.py docs.
|
|
416
|
+
|
|
417
|
+
### Phase 7: Future Features (from ROADMAP v0.6.0+)
|
|
418
|
+
|
|
419
|
+
In priority order:
|
|
420
|
+
1. **CLI UX** — validate `--phases` input, better error messages
|
|
421
|
+
2. **Multi-service composition** — one MCP server proxying multiple backends
|
|
422
|
+
3. **Config file** — `.mcp-anything.yaml` for persistent project settings
|
|
423
|
+
4. **Plugin system** — custom detectors for niche frameworks
|
|
424
|
+
|
|
425
|
+
### What "Done" Looks Like
|
|
426
|
+
|
|
427
|
+
The product is "done" when:
|
|
428
|
+
1. `mcp-anything generate <any-codebase>` produces a working MCP server
|
|
429
|
+
2. Tool descriptions are clean and useful for LLMs
|
|
430
|
+
3. `mcp-anything serve <output>` starts the server and it responds to MCP calls
|
|
431
|
+
4. Users see zero warnings or errors during normal generation
|
|
432
|
+
5. Integration tests cover all 12+ source types automatically
|
|
433
|
+
6. The generated server actually proxies calls to the target application
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# mcp-anything Output Contract v1.0
|
|
2
|
+
|
|
3
|
+
Both emitters (Python/FastMCP, TypeScript/mcp-use) MUST satisfy every item applicable to the
|
|
4
|
+
selected backend. Items are verified by the conformance suite and referenced by ID in
|
|
5
|
+
`conformance_report.json`.
|
|
6
|
+
|
|
7
|
+
Items marked **[both]** apply to both emitters.
|
|
8
|
+
Items marked **[py]** apply to the Python/FastMCP emitter only.
|
|
9
|
+
Items marked **[ts]** apply to the TypeScript/mcp-use emitter only.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Discovery [both]
|
|
14
|
+
|
|
15
|
+
**C-01** — `GET /.well-known/mcp` returns HTTP 200 with `Content-Type: application/json`.
|
|
16
|
+
**C-02** — Discovery response includes `server_name`, `version`, and `tool_count`.
|
|
17
|
+
**C-03** — Discovery response includes a `tool_groups` array listing each group with its `disclosure_level`.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Tool Shape [both]
|
|
22
|
+
|
|
23
|
+
**C-04** — Each tool has a non-empty `name`, `description`, and `parameters` array (may be empty).
|
|
24
|
+
**C-05** — Tool description is written in agent-consumer voice: present tense, action-oriented, ≥ 20 characters, does not start with "Wraps" or "Calls".
|
|
25
|
+
**C-06** — No 1:1 API mirroring: when the data source exposes ≥ 3 CRUD operations on the same resource, they MUST be collapsed into a single grouped tool.
|
|
26
|
+
**C-07** — Every tool group exposes a single entry-point with an `operation` discriminator parameter whose enum lists the collapsed operations.
|
|
27
|
+
**C-08** — At least one `ComposedTool` is present when the domain brief contains a use-case that requires ≥ 3 sequential tool calls.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Progressive Disclosure [both]
|
|
32
|
+
|
|
33
|
+
**C-09** — The default tool listing (no flags) returns only tools with `disclosure_level = "default"`.
|
|
34
|
+
**C-10** — Passing `verbose=true` to any tool returns the full response payload including metadata.
|
|
35
|
+
**C-11** — Tools with `disclosure_level = "verbose"` are excluded from the default listing but callable directly by name.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Response Shape [both]
|
|
40
|
+
|
|
41
|
+
**C-12** — Default tool responses are compact: contain only the fields declared in the tool spec's `compact_fields` list.
|
|
42
|
+
**C-13** — When `verbose=true`, the response includes the full payload plus a `_meta` key with `latency_ms` and `backend_status`.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Transport
|
|
47
|
+
|
|
48
|
+
**C-14** — **[py]** Server starts on stdio transport without requiring environment variables beyond optional API keys. The mcp-use (TypeScript) target is HTTP-first — see C-15.
|
|
49
|
+
**C-15** — **[both]** Server starts on HTTP transport at `0.0.0.0:8000`. **[py]**: via `--transport http` (or `MCP_TRANSPORT=http`). **[ts]**: via `npm run start`, the mcp-use CLI's production command; `package.json` pins its `--host`/`--port` to match.
|
|
50
|
+
**C-16** — **[both]** Server is stateless: no in-process mutable state persists between tool calls.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Infrastructure [both]
|
|
55
|
+
|
|
56
|
+
**C-17** — Output directory contains a `Dockerfile` that builds a runnable image with no embedded secrets.
|
|
57
|
+
**C-18** — The Dockerfile exposes port 8000 and reads all API keys from environment variables at runtime.
|
|
58
|
+
**C-19** — The server emits a structured log line per tool call: `{tool, status, latency_ms}` (anonymized — no parameter values).
|
|
59
|
+
**C-20** — Telemetry endpoint is configurable via `MCP_TELEMETRY_ENDPOINT` env var; silently disabled when unset.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Skill Bundle [both]
|
|
64
|
+
|
|
65
|
+
**C-21** — `SKILL.md` is present in the output directory.
|
|
66
|
+
**C-22** — `SKILL.md` contains all required sections: Overview, Tools, Usage Patterns, Gotchas, Recipe Workflows, Composed-Call Examples, Anti-patterns.
|
|
67
|
+
**C-23** — `quick_queries.json` is present and contains one entry per use-case from the domain brief, each with `id`, `brief_item_id`, `prompt`, `expected_tool`, and `notes` keys.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Validation [both]
|
|
72
|
+
|
|
73
|
+
**C-24** — `eval_cases.json` is present and contains ≥ 1 happy-path case and ≥ 1 edge-case per tool.
|
|
74
|
+
**C-25** — `conformance_report.json` is present and valid when `--run-eval` is passed.
|
|
75
|
+
**C-26** — `coverage_ratio` in `conformance_report.json` is ≥ `eval_threshold` (default 0.80).
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Python/FastMCP Specifics [py]
|
|
80
|
+
|
|
81
|
+
**C-27** — Generated server imports without error under Python ≥ 3.11.
|
|
82
|
+
**C-28** — `pyproject.toml` declares `mcp>=2.0` and `fastmcp>=4.0` as dependencies.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## TypeScript/mcp-use Specifics [ts]
|
|
87
|
+
|
|
88
|
+
**C-27** — Generated server compiles without error under `tsc --noEmit` with `strict: true`.
|
|
89
|
+
**C-28** — `package.json` declares `mcp-use>=2.5` as a dependency. The mcp-use package supplies the
|
|
90
|
+
underlying `@modelcontextprotocol/{core,client,server,ext-apps}` v2 SDK transitively — generated
|
|
91
|
+
code does not import from `@modelcontextprotocol/sdk` (the pre-v2 package) directly.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## How to verify
|
|
96
|
+
|
|
97
|
+
Run the conformance suite against a generated server:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
mcp-anything validate --output-dir <server-dir> [--run-eval] [--ci]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Each item ID appears in `conformance_report.json` under `contract_checks`:
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"contract_checks": [
|
|
108
|
+
{"id": "C-01", "passed": true},
|
|
109
|
+
{"id": "C-05", "passed": false, "reason": "Tool 'list_items' description starts with 'Wraps'"}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Structural items (C-01..C-05, C-09, C-12, C-17..C-24, C-27..C-28) are checked without a
|
|
115
|
+
running server. Transport and response-shape items (C-10, C-11, C-13..C-16, C-19..C-20,
|
|
116
|
+
C-25..C-26) require `--run-eval`.
|