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 Type | Prefix | Organization Resolution | Best Operational Use Case |
|---|---|---|---|
| Org-Scoped Service User Key | cog_ | Automatic; resolved directly from the service user identity | Shared engineering workflows; team-wide local configs; CI/CD |
| Enterprise Service User Key | cog_ | Explicit; requires the X-Org-Id HTTP header | Cross-organizational enterprise teams; centrally audited setups |
| Personal Access Token (PAT) | cog_ | Explicit; requires the X-Org-Id HTTP header | Individual 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:
- Global Configuration:
~/.cursor/mcp.json(macOS/Linux) or%USERPROFILE%\.cursor\mcp.json(Windows) - Workspace Configuration:
<project-root>/.cursor/mcp.json
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
- Open Cursor and navigate to Cursor Settings > Features > MCP.
- Locate
devinin the list of registered MCP servers. - Verify that the indicator turns green. If the server fails to connect, confirm that your endpoint is set to
/mcprather than the deprecated/sseendpoint, and verify that your Bearer token contains thecog_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:
- User scope (
-s user): Saves to~/.claude.json, making Devin available across all terminal directories on your workstation. - Project scope (
-s project): Saves to.mcp.jsonin the current repository root, allowing configuration to be checked into version control.
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 Identifier | Core Functionality | Practical Application |
|---|---|---|
devin_session_create | Spawns one or more autonomous Devin sessions with prompt, playbook, title, tags, and ACU budget | Offload refactoring, dependency updates, and feature builds to isolated cloud sandboxes |
devin_session_gather | Concurrently 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_interact | Sends follow-up instructions, inspects session state, pauses, terminates, or archives sessions | Provide human-in-the-loop steering directly from the local chat interface |
devin_session_events | Fetches event summaries, detailed step traces, or searches execution logs by keyword | Diagnose build failures or inspect Devin's terminal commands without leaving the IDE |
devin_session_search | Filters existing sessions by tag, playbook, creation time, or author | Query past automated runs or retrieve context from team sessions |
devin_playbook_manage | Performs CRUD operations on organizational Playbooks, including macro expansions | Enforce standardized team quality gates, CI steps, and testing protocols |
devin_knowledge_manage | Maintains institutional knowledge notes, repository docs, and documentation suggestions | Ground sessions in architecture decisions and repository-specific patterns |
ask_question | Semantic, AI-powered questions grounded across up to 10 indexed repositories | Perform deep architectural queries across private organization codebases |
read_wiki_structure / read_wiki_contents | Inspects high-level doc topics and full repository wiki contents | Pull indexed documentation directly into local agent context |
devin_list_integrations | Lists installed native integrations (GitHub, Jira, Slack) and attached MCP servers | Confirm 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.
- Enforce Session Limits: Always specify explicit ACU maximums (
max_acu) when prompting local models to invokedevin_session_create. - Pre-set Playbooks: Bind sessions to rigid Playbooks with predefined stop conditions and regression criteria rather than raw open-ended prompts.
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 Dimension | Assessment | Operational Trade-off |
|---|---|---|
| Developer Heartbeat | Eliminates dashboard context switching; keeps developers inside IDE flow state | Local clients become single points of orchestration; requires team discipline around prompt clarity |
| Tool Capability Coverage | Full platform parity including sessions, playbooks, knowledge, and schedules | High surface area requires strict RBAC to prevent unauthorized playbook or integration modifications |
| Protocol Stability | Streamable HTTP standardizes connection handling across diverse IDE clients | Dependent on stable outbound HTTPS connectivity to Cognition infrastructure |
| Cost Predictability | Native ACU parameter controls allow fine-grained budgeting per session | Requires 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.