> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server allowlist for Devin Federal

> Allowlist MCP servers for your Devin federal team: the Server Config (JSON) format, examples for local and remote servers, and the matching rules.

> [!NOTE]
>
> This documentation is for the federal deployments of Devin. [Back to Devin Docs](https://docs.devin.ai/get-started/devin-intro.md)

Federal administrators can restrict which MCP servers members may use in Devin Desktop and Devin CLI. The allowlist is managed in the portal under **Settings → Devin Settings → MCP Servers**.

* With **MCP Servers** turned off, members cannot use any MCP server.
* With **MCP Servers** turned on and no servers added, members can use any MCP server they configure.
* Once you add a single server, **every server that does not match an allowlist entry is blocked** for the team. The one exception is a private MCP registry: if your team has enabled the setting that allows registry servers, a server matching a registry entry is allowed as well.

The public MCP Marketplace is disabled in federal deployments, so members configure their servers manually in `mcp_config.json`. The allowlist is matched against that configuration.

***

## Add a server

Select **Add Server** and fill in the two fields:

| Field | Value |
| - | - |
| **Server ID** | A name for the entry, for example `github`. Use the name members give the server in their `mcp_config.json`. |
| **Server Config (JSON)** | A JSON object describing which server configurations are allowed. Required. |

> [!WARNING]
>
> Leaving **Server Config (JSON)** empty is not supported in federal deployments. There is no plugin store to supply a default configuration, so every entry needs a JSON object in one of the two shapes below.

## Server Config format

The config is a JSON object in one of two shapes, depending on the kind of server. Each string value is a regular expression.

### Local servers

A local (stdio) server is matched by the command that starts it and its arguments:

```json theme={null}
{
  "command": "npx",
  "args": ["-y", "@modelcontextprotocol/server-github"]
}
```

| Key | Type | Description |
| - | - | - |
| `command` | string | Pattern for the member's `command`. |
| `args` | array of strings | One pattern per argument, in order. Use `[]` for a server that takes no arguments. |

### Remote servers

A remote (HTTP or SSE) server is matched by its URL:

```json theme={null}
{
  "url": "https://mcp\\.example\\.com/mcp"
}
```

| Key | Type | Description |
| - | - | - |
| `url` | string | Pattern for the member's server URL (`serverUrl` or `url` in `mcp_config.json`). |

## Matching rules

* **Whole-value match.** Each pattern must match the entire value, not part of it. `my-server` does not match `/usr/local/bin/my-server`; `.*my-server` does.
* **Case-sensitive.** `Docker` does not match `docker`.
* **Argument count must match.** The member's `args` must have exactly as many items as the entry's `args`, and each argument is matched against the pattern in the same position.
* **`env` and `headers` are not checked.** Members can set any environment variables or headers, so credentials do not belong in the allowlist.
* **Local and remote entries do not cross-match.** A `command` entry never matches a remote server, and a `url` entry never matches a local one.
* **A server is allowed if it matches any one entry.**
* **Invalid patterns block.** An entry whose pattern is not a valid regular expression matches nothing.

> [!WARNING]
>
> A pattern allows everything it matches. Wildcards such as `.*` in a `command` or a script path let members run any executable or script that fits the pattern, including ones they wrote themselves. To restrict members to an approved installation, use the exact command, path, and arguments, and widen a pattern only as far as you need.

### Escaping

Characters such as `.`, `$`, `(`, `)`, `[`, `]`, `+`, `*`, and `?` have a special meaning in regular expressions. To match one literally, put a backslash before it. Because the config is JSON, the backslash itself must be doubled:

| To match literally | Write in the JSON |
| - | - |
| `mcp.example.com` | `"mcp\\.example\\.com"` |
| `script.py` | `"script\\.py"` |
| `mcp[cli]` | `"mcp\\[cli\\]"` |
| `C:\tools\server.exe` | `"C:\\\\tools\\\\server\\.exe"` |

A single backslash before a character like `.` (`"\."`) is not valid JSON, and the portal rejects it with **Invalid JSON for server config**.

## Examples

> [accordion] Exact local server
>
> **Server Config (JSON):**
>
> ```json theme={null}
> {
>   "command": "npx",
>   "args": ["-y", "@modelcontextprotocol/server-github"]
> }
> ```
>
> **Matching member config (`mcp_config.json`):**
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "github": {
>       "command": "npx",
>       "args": ["-y", "@modelcontextprotocol/server-github"],
>       "env": {
>         "GITHUB_PERSONAL_ACCESS_TOKEN": "<token>"
>       }
>     }
>   }
> }
> ```
>
> Any change to the command or arguments is blocked. The `env` values are up to the member.

> [accordion] Local binary at any path, on any operating system
>
> **Server Config (JSON):**
>
> ```json theme={null}
> {
>   "command": ".*my-server(\\.exe)?",
>   "args": []
> }
> ```
>
> This matches `my-server`, `/opt/tools/my-server`, and `C:\tools\my-server.exe`, as long as the member passes no arguments. It matches any executable with that name, wherever it is installed; use the full path instead when the binary must come from an approved location.

> [accordion] Local server with variable arguments
>
> **Server Config (JSON):**
>
> ```json theme={null}
> {
>   "command": "python3",
>   "args": ["/.*\\.py", "--port", "[0-9]+"]
> }
> ```
>
> **Matching member config (`mcp_config.json`):**
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "python-mcp-server": {
>       "command": "python3",
>       "args": ["/home/user/my_server.py", "--port", "8080"]
>     }
>   }
> }
> ```
>
> The first argument can be any absolute path ending in `.py` and the third can be any number. A config with a fourth argument, or without `--port`, is blocked. This entry allows any Python script on the member's machine; to allow one approved script only, replace `/.*\\.py` with its exact path.

> [accordion] Remote server at an exact URL
>
> **Server Config (JSON):**
>
> ```json theme={null}
> {
>   "url": "https://mcp\\.example\\.com/mcp"
> }
> ```
>
> **Matching member config (`mcp_config.json`):**
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "example": {
>       "serverUrl": "https://mcp.example.com/mcp",
>       "headers": {
>         "Authorization": "Bearer <token>"
>       }
>     }
>   }
> }
> ```

> [accordion] Any remote server on one host
>
> **Server Config (JSON):**
>
> ```json theme={null}
> {
>   "url": "https://mcp\\.example\\.com/.*"
> }
> ```
>
> This matches every path under `https://mcp.example.com/`. It does not match `http://` URLs or other hosts.

## Troubleshooting

If a member reports that an allowlisted server is blocked:

1. Compare the member's `command`, `args`, and URL with the entry character by character, including case.
2. Count the arguments. An extra or missing argument blocks the server.
3. Check that literal special characters are escaped, for example `\\.` for a dot.
4. Check that path patterns cover the full path. Start a pattern with `.*` to allow any install location.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.