AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

Configuring the Devin MCP Server for Cursor and Claude Code: Autonomous Cross-Agent Orchestration

Daly Zaloom · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Switching constantly between a local IDE and the Devin web dashboard to trigger autonomous, long-running engineering tasks fractures developer flow. When engineers use local coding companions like Cursor or the Claude Code terminal CLI, forcing them to manually copy code context, create browser sessions, and monitor progress turns an autonomous platform into an administrative burden.

The release of Cognition's official Devin Model Context Protocol (MCP) server (https://mcp.devin.ai/mcp) resolves this friction. Built on the open Model Context Protocol standard and powered by Streamable HTTP, the Devin MCP server exposes Devin's cloud sandbox, session lifecycle, institutional playbooks, and repository knowledge directly to Cursor and Claude Code.

365Finds considers this hybrid agent architecture the definitive setup for high-velocity software teams. Local coding tools excel at sub-minute interactive edits and direct file navigation, while Devin excels at multi-hour, asynchronous, sandbox-isolated execution. Orchestrating Devin directly from Cursor and Claude Code eliminates window switching while keeping full programmatic control over cloud resource consumption.


Authentication and Credential Topologies

Connecting an external MCP client to Devin requires a valid API credential from Cognition. Devin v3 authentication uses a principal-and-token architecture with distinct token prefixes and organizational scopes.

+-------------------------------------------------------------------------------+
|                             Devin MCP Topology                                |
|                                                                               |
|  [Cursor Composer] / [Claude Code CLI]                                        |
|          |                                                                    |
|          | Streamable HTTP (POST /mcp)                                        |
|          | Headers: Authorization: Bearer cog_...                             |
|          |          X-Org-Id: <ORG_ID> (Required for Enterprise & PAT)        |
|          v                                                                    |
|  [Devin MCP Server (mcp.devin.ai/mcp)]                                        |
|          |                                                                    |
|          +---> Session Lifecycle (devin_session_create, devin_session_gather) |
|          +---> Playbook & Knowledge Management (devin_playbook_manage)        |
|          +---> Deep Repository Context (ask_question, read_wiki_contents)     |
|          +---> Cloud Execution Sandboxes (ACU Resource Controls)             |
+-------------------------------------------------------------------------------+

Choosing the Right Token

Devin provides two primary token models with the cog_ prefix:

Token TypePrefixOrganization ResolutionBest Operational Use Case
Org-Scoped Service User Keycog_Automatic; resolved directly from the service user identityShared engineering workflows; team-wide local configs; CI/CD
Enterprise Service User Keycog_Explicit; requires the X-Org-Id HTTP headerCross-organizational enterprise teams; centrally audited setups
Personal Access Token (PAT)cog_Explicit; requires the X-Org-Id HTTP headerIndividual developer experimentation; personal machine setups

365Finds strongly advises teams to provision Org-Scoped Service Users rather than individual Personal Access Tokens. Service users persist independently of individual employee lifecycles, support granular role-based access control (RBAC), and prevent broken automations when team assignments shift.

Crucial Warning on Legacy Keys: Legacy API keys with prefixes such as apk_ or apk_user_ only support read-only repository documentation queries (read_wiki_structure, ask_wiki_question). Attempting to call session creation, playbook execution, or knowledge management endpoints with legacy keys results in immediate 401 Unauthorized or 403 Forbidden rejections.

Locating Your Organization ID

If using an Enterprise Service User key or a Personal Access Token, find your Organization ID under Settings > Devin API at the top of the dashboard. This value must be passed in the X-Org-Id request header.


Configuring Cursor

Cursor connects to remote MCP servers using Streamable HTTP. Note that while Devin Desktop accepts either serverUrl or url, standard MCP clients like Cursor strictly expect the url property key.

Configuration Target Files

You can mount Devin globally for all Cursor projects or isolate the server to a specific repository:

mcp.json Specification

To register the official server, open or create your mcp.json file and declare the devin server block:

