feat(kiloclaw) Enable composio connect via mcp - #4691
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThis update adds Files Reviewed (6 files)
Previous Review Summary (commit 3bb65b8)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 3bb65b8)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryRemoving the legacy Composio catalog fields drops Overview
Issue Details (click to expand)WARNING
Files Reviewed (10 files)
Reviewed by claude-sonnet-5 · Input: 18 · Output: 3.8K · Cached: 343.8K Review guidance: REVIEW.md from base branch |
Summary
KiloClaw's Composio settings asked for a
uak_user API key plus an organization value, and signed the Composio CLI into the instance at boot. Composio only issuesuak_keys through its agent-signup API, a leftover from the retired managed-onboarding flow. A user copying a key from the Composio dashboard gets ack_consumer key, which the old validation rejected, so the integration could not be configured by hand.This replaces the CLI credential pair with a single consumer key and switches the controller from CLI sign-in to writing a Composio Connect remote MCP server into the instance's OpenClaw config. Nothing is installed or run in the instance: OpenClaw dials Composio's hosted endpoint and forwards the key as a header. Toolkit authorization (Gmail, Calendar, and so on) stays in the Composio dashboard.
Changes
composioConsumerKey(COMPOSIO_CONSUMER_KEY), validated as^ck_[A-Za-z0-9_-]{8,}$. Dropped theuak_/org fields andallFieldsRequired. Validation is deliberately loose because Composio's own CLI does no prefix or length check.applyComposioConnectConfiginconfig-writer.tswritesmcp.servers.composio(transport: streamable-http, Composio's URL,x-consumer-api-keyheader) when a key is set. The definition is replaced outright rather than merged, so a staleauth: 'oauth'field cannot survive and suppress the header.openclaw.jsonpersists on the volume across redeploys. Removal is limited to definitions KiloClaw tags with akiloclawManagedmarker, so a Composio server a user configured by hand (same URL and header) is left intact.composio login/composio link.COMPOSIO_USER_API_KEY/COMPOSIO_ORGstill reach the instance as ordinary custom secrets, so a sign-in a user set up themselves keeps working..specs/kiloclaw-composio.mdto describe the MCP surface and the managed-marker ownership rule.Verification
apps/webJest requires a running local Postgres and was not run locally; controller and secret-catalog suites pass (vitest). A realck_key againstconnect.composio.dev/mcphas not been exercised, so the returned tool list is unconfirmed.Visual Changes
N/A
Reviewer Notes
mcp.servers.composiowrite and removal heuristics inapplyComposioConnectConfigare the main thing to scrutinize. Ownership is tracked by thekiloclawManagedmarker rather than inferred from Composio's published URL/header, because a hand-configured Connect server is otherwise byte-identical.