MCP Integration
MCP is the AI-native entry point into Stellary and the main way to connect Cursor, Claude Code, Claude Desktop, or any other Model Context Protocol client to live delivery data. Instead of mirroring the REST resource tree manually, an external client can connect to the built-in /mcp endpoint and operate through the same tool surface used by agents and runtime orchestration.
This page documents the real MCP server behavior implemented in the backend today: transport, identity model, tool registry exposure, queued missions, proposal handling, and plugin-backed extensions.
In Stellary, MCP is not an afterthought or a thin wrapper around docs examples. It is a first-class runtime surface wired directly into project delivery, cockpit supervision, agent execution, and installed workspace plugins.
Overview
The MCP server is built directly into the NestJS backend. There is no separate daemon to run, no sidecar to deploy, and no custom bridge process to maintain.
Endpoint: https://api.stellary.co/mcpTransport: Streamable HTTPMethods: GET and POSTAuth header: Authorization: Bearer <token>Session requirement: none
GET is useful for discovery / protocol negotiation.POST carries the actual MCP requests.The implementation creates a fresh stateless transport per request, specifically to stay compatible with MCP clients that do not persist a session identifier.
Need the broader product setup first? Start with Getting Started for workspace, token, and agent setup, or use the API Reference when you need to provision resources before an AI client enters the loop.
MCP vs REST
Use MCP when the caller is an AI client or an agent loop. Use REST when you need deterministic resource CRUD, explicit HTTP contracts, or traditional backend-to-backend integration.
| Use case | Prefer MCP | Prefer REST |
|---|---|---|
| Interactive AI assistant in Cursor or Claude | Yes | No |
| Agent mission loop with queued work | Yes | No |
| Explicit project provisioning from code | No | Yes |
| Deterministic integration testing of routes | No | Yes |
| Installed plugin tools in an AI workflow | Yes | Usually no |
If you need to create workspaces, projects, or billing flows before the AI layer comes into play, start from the API Reference and then attach MCP on top.
Transport
Cursor, Claude Desktop, Claude Code, or another MCP-compatible client connects over Streamable HTTP.
Stellary handles GET and POST directly in the backend and recreates a transport per request.
The same endpoint can expose board tools, cockpit tools, agent queue tools, and plugin-backed tools.
The transport is intentionally stateless. In practice, that means you can connect clients like Cursor without relying on a persistent Mcp-Session-Id.
Identity model
An OAuth connection belongs to one workspace and can authorize you, one or more active agents, or both. Existing direct credentials remain supported.
Recommended for Claude, Codex, ChatGPT, and compatible clients. Consent selects the workspace and identities.
Every call reapplies its active state, projects, role, tool policy, autonomy, and mission context.
Still available for scripts and legacy clients that cannot open an OAuth flow yet.
Call stellary_list_identities to get opaque references. With one identity, actingAs is implicit. With multiple identities, actingAs is required on every call, including stellary_init and mission tools.
Authentication
OAuth 2.1 with discovery, dynamic client registration, and PKCE S256 is the recommended public flow. Clients get a one-hour access token and can renew with a rotating refresh token when offline_access is granted.
| Bearer type | Resolved identity | Best for | Important nuance |
|---|---|---|---|
| OAuth access token | You and/or authorized agents | Claude, Codex, ChatGPT, and OAuth-capable clients | Workspace, identities, and scopes are selected during consent |
| User JWT | Human user | Browser-backed sessions and short-lived client setup | Good for exploration, but less convenient than PATs in external tools |
| Personal access token | Human user | Cursor, Claude Code, scripts, stable non-browser clients | Compatibility option for clients that do not support OAuth yet |
| Agent token | Workspace agent | Queued missions, plugin tools, workspace-context automation | Best fit for external agent loops and MCP-only agents |
MCP_TOKEN | Anonymous MCP context | Transport gating and limited local/dev setups | Current Stellary tools still mostly need a user or agent identity |
Access is rechecked on every call: credential scopes, project access, workspace permissions, agent status and policy, autonomy, and the mission snapshot stay authoritative. Suspending an agent disables it immediately without disconnecting the grant’s other identities.
Client setup
Add only the https://api.stellary.co/mcp endpoint in an OAuth-capable client. It discovers Stellary, opens the browser consent flow, and returns with its tokens. No PAT needs to be copied into the client configuration.
Cursor
{ "mcpServers": { "stellary": { "url": "https://api.stellary.co/mcp" } }}Claude Code
claude mcp add stellary \ --transport http \ https://api.stellary.co/mcpClaude Desktop and similar clients
{ "mcpServers": { "stellary": { "url": "https://api.stellary.co/mcp" } }}After connection, the first productive move is usually to call list_projects, then switch to exact IDs for the rest of the session.
For a legacy client without OAuth, create a personal access token through the API token routes and add it as a bearer. OAuth remains the recommended path for every new connection.
Common workflows
In practice, the Stellary MCP server is usually used in three patterns: interactive workspace exploration, queued agent execution, and plugin-backed operational actions.
Use Cursor, Claude Code, or Claude Desktop as a human user to inspect projects, cards, documents, and cockpit signals inside one workspace.
Run a dedicated workspace agent outside the app, claim queued missions, and push card status updates back into delivery.
Combine board context with GitHub, Slack, Email, Discord, or X tools from the same MCP surface for real operational workflows.
For the product surfaces behind those workflows, see Board & Cards, Documents & Context, and the Agents guide.
Tool surface
MCP tools are assembled from three places in the backend: legacy cockpit tools, the shared core tool registry, and installed workspace plugins. The result is one endpoint, but not one flat usage pattern.
Explore projects, members, labels, cards, subtasks, and delivery context before deciding on a write.
list_projects | get_project_details | list_cards | get_card_details | get_card_commentsCreate or update cards, move work across columns, assign owners, comment, and keep checklists or subtasks in sync.
create_card | create_cards_bulk | move_card | update_card | assign_card | add_commentRead workspace steering signals, sprint context, monitoring data, and pending proposals from the cockpit layer.
get_pilotage_state | get_cockpit_dashboard | get_agent_status | list_pending_proposalsRun external agent loops, claim queued missions, complete or fail runs, and keep the card lifecycle synchronized with the app.
stellary_init | get_next_mission | wait_for_mission | complete_mission | fail_missionName-based convenience exists for several board tools and uses exact-or-fuzzy matching under the hood. Still, for serious runs and agent loops, you should discover IDs first and then reuse them explicitly.
If you want to understand the human-facing surfaces these tools operate on, read the board guide and the documents guide alongside this page.
Plugin tools
Plugin definitions are auto-registered into the same MCP surface when the plugin is installed and enabled in a workspace. Their tool IDs are prefixed by plugin slug.
Examples:github_list_reposgithub_create_prslack_post_messageemail_send_emaildiscord_post_messagex_create_draftThe codebase currently ships plugin definitions for GitHub, Slack, Email, Discord, and X. Those tools require a workspace context plus decrypted plugin configuration, so they are typically consumed through agent tokens.
Agent missions
MCP becomes especially powerful when paired with dedicated workspace agents. In that model, the app queues missions and the external MCP client becomes the execution loop.
- Assign an active agent to a card in Stellary.
- Launch a mission from the app.
- If the agent is
mcpOnly, the mission is queued instead of executed locally. - The external MCP client claims work with
get_next_missionor long-polls withwait_for_mission. - Claiming a mission marks it as running and moves the card toward the in-progress column when possible.
- The client finishes with
complete_missionorfail_mission, which updates mission state and posts a card comment.
For agent tokens, stellary_init is the recommended bootstrap call. It returns autonomy mode, rules, skills, and the filtered tool list actually available to that agent.
Recommended agent loop:1. stellary_init2. get_next_mission or wait_for_mission3. read card context and documents4. execute tools with exact IDs5. complete_mission or fail_missionApprovals
Proposal behavior is driven by the tool policy layer. Only agent tokens participate in autonomy-policy proposal checks; a human using MCP acts directly as themselves.
| Agent autonomy mode | Read tools | Write and collaboration tools |
|---|---|---|
autonomous | Execute directly | Execute directly |
supervised | Execute directly | Safe tools execute directly; tools marked approval_required return a persisted proposal |
approval | Execute directly | Every non-read tool becomes a proposal |
MCP-only agents keep the autonomy mode configured in Stellary. In approval mode, non-read writes become persisted proposals, even when the execution client is external.
Local development
In local development, if NODE_ENV is not production and MCP_TOKEN is not set, the controller lets unauthenticated requests reach the MCP transport. This makes local wiring easier, but it does not magically grant access to workspace data.
backend/.env example:# MCP_TOKEN=your-secret-token
Without MCP_TOKEN in local dev:- /mcp remains reachable- current workspace tools still mostly require a user or agent identityIn production, or whenever MCP_TOKEN is configured, a bearer token is required before the transport is even reached.
Troubleshooting
401 invalid or expired token
An OAuth client should follow the WWW-Authenticate challenge and open Stellary consent. For a direct credential, verify the bearer format, expiry, and revocation state.
Tool says it requires a user token
You are probably connected with MCP_TOKEN or an anonymous local-dev request. Switch to a user JWT or a personal access token.
Tool says it requires a workspace context
With multiple OAuth identities, call stellary_list_identities and provide actingAs. For an agent project action, claim a mission first so the call has a valid missionRunId.
Plugin tool is visible but fails
The workspace plugin may not be installed or enabled, or its encrypted configuration may be missing. Plugin tools also require an agent/workspace context in the current MCP flow.
Fuzzy matching picks the wrong resource
Start with list_projects, list_cards, or another discovery tool, then reuse the exact IDs. That is the safest pattern for long-lived agent loops.
Related guides
These pages help connect MCP to the rest of the Stellary operating model, from resource provisioning to workspace agents and broader MCP strategy.
Getting Started
Create a workspace, project, token, and first agent before wiring an MCP client.
API Reference
Use REST when you need deterministic provisioning, auth flows, or resource-level CRUD.
Agents Guide
See how workspace agents, proposals, autonomy modes, and missions behave inside the product.
Why MCP Changes AI Coding Tools
Read the broader market context around MCP, context access, and AI tooling in 2026.