Skip to content

docs(admin): add MCP server OpenAPI reference - #675

Merged
kayx23 merged 1 commit into
mainfrom
docs/mcp-admin-openapi-reference
Jun 30, 2026
Merged

docs(admin): add MCP server OpenAPI reference#675
kayx23 merged 1 commit into
mainfrom
docs/mcp-admin-openapi-reference

Conversation

@kayx23

@kayx23 kayx23 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • document the existing MCP server Admin API routes in the generated OpenAPI source
  • include the generated MCP server resource schema in the Admin API reference
  • add ReDoc titles for MCP enum variants so rendered reference tabs are readable

Runtime impact

This PR does not change runtime behavior. The MCP admin routes and handlers are already mounted in the admin router on main; this change only updates OpenAPI/reference metadata and the generated resource schema titles used by documentation.

Validation

  • cargo run -p aisix-core --bin dump-schema
  • cargo test -p aisix-admin openapi_
  • cargo run -p aisix-admin --bin dump-openapi > /tmp/aisix-admin-openapi-mcp.json
  • cargo fmt --check

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds OpenAPI documentation for /admin/v1/mcp_servers and /admin/v1/mcp_servers/{id} endpoints including McpServerEntry schema, MCP Servers tag, and McpServer resource schema registration. Also injects title metadata into McpAuthType and McpTransport enum variant definitions via a new post-processing helper.

MCP Server OpenAPI Documentation and Schema Titles

Layer / File(s) Summary
Enum variant title injection
crates/aisix-core/src/models/schema.rs, schemas/resources/mcp_server.schema.json
mcp_server_root_schema() calls new title_single_value_enum_variants() to insert title fields into McpAuthType (none, bearer) and McpTransport (streamable_http) oneOf branches; the compiled schema JSON reflects these additions.
MCP server OpenAPI paths, schemas, and tags
crates/aisix-admin/src/openapi.rs
Adds GET/POST /admin/v1/mcp_servers and GET/PUT/DELETE /admin/v1/mcp_servers/{id} path entries, McpServerEntry component schema, MCP Servers tag, and registers mcp_server.schema.json in RESOURCE_SCHEMAS.
Test updates
crates/aisix-admin/src/openapi.rs
Three existing tests updated to assert MCP server paths and schemas exist and that body-size rejection is documented for POST/PUT /admin/v1/mcp_servers*.

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

  • api7/aisix#664: Introduces the MCP server admin CRUD resource and mcp_server schema that this PR's OpenAPI and title annotation changes build upon.
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding MCP server OpenAPI documentation for the admin API.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
E2e Test Quality Review ✅ Passed PASS: The new OpenAPI/schema tests are readable and targeted; real E2E MCP CRUD coverage already exists in crates/aisix-admin/tests/etcd_integration.rs against real etcd.
Security Check ✅ Passed PASS: Docs/schema-only changes; no runtime logging, auth, storage, TLS, or ownership logic changed, and no secret exposure or bypass issues found.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/mcp-admin-openapi-reference

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kayx23
kayx23 marked this pull request as ready for review June 30, 2026 08:11
@kayx23
kayx23 merged commit 6b1d8cc into main Jun 30, 2026
10 checks passed
@kayx23
kayx23 deleted the docs/mcp-admin-openapi-reference branch June 30, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant