Adding MCP Servers
Via Command Line
The quickest way to add an MCP server:Via Config File
Add servers directly to your config file’smcpServers section:
- Project config
- User config
- Local override
Project-level servers are shared with your team via version control.
Server Configuration Options
MCP servers can be configured in two ways: as a local command (stdio transport) or as a remote HTTP server (Streamable HTTP transport).Local Command (stdio)
| Field | Type | Required | Description |
|---|---|---|---|
command | string | Yes | The executable to run |
args | string[] | No | Command-line arguments |
env | object | No | Environment variables to set |
Remote HTTP Server
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL of the MCP server endpoint |
transport | string | No | Set to "http" for Streamable HTTP transport (informational; transport is auto-detected from the presence of url) |
headers | object | No | Custom HTTP headers to include in requests |
Examples
GitHub (stdio)
GitHub (stdio)
Notion (HTTP with OAuth)
Notion (HTTP with OAuth)
After adding an OAuth-based server, run
devin mcp login notion to authenticate. See Authentication below.Linear (HTTP with OAuth)
Linear (HTTP with OAuth)
Custom server (stdio)
Custom server (stdio)
Authentication
Some remote MCP servers require OAuth authentication. After adding an OAuth-based server to your config, authenticate using thelogin command:
If the server supports OAuth, you will also be prompted to authenticate automatically when the server is first used.
Managing Secrets
For team projects, the recommended pattern is:- Define the server in
.cognition/config.jsonwith placeholder or no env vars - Each team member adds their personal keys in
.cognition/config.local.json
MCP Permissions
You can pre-approve, deny, or force-ask for specific MCP tools in your permissions config:| Pattern | Matches |
|---|---|
mcp__server__tool | A specific tool on a specific server |
mcp__server__* | All tools on a specific server |
mcp__* | All MCP tools on all servers |
Troubleshooting
Server won't start
Server won't start
Verify the command works outside Devin for Terminal:Check that all required environment variables are set.
Tools not appearing
Tools not appearing
Ask the agent to list MCP servers and tools. The server may need a moment to initialize.
Permission denied
Permission denied
Check your permissions config. MCP tools default to prompting for approval. Add them to
permissions.allow to auto-approve.
