Skip to main content

Integrations

The managed Composio UI is now the default. The /integrations page has four spaces — Tools, Triggers, Channels and Webhooks (see the notifications guide). Tools is the managed integration platform (Composio): connected apps, the catalog and, per app, which agents may use it — so you can connect apps via OAuth without standing up and maintaining your own MCP servers. Triggers is where routine, agent and artifact endpoints that receive HTTP requests live (see Incoming webhooks below).The legacy self-hosted MCP connector management UI is restorable by building the dashboard with NEXT_PUBLIC_LEGACY_MCP_INTEGRATIONS=true. No legacy code or API has been removed — the MCP endpoints documented below still work, and credentials are unaffected. The sections below describe the legacy mechanism.
Crewship supports two integration mechanisms: OAuth 2.0 connections for service authentication and MCP (Model Context Protocol) servers for extending agent tool capabilities. A third, simpler surface — incoming webhooks — lets an external service start work in Crewship with a signed HTTP request and no connected account at all.

Incoming webhooks

Integrations → Triggers lists every endpoint an outside service can POST to in one table — Trigger, Starts, Checks the sender, Last call, State — with Starts (Routines, Agents, Artifacts) in the panel. A routine trigger runs a saved routine with the request body as its event input; an agent trigger starts a background run; an artifact trigger writes a webhook or script panel (artifacts keep theirs per artifact). Opening a trigger gives it a page — Overview (Sender → Checks → Becomes → Starts, the URL, recent calls), Mapping (routine inputs, edited in place), Calls and Settings (point it at another routine, calls per minute, on/off, Rotate…, which stops the old secret at once, and Delete…). Call counts exist only for routine triggers. The filter is linkable (/integrations?space=triggers&starts=routine&target=<id>; the old ?tab=incoming&section=routine&target=<id> still works). Creating one. Click New trigger; it takes three steps:
  1. Goes to — a Routine, an Agent or an Artifact panel, and which one. A routine trigger can pin the routine’s current version (Pin vN) or follow Always latest. Only a webhook starts a trigger today; schedules stay on the routine.
  2. Sender and mapping — Who sends it (for a routine: GitHub or Any system; an agent takes any signed system; an artifact uses a token in the URL), the routine’s input mapping, Calls per minute and an optional name.
  3. URL — the URL and secret, shown once. This step closes with Done, not with Esc or a click outside.
Who sends it is the routine endpoint’s format: The format is fixed once the endpoint exists; to switch a sender’s protocol, create a new endpoint. Mapping. A routine trigger maps the call to the routine’s inputs: each row is an input name and what it takes, usually a template such as {{ inputs.event.pull_request.number }}. Add, change or remove rows on the trigger’s Mapping tab; the edits wait on the page’s Save bar and one Save sends them (PATCH …/pipeline-webhooks/{id} with inputs_template). event, raw and headers always come from the call and cannot be mapped; a name used twice or a row without a value cannot be saved. The CLI equivalent is crewship routine webhooks update <id> --inputs-template. Where the URL and secret show. On Create the dialog’s last step shows the URL and the Secret once, each with a copy button. The routine URL contains the token and is masked afterwards; the secret is never displayed again. Copy both now. A GitHub-format URL ends in /github-pull-request — the suffix is part of what you paste into GitHub. Later, an endpoint row offers enable/disable, Copy URL (agents only — their URL holds no secret), Rotate secret (a new secret shown once; the URL survives) and Delete (senders get 404; existing receipts are kept). From the CLI. The same endpoints are crewship routine webhooks create --slug <routine> [--ingress-profile github], crewship routine webhooks fire <url> --secret … --body … to send a signed test delivery, and crewship routine webhooks receipts list --webhook <id> to read what arrived — see crewship routine webhooks and the Webhooks API reference.

Managed Integrations (Composio)

