Skip to content

Comments

Add MCP endpoint at /admin/mcp for AI/LLM access to container metadata#3659

Draft
adrw wants to merge 2 commits intomasterfrom
adrw/admin-mcp-endpoint
Draft

Add MCP endpoint at /admin/mcp for AI/LLM access to container metadata#3659
adrw wants to merge 2 commits intomasterfrom
adrw/admin-mcp-endpoint

Conversation

@adrw
Copy link
Collaborator

@adrw adrw commented Feb 9, 2026

Summary

  • Adds a new MCP (Model Context Protocol) endpoint at /admin/mcp that exposes all container admin metadata to AI/LLM agents
  • Provides a get_metadata tool, 6 MCP resources (config, jvm, web-actions, guice, service-graph, database-hibernate), and a container_admin prompt
  • Reuses the existing Map<String, Provider<Metadata>> multibinder (same as AllMetadataAction) so any custom MetadataProvider is automatically available
  • Uses @ContainerAdminMcp qualifier to create an isolated MCP server group with @AdminDashboardAccess authorization

Test plan

  • 7 integration tests covering tool listing, resource listing, prompt listing, tool invocation (valid + invalid), and resource reading
  • Full misk-admin test suite passes
  • Manual verification with an MCP client

🤖 Generated with Claude Code

adrw and others added 2 commits February 9, 2026 09:15
Expose all container admin metadata (config, JVM, web actions, Guice bindings,
service graph, database) via MCP protocol on a new /admin/mcp endpoint. This
allows AI/LLM agents to discover and query the same metadata available through
the admin dashboard REST API.

New files:
- ContainerAdminMcp: Guice qualifier annotation for the MCP server group
- ContainerAdminMcpWebAction: POST endpoint at /admin/mcp
- ContainerMetadataTool: get_metadata tool to query metadata by ID
- ContainerMetadataResources: 6 MCP resources (config, jvm, web-actions, guice,
  service-graph, database-hibernate)
- ContainerAdminPrompt: container_admin prompt for inspection/debugging
- ContainerAdminMcpModule: Guice module wiring everything together

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Regenerate misk-admin.api to include new MCP public classes
- Add missing direct dependency declarations required by projectHealth:
  api: kotlinxCoroutinesCore, kotlinxSerializationCore, mcpKotlinSdkCore
  implementation: kotlinxSerializationJson, mcpKotlinSdkServer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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