MCP Integration
Placement
MCP belongs behind the integration boundary.
Flow:
- API layer receives request
- access service and policy engine validate permission
- integration service resolves adapter and capability metadata
- infrastructure mcp registry locates the adapter
- audit service records invocation metadata
- event service can emit integration events when needed
Directory Placement
internal/domain/mcp
internal/application/integration
internal/infrastructure/mcpRegistration Model
Each MCP adapter should register:
- adapter id
- display name
- capability list
- required scopes
- transport configuration
- timeout and isolation policy
Built-in adapters currently include at least:
platform-native.v1logs.v1metrics.v1traces.v1delivery.v1
The traces.v1 identifier remains for compatibility, but Core trace execution is unavailable until
a future external provider integration. The generic external logs.query capability currently
queries durable cluster logs only.
Permission Boundary
MCP must not bypass platform authorization. Every MCP capability maps to a platform action and target scope. The platform owns:
- user identity
- authorization decision
- invocation audit
- response filtering
delivery.v1 currently exposes its Gateway tools to MCP clients using canonical tool names:
delivery.applications.listdelivery.applications.detaildelivery.applications.createdelivery.application_environments.listdelivery.application_services.listdelivery.build_sources.listdelivery.release_targets.listdelivery.release_bundles.listdelivery.execution_tasks.listdelivery.execution_logs.listdelivery.release_context.diffdelivery.rollback.contextdelivery.actions.trigger
These capabilities must still pass through platform permission, scope, audit, and operation-log boundaries; Gin handlers must never execute repository writes or long-running shell commands directly.
Module Contract
To support enabling and disabling built-in modules in the single binary while reserving extension points for future external module protocols, the platform defines a module registration contract.
Minimum fields on a backend module descriptor:
idnamedefaultPathenabledConfigKeydependenciesvisiblePermissionsseedMenus
Current module status is exposed through GET /api/v1/modules.