Crewship’s managed integration path uses Composio so you connect apps once instead of hosting MCP servers yourself. Object model How isolation works. An agent is bound to exactly one user_id and therefore sees only that user’s connected accounts — never anyone else’s. To give 30 mailboxes to 30 agents, create 30 users (one per mailbox) and bind each agent to its user; the per-agent MCP URL is scoped server-side, so an agent cannot reach another user’s accounts even in principle. Use Composio projects only for coarse isolation (per environment, or per customer/workspace) — not per agent. Giving agents an app. Open the app under Integrations → Tools and its Access tab: each agent, grouped by crew, is Off, Read-only or Full (a custom tool list is picked on the agent and kept here). Changes are a draft: the page’s Save bar counts the agents changed, Save writes one bind per agent and Discard puts them back. An agent the server refuses keeps its change and is named in the error; the others are saved. The panel search on Tools finds apps and also tools by name across every connected app (GITHUB_CREATE_PULL_REQUEST); a hit opens that app on Tools with the tool marked. The CLI equivalent is crewship integration composio tools <app> --search <text>. Enabling. Add a Composio project API key either per-workspace from the app (Integrations → API key, or crewship integration composio key set) — validated and stored encrypted — or server-wide via the COMPOSIO_API_KEY env. The effective key resolves workspace-first, then env. Billing is by tool calls (Composio free tier = 20K/mo), not by number of users or connected accounts.
Multi-tenant isolation. A Composio API key maps to a single Composio project, which is the isolation boundary — every connected account, user, and trigger under that key is visible to anyone with access to a workspace using it. The server-wide COMPOSIO_API_KEY env therefore puts all workspaces in one shared project: do not back multiple independent tenant workspaces with it. For true per-tenant isolation, give each workspace its own key (Integrations → API key) so it maps to a separate Composio project.
Inspecting the inventory. The operator view of the catalog and connected accounts (grouped by user):
returns the same data as GET /api/v1/integrations/composio/inventory. This is an operator/admin view — agents are never handed the full list.

Connecting an account & binding an agent

The end-to-end flow from a fresh project key to an agent that can drive an app:
Account lifecycle. Refresh, revoke, or permanently remove a connected account at the provider:

Default connector (COMPOSIO_DEFAULT_CONNECTOR)

By default an agent only reaches Composio tools an operator explicitly bound to it (crewship integration composio bind). The server flag COMPOSIO_DEFAULT_CONNECTOR flips this to a default-on model so agents never lack a tool they should obviously have (e.g. calendar):
  • ON — every agent without an explicit per-agent Composio binding automatically gets a workspace-wide default connector: a Composio MCP server with full access to all the workspace’s connected apps, scoped to the workspace’s default Composio user. No manual bind needed.
  • A per-agent binding always overrides the default for that agent — the bound (tool-scoped) server resolves and the default is not added, so you can still restrict specific agents.
  • Legacy (non-Composio) MCP servers are turned OFF at resolve time while the flag is on (they are not deleted — flip the flag back off to restore them). This makes Composio the single managed connector surface.
  • OFF (default) — today’s behaviour, unchanged: agents get only what’s explicitly bound.
The flag is a behaviour switch layered on an already-configured Composio — it never auto-enables the provider (you still need a project API key). It is false unless COMPOSIO_DEFAULT_CONNECTOR=true (or 1) is set on the server. Provisioning the default. The default connector needs a Composio user_id (whose connected accounts back it) and a provisioned MCP server. Both are set with one operator call:
enable errors if zero users have connected accounts (“connect an account first”) or if multiple users exist (pin one with default set). Re-running is idempotent and refreshes the connector’s app set, so apps you connect later show up in the default automatically. These map to GET/PUT /api/v1/integrations/composio/default.

Agent awareness of connected integrations

An agent is told up front, in its system prompt, which integrations it can already drive. Every MCP server that resolves for the agent — Composio apps as well as plain MCP servers — is listed in a [CONNECTED INTEGRATIONS] block, including the access mode encoded in the display name (e.g. Composio: youtube · Full). This exists so an agent never reflexively answers “I don’t have access to your YouTube account” when the YouTube tools are in fact wired in. The block instructs the agent to use the matching tools directly and to only report that something isn’t possible after checking the tools available for that app — so the user never has to tell it to “go look at the MCP server” first. Nothing to configure: the block appears automatically whenever the agent resolves at least one integration, and is omitted entirely when it has none.

Troubleshooting Composio errors

Commands that reach Composio’s live API (toolkits, inventory, connect, bind, trigger and account operations) surface any upstream failure as an API error (502) whose message classifies what went wrong: Each message includes Composio’s own error text (sanitized and truncated); the full upstream response is written to the server log. Note that crewship integration composio key show only reports whether a key is configured, not whether Composio accepts it — a placeholder key shows as configured but fails live calls with the rejected the configured API key message above. Setting a key with key set validates it against Composio first: a key Composio rejects is refused with a 400, while a network failure during validation is reported as a 502 (unreachable) instead of blaming the key.

OAuth 2.0 Integrations

Crewship includes pre-configured OAuth providers for popular services. The implementation uses PKCE (Proof Key for Code Exchange) per RFC 7636 for secure authorization.

Supported OAuth Providers

OAuth Flow

1

Create OAuth credential

In Settings -> Credentials, create an OAuth2 credential with the client ID, client secret, and selected provider.
2

Authorize the connection

Click “Connect” to start the PKCE authorization flow:
  1. Crewship generates a code_verifier (32 random bytes, base64url-encoded)
  2. Computes code_challenge = SHA256(code_verifier), base64url-encoded
  3. Redirects user to provider’s authorization URL
3

Token exchange

After the user authorizes, the provider redirects back with an authorization code. Crewship exchanges it for access and refresh tokens using the code_verifier.
4

Token storage

Tokens are encrypted with AES-256-GCM and stored in the credentials table. Refresh tokens are used automatically to maintain access.

Auto-Bind

When OAuth credentials are created, the oauth_autobind system can automatically configure MCP servers or other integrations that use the credential. This eliminates manual setup for common provider-integration pairs.

MCP Server Integration

Crewship integrates with the Model Context Protocol ecosystem, allowing agents to use tools from external MCP servers.

MCP Architecture

Crew tools on /integrations

Integrations → Tools → Crew MCP servers (under More) lists every crew-scoped MCP server in the workspace: the crew it belongs to (a link to that crew’s Settings), how many agents may call it, and its auth state as a pill — Connected, No credential, Expired, or No auth needed for a stdio server that takes none. The gaps sort first. Connect on a row without a credential binds one to every agent in the crew (PATCH /agents/{id}/integrations/{binding} for agents that already have a binding, POST /agents/{id}/integrations for the rest), either from the vault or through OAuth for an HTTP endpoint. A crew’s own Needs you strip and its Settings → Integrations list link here as /integrations?tab=tools&section=crew-tools&server=<id>, which opens that row connecting. The same list on the CLI: crewship integration crews-overview.

Who gets which server

Every workspace- and crew-scoped MCP server stores its audience in a default_access column: An agent binding attaches a credential, a config override or an opt-out to one agent’s use of a server. It never changes the audience, so granting one agent an integration cannot take it away from anyone else.
Before Crewship 2026.08 the audience was inferred from the number of bindings: a server nobody was bound to resolved for everyone, and the first binding anywhere in the workspace silently revoked it from every other agent. Upgrading freezes each existing server at the audience it effectively had — servers that already had a binding become bound-only, the rest become all — so nothing changes at the moment of the upgrade.

Transport Types

MCP Server Configuration

MCP servers are configured per-crew or per-agent via the .mcp.json file:
The sidecar merges crew-level and agent-level MCP configurations at runtime. The merged config is written to /crew/agents/{slug}/.mcp.json inside the container. When entering a stdio server through the web UI (integration form or config editor), the args string is tokenized quote-aware: --flag "hello world" becomes ["--flag", "hello world"], and an executable path with spaces stays one token when quoted. The exact rules are in the MCP guide.

MCP Gateway

The MCPGateway (internal/sidecar/mcp_gateway.go) manages MCP server connections:
  1. Connect: Establishes connections to all configured MCP servers at sidecar startup (15-second timeout)
  2. Discover tools: Queries each server for available tools
  3. Route calls: Proxies tool calls from agents to the correct MCP server

Sidecar MCP Endpoints

MCP Credential Injection

MCP servers can have credentials associated with them:
The sidecar handles credential injection for MCP server authentication, keeping raw tokens out of the agent’s environment.

MCP Registry

Crewship syncs with the official MCP registry at registry.modelcontextprotocol.io/v0/servers. The SyncMCPRegistry function (internal/api/mcp_registry.go) fetches and caches all registered servers locally. This allows users to browse and install MCP servers from the registry without manual configuration.
  • Server name and display name
  • Description and category
  • Package information (runtime, environment variables)
  • Remote transport configuration
  • Verification status

Crew Connections

Crews can be connected to share context and enable cross-crew operations:

Connection Endpoints (via Sidecar)

Integration Testing

The integration_test_connection.go handler provides a test endpoint for verifying that integrations are properly configured and credentials are working before deploying to production.
When configuring OAuth integrations, always test the connection after setup. OAuth tokens can expire, scopes can be insufficient, and client secrets can be rotated.