{
  "mcpServers": {
    "devin": {
      "url": "https://mcp.devin.ai/mcp",
      "headers": {
        "Authorization": "Bearer cog_your_service_user_key_here",
        "X-Org-Id": "your_org_id_here"
      }
    }
  }
}

(Note: If using an Org-Scoped Service User key, omit the X-Org-Id line entirely as the organization is bound automatically.)

Verification in Cursor

  1. Open Cursor and navigate to Cursor Settings > Features > MCP.
  2. Locate devin in the list of registered MCP servers.
  3. Verify that the indicator turns green. If the server fails to connect, confirm that your endpoint is set to /mcp rather than the deprecated /sse endpoint, and verify that your Bearer token contains the cog_ prefix.

Configuring Claude Code

Claude Code provides native Model Context Protocol support via its terminal CLI commands.

Registering Devin via CLI

Run claude mcp add to register the HTTP endpoint. Choose your configuration scope depending on your team's workflow:

Standard Command (Org-Scoped Service Key):

claude mcp add -s user -t http devin https://mcp.devin.ai/mcp -H "Authorization: Bearer cog_your_service_user_key_here"

Enterprise Command (With Organization ID):

claude mcp add -s user -t http devin https://mcp.devin.ai/mcp \
  -H "Authorization: Bearer cog_your_enterprise_key_here" \
  -H "X-Org-Id: your_org_id_here"

Verifying the Connection

Run the verification command in your terminal:

claude mcp list

Claude Code will query https://mcp.devin.ai/mcp, negotiate capabilities over Streamable HTTP, and print the active server status along with its registered tools.


Available Devin MCP Tools

Once connected, Cursor Composer and Claude Code gain access to Devin's operational toolset:

Tool IdentifierCore FunctionalityPractical Application
devin_session_createSpawns one or more autonomous Devin sessions with prompt, playbook, title, tags, and ACU budgetOffload refactoring, dependency updates, and feature builds to isolated cloud sandboxes
devin_session_gatherConcurrently monitors and waits for multiple sessions to reach a settled state (finished, errored, waiting, sleeping)Replaces manual status polling loops when running parallel multi-module tasks
devin_session_interactSends follow-up instructions, inspects session state, pauses, terminates, or archives sessionsProvide human-in-the-loop steering directly from the local chat interface
devin_session_eventsFetches event summaries, detailed step traces, or searches execution logs by keywordDiagnose build failures or inspect Devin's terminal commands without leaving the IDE
devin_session_searchFilters existing sessions by tag, playbook, creation time, or authorQuery past automated runs or retrieve context from team sessions
devin_playbook_managePerforms CRUD operations on organizational Playbooks, including macro expansionsEnforce standardized team quality gates, CI steps, and testing protocols
devin_knowledge_manageMaintains institutional knowledge notes, repository docs, and documentation suggestionsGround sessions in architecture decisions and repository-specific patterns
ask_questionSemantic, AI-powered questions grounded across up to 10 indexed repositoriesPerform deep architectural queries across private organization codebases
read_wiki_structure / read_wiki_contentsInspects high-level doc topics and full repository wiki contentsPull indexed documentation directly into local agent context
devin_list_integrationsLists installed native integrations (GitHub, Jira, Slack) and attached MCP serversConfirm environmental connectivity and repository permissions

Practical Cross-Agent Orchestration Patterns

Bridging Cursor and Claude Code with Devin enables sophisticated division of labor between local interactive editing and remote cloud execution.

+------------------------------------------------------------------------------------+
|                         Operational Division of Labor                              |
|                                                                                    |
|  Local Layer (Cursor Composer / Claude Code)                                       |
|  - Sub-minute interactive code edits                                               |
|  - Real-time linting, formatting, and single-file logic adjustments                |
|  - Architecting tasks and initiating Devin dispatch                                |
|                                                                                    |
|                               | devin_session_create                               |
|                               v                                                    |
|  Remote Cloud Layer (Cognition Devin Sandboxes)                                    |
|  - End-to-end framework and major dependency upgrades                              |
|  - Multi-file migrations across hundreds of modules                                |
|  - Full test suite execution, flaky test sweeps, and PR generation                 |
|                                                                                    |
|                               | devin_session_gather                               |
|                               v                                                    |
|  Local Notification: Devin session settled -> Local git pull & review              |
+------------------------------------------------------------------------------------+

Pattern 1: Dispatching Heavy Refactoring from Cursor Composer

While editing code in Cursor Composer, an engineer can instruct Composer to spawn a Devin session for complex, time-consuming tasks:

Cursor Prompt:
"We need to migrate our database layer from TypeORM to Prisma for all models in src/entities. 
Please use devin_session_create to launch an autonomous task. 
Attach the playbook 'backend-db-migration', tag it with 'database-refactor', 
and cap the ACU budget at 3.0 ACUs. Once launched, give me the session URL."

Cursor's LLM invokes devin_session_create via the Devin MCP server, sets the required parameters, and returns the live session tracking link. The engineer continues local feature work uninterrupted while Devin spins up a remote container, checks out the repository, performs the migration, and runs the test suite.

Pattern 2: Parallel Batch Task Orchestration in Claude Code

Claude Code can coordinate multi-repository or multi-package updates by combining devin_session_create with devin_session_gather:

Claude Code Prompt:
"Create three parallel Devin sessions:
1. Upgrade service-auth to Node 22 and fix deprecations.
2. Upgrade service-billing to Node 22 and fix deprecations.
3. Upgrade service-gateway to Node 22 and fix deprecations.
Tag all three with 'node-22-upgrade'. Use devin_session_gather to wait until all three reach a settled state, then summarize the outcome and pull request URLs."

Instead of blocking the developer with periodic API polling, Claude Code issues the creation calls, delegates blocking to devin_session_gather, and delivers a consolidated final report when all three remote tasks conclude.


Operational Guardrails and Governance

Orchestrating autonomous cloud agents from local developer environments introduces operational and financial considerations that require deliberate policies.

Preventing ACU Budget Runaway

Devin consumes Agent Compute Units (ACUs) during autonomous runs. When external AI clients dispatch Devin sessions via MCP, an unconstrained prompt could trigger open-ended agent loops.

Network Protocol Deprecation

Older guides and blog posts reference Devin's Server-Sent Events (/sse) endpoint. Cognition has formally deprecated the /sse route in favor of Streamable HTTP (/mcp). Ensure your configurations strictly target https://mcp.devin.ai/mcp.

Managing Secret Leakage

Never commit .cursor/mcp.json or .mcp.json containing plaintext cog_ tokens into shared public or private repositories. If using workspace-level configuration files, add .cursor/mcp.json and .mcp.json to your .gitignore, or leverage environment variable interpolation if supported by your local client.


365Finds Institutional Evaluation

Evaluation DimensionAssessmentOperational Trade-off
Developer HeartbeatEliminates dashboard context switching; keeps developers inside IDE flow stateLocal clients become single points of orchestration; requires team discipline around prompt clarity
Tool Capability CoverageFull platform parity including sessions, playbooks, knowledge, and schedulesHigh surface area requires strict RBAC to prevent unauthorized playbook or integration modifications
Protocol StabilityStreamable HTTP standardizes connection handling across diverse IDE clientsDependent on stable outbound HTTPS connectivity to Cognition infrastructure
Cost PredictabilityNative ACU parameter controls allow fine-grained budgeting per sessionRequires active developer adherence to limit parameters to avoid unintended spend

365Finds recommends that software engineering organizations deploy the Devin MCP server immediately across their development teams. Pairing the rapid, low-latency editing of Cursor and Claude Code with the deep, asynchronous execution capacity of Devin delivers the strongest developer experience currently achievable in AI-assisted software engineering.


References