AI & Agents

How to Configure MCP Servers in Devin AI

Configuring Model Context Protocol servers in Devin AI requires editing the devin mcp config files. This guide details how to configure global, project, and local scopes, manage pathing changes in v3000.3, and connect remote tools like Fast.io.

Fast.io Editorial Team 12 min read
Devin AI Model Context Protocol configuration setup

Why Devin AI Sandbox Isolation Requires MCP

Autonomous software engineers like Devin AI operate within isolated container sandboxes to ensure execution safety and clean state. However, this isolation becomes a barrier when the agent must interface with the team's databases, internal microservices, and shared workspace environments. The Model Context Protocol (MCP) solves this isolation problem by standardizing how LLMs interact with external data sources, turning Devin from a closed execution loop into an integrated system.

Rather than writing custom, fragile API integrations for every separate script, developers use MCP to expose standardized tools to Devin. This setup allows the agent to fetch database schemas, read documentation, and write files to cloud workspaces using a uniform protocol. Managing this integration relies on the Devin MCP configuration files, which dictate how the agent initializes, connects, and authenticates with these external tool systems.

How to Configure Devin AI MCP Scopes: Global, Project, and Local Files

The scope of an MCP server config file determines where the server configuration is stored and which projects can access it. Devin v3000.3 supports three distinct scopes to balance ease of use with security requirements:

  1. Global User Scope: Stored at ~/.config/devin/mcp_config.json on macOS and Linux, or %APPDATA%\devin\mcp_config.json on Windows. Configurations in this file are loaded for all Devin tasks across the local machine. This scope is ideal for personal, general-purpose tools like search engines, filesystem utilities, or local database inspectors.

  2. Project Scope: Stored in the project root folder at .devin/mcp_config.json. This file is checked into version control (such as Git), making it shared across the entire development team. If your project relies on specific microservices or shared internal APIs, this is the appropriate location to define the tool configurations so that all team members and agents have access to the same resources.

  3. Local Override Scope: Stored in the project root folder at .devin/mcp_config.local.json. This file is gitignored by default. It allows developers to specify overrides or insert sensitive personal keys that should never be shared or committed to the public repository.

Prior to v3000.3, Devin managed MCP servers inside the mcpServers object of the main config.json file in the user and project directories. In v3000.3 (the Local 3.6 release), the system separated MCP settings into dedicated mcp_config.json files to simplify configuration. When Devin initializes, it checks the legacy configuration paths. If it finds an mcpServers object in config.json, it automatically migrates the settings to mcp_config.json and strips the block from the main file. This automated migration ensures that older setups continue to function without manual reconfiguration.

To set up your configuration manually, follow these four steps to locate and define your server settings:

  1. Choose the configuration scope (global, project, or local override) based on who needs access and where the files are stored.

  2. Open or create the corresponding config file: mcp_config.json in your home folder for global settings, .devin/mcp_config.json for shared project settings, or .devin/mcp_config.local.json for personal local overrides.

  3. Add the "mcpServers" key at the root level of the JSON document.

  4. Define the server block, providing the command parameters (like "command" and "args") for local stdio tools, or connection parameters (like "url" and "headers") for remote HTTP services.

Steps to Manage Devin MCP Configuration via CLI

For developers who prefer avoiding manual JSON edits, the Devin CLI offers commands to manage configurations. When you execute the command devin mcp add, the CLI parses the arguments to determine the transport type. If the argument matches a URL pattern, Devin infers a remote HTTP server. If it matches a system command or executable path, Devin registers it as a local stdio server.

To configure a standard GitHub tool via the npm package wrapper, you can run:

devin mcp add github -- npx -y @modelcontextprotocol/server-github

Because the arguments follow a double dash (--), the CLI registers this entry with a command parameter, using stdio as the communication channel. If you instead want to connect to a remote tool suite, you can run:

devin mcp add my-remote-tools https://mcp.example.com/mcp

The CLI detects the HTTP prefix and configures the entry as a remote HTTP server. By default, these commands write settings to the local override file (.devin/mcp_config.local.json) to keep settings isolated. You can specify a different scope by passing the -s or --scope flag:

devin mcp add -s project local-database-inspector -- npx -y @modelcontextprotocol/server-postgres

This writes the configuration to the shared .devin/mcp_config.json file instead.

You can run devin mcp list to view active servers, devin mcp get <name> to inspect a configuration, and devin mcp remove <name> to delete a server. Additionally, commands like devin mcp disable and devin mcp enable let you toggle servers off and on, setting a "disabled": true field in the JSON to prevent processes from spawning without losing the configuration block.

How to Connect Fast.io for Persistent Shared Workspace Storage

When Devin AI runs, it generates code files, logs, and outputs within its temporary sandbox. For human developers to collaborate with the agent, these files must move to a shared workspace. While teams can write scripts to sync files to local folders or standard cloud drives, these solutions do not provide structured data access or version histories. Instead, developers can connect Devin to Fast.io's remote MCP server to establish a shared, persistent workspace.

Fast.io is an intelligent workspace platform designed for agentic teams. Rather than treating storage as a dumb folder, Fast.io automatically indexes files for semantic search and AI retrieval when Intelligence Mode is enabled. When Devin writes files to a Fast.io workspace, the platform tracks changes with a complete per-file version history, making it easy to restore previous versions if the agent makes a mistake. Humans can access the workspace through the web interface, while Devin reads and writes files programmatically using the MCP server.

The Fast.io MCP Server is hosted remotely. Because it is a remote service rather than a local node module, your configuration block must define the URL and transport properties rather than command arguments.

To connect Devin to your Fast.io workspaces, add the following entry to your mcp_config.json or mcp_config.local.json file:

{
  "mcpServers": {
    "fastio-workspace": {
      "url": "https://mcp.fast.io/mcp/key",
      "transport": "http",
      "headers": {
        "Authorization": "Bearer YOUR_FASTIO_API_KEY"
      }
    }
  }
}

In this configuration block:

  • url: The endpoint is set to https://mcp.fast.io/mcp/key, which accepts standard Bearer token authorization.

  • transport: Specifying "http" configures the connection over Streamable HTTP, which provides bidirectional communication over a single channel.

  • headers: The Authorization header passes your secure Fast.io API key, keeping the session authenticated.

For structured document extraction, developers can set up Metadata Views on Fast.io workspaces. Unlike simple search, Metadata Views turn unstructured documents like PDFs, Word files, and scanned notes into a filterable database table. You define the fields you want extracted in natural language, and the built-in AI designs a typed schema (such as Text, Integer, Decimal, Boolean, URL, JSON, and Date & Time). The platform then matches files in the workspace and extracts the values. Devin can query these spreadsheet views programmatically using the MCP server, enabling it to write code based on structured facts.

Using these features requires registering your organization on a paid subscription. Registering a user account is free, but doing actual work requires a paid subscription. Every organization begins with a 14-day free trial, which requires a credit card. Plans include Starter at 29 USD per month, Business at 99 USD per month, and Growth at 299 USD per month, and details can be reviewed on the Fast.io Pricing page. An agent can set up the workspace for free initially and then hand the organization over to a human manager who registers the credit card and starts the trial.

Fastio features

Connect Devin AI to your team's persistent workspaces

Set up a shared, intelligent workspace with a built-in MCP endpoint, full version history, and RAG search for human-agent collaboration. Every organization starts with a 14-day free trial.

Securing API Credentials and Environment Variables in Local Overrides

Committing API keys, database credentials, or access tokens to shared repositories is a major security risk. Because the project scope configuration file .devin/mcp_config.json is typically tracked in Git, developers must separate the server definitions from their sensitive keys.

To secure these values, Devin supports local overrides and configuration variable interpolation. The recommended approach is to define the server command structure in the shared project file, and specify the sensitive credentials in the local override file, .devin/mcp_config.local.json.

Because the local config file is automatically gitignored, your keys remain on your local machine. When Devin reads the configuration, it merges the project and local files, applying the local overrides to the server keys.

Alternatively, Devin supports variable interpolation directly within the JSON fields. This allows you to reference variables rather than writing literal values. Devin supports two interpolation patterns:

  1. Environment Variables: Using the format ${env:VARIABLE_NAME}. Devin replaces the pattern with the value of that environment variable at runtime.

  2. File References: Using the format ${file:/path/to/secret.txt}. Devin reads the contents of the specified text file, trims any whitespace, and inserts it into the config. This pattern also supports home directory paths using the tilde symbol.

Here is an example configuration that uses environment variables to authenticate an MCP server:

{
  "mcpServers": {
    "secure-database-tool": {
      "command": "npx",
      "args": ["-y", "@company/mcp-database-server"],
      "env": {
        "DATABASE_URL": "${env:LOCAL_DB_CONNECTION_STRING}",
        "API_KEY": "${file:~/.secrets/api_token.txt}"
      }
    }
  }
}

This combination of gitignored override files and dynamic variable insertion keeps sensitive database URLs and API keys secure, while ensuring that the server definition remains consistent across the team's workspaces.

Troubleshooting Devin AI MCP Server Connection and Permission Failures

Connection issues can arise from syntax errors in the JSON configuration, transport mismatches, or strict permission rules. If Devin encounters a problem, it will log the error and skip loading the affected tools.

If you receive an authorization required error when connecting to a remote HTTP server, the server expects OAuth authentication. Run the command devin mcp login <server-name> to start the browser login flow. Each client, including Devin CLI, manages its OAuth tokens independently, meaning you must run the login command for Devin CLI even if you have already authenticated in another client such as Devin Desktop or Claude Code.

If the tools fail to load, check that your command runs outside of Devin. You can run the command in your terminal directly to check for missing dependencies. For instance, run npx -y @modelcontextprotocol/server-github manually to check if Node.js is installed or if the package is missing. For Windows systems, verify that any path variables use double backslashes to avoid JSON escaping issues.

Additionally, Devin enforces a permissions configuration for security. By default, the agent will prompt the user before running any MCP tool. You can pre-approve or block specific tools by configuring the permissions block in your main Devin configuration file:

{
  "permissions": {
    "allow": [
      "mcp__fastio-workspace__write_file",
      "mcp__fastio-workspace__read_file"
    ],
    "deny": [
      "mcp__fastio-workspace__delete_workspace"
    ],
    "ask": [
      "mcp__fastio-workspace__*"
    ]
  }
}

Tools follow the naming pattern mcp__<server-name>__<tool-name>. You can use wildcards like mcp__fastio-workspace__* to target all tools on a specific server, or mcp__* to capture all MCP tools.

For corporate environments, administrators can restrict server access using allowlists or custom registries in the team settings. An allowlist uses regular expression pattern matching to verify commands and argument counts. If a user runs a config that deviates from these patterns, the server will be blocked. Registries allow teams to build a custom marketplace of approved servers, ensuring that developers only connect to authorized systems.

Frequently Asked Questions

How do I configure MCP in Devin AI?

You configure Model Context Protocol (MCP) servers in Devin AI either using the `devin mcp add` command-line interface or by manually editing the `mcp_config.json` files. You can save these configurations globally for all projects or locally within a specific directory.

Where is the mcp_config.json file located in Devin?

The location depends on the configuration scope. The global configuration is located at `~/.config/devin/mcp_config.json` on macOS or Linux, and `%APPDATA%\devin\mcp_config.json` on Windows. The project-specific configuration is stored at `.devin/mcp_config.json` in your project root.

How to add a custom MCP server to Devin?

You can add a custom server using the command `devin mcp add <name> -- <command> [args...]` for local stdio-based servers, or `devin mcp add <name> <URL>` for remote HTTP-based servers. Alternatively, you can define the server configuration directly within your `mcp_config.json` file.

Related Resources

Fastio features

Connect Devin AI to your team's persistent workspaces

Set up a shared, intelligent workspace with a built-in MCP endpoint, full version history, and RAG search for human-agent collaboration. Every organization starts with a 14-day free trial.