Skip to content

Orbitport mcp - #154

Open
DaniDeltaT wants to merge 4 commits into
mainfrom
orbitport-mcp
Open

DaniDeltaT wants to merge 4 commits into
mainfrom
orbitport-mcp

Conversation

@DaniDeltaT

Copy link
Copy Markdown
Contributor

Description

Adds a gateway native MCP endpoint for Orbitport KMS at POST /mcp.
exposes the existing KMS JSON RPC capabilities as MCP tools while preserving the current gateway security and execution model: bearer token auth, rate limiting, account hold/release, authoritative kms_tenant resolution, and KMS plugin routing all remain inside the gateway.

Added optional MCP support behind config ORBITPORT_MCP_ENABLED.
Added POST /mcp plus protected-resource metadata endpoints: /.well-known/oauth-protected-resource
/.well-known/oauth-protected-resource/mcp

Exposed existing KMS operations as MCP tools: crypto KMS tools like kms_create_key, kms_encrypt, kms_decrypt, kms_sign, kms_rotate_key
key-store tools like kms_keystore_put, kms_keystore_get, kms_keystore_list, kms_keystore_delete

Added MCP tools/list schemas with both inputSchema and outputSchema (assures agentic callers can properly formulate payloads being sent and create scripts that adhere to the expected output schema)

Reused existing KMS request/response shapes, so MCP tool arguments match the current JSON-RPC API.
Prevented callers from supplying tenant identity fields such as ClientId, client_id, KmsTenant, or kms_tenant.
Added MCP protocol compatibility handling for current and older client initialization formats (currently validated on openAI)
Added origin allowlist handling for browser-origin MCP requests.
Preserved opaque JSON precision for key-store MCP responses by using raw JSON serialization.
Updated README, context docs, dev guide, KMS README, and Swagger/OpenAPI docs.

Security Notes
MCP does not bypass the existing gateway path. Tool execution still requires a valid Orbitport bearer token, performs account hold/release, and uses the account resolved kms_tenant.
Only tools/call performs account hold and spends credits. Metadata/discovery calls such as initialize and tools/list are non sensitive and are not charged.

Changes

  • Main feature or fix implemented
  • Tests added
  • Documentation updated

Checklist

  • Code compiles without warnings
  • All tests and pipelines pass
  • Commit messages are clear and descriptive
  • PR linked to an issue if applicable (Fixes #XX)

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