MCP
MCP (Model Context Protocol) lets Dline use external tools, resources, and prompts through MCP servers. A server can be a local process (STDIO) or a remote endpoint (Streamable HTTP or SSE).
Opening MCP settings
Section titled “Opening MCP settings”Select the MCP Servers button in the Dline panel title bar. The view has three tabs:
- Marketplace: browse servers from an online catalog. After you select Install, Dline starts a task that helps you install and configure the server.
- Remote Servers: add a remote server.
- Configure: manage configured servers or edit the configuration file.
You can also select the server icon in the toolbar below the input box (tooltip Manage MCP Servers) to open the MCP Servers list and quickly enable or disable servers with their toggles. The gear icon in the top-right corner of the list opens the Configure tab directly.


Adding a remote server
Section titled “Adding a remote server”On the Remote Servers tab:
- Enter a unique name in Server Name.
- Enter the full URL in Server URL.
- Under Transport Type, choose Streamable HTTP (default) or SSE (Legacy).
- Select Add Server.
This form has no field for request headers. To add authentication headers, edit the configuration file instead.
Editing the global configuration file
Section titled “Editing the global configuration file”On the Configure tab, select Configure MCP Servers. Dline opens <documents-root>/settings/mcp_settings.json. By default, <documents-root> is the dline folder inside the operating system’s Documents directory; when DLINE_DOCS_DIR is set, its value is used as the root.
Local server (STDIO)
Section titled “Local server (STDIO)”{ "mcpServers": { "local-server": { "command": "node", "args": ["/path/to/server.js"], "env": { "API_KEY": "${env:MY_API_KEY}" }, "timeout": 60, "disabled": false } }}Remote server
Section titled “Remote server”{ "mcpServers": { "remote-server": { "type": "streamableHttp", "url": "https://example.com/mcp", "headers": { "Authorization": "Bearer ${env:MCP_TOKEN}" } } }}Fields
Section titled “Fields”| Field | Description |
|---|---|
command, args, env, cwd | Launch command, arguments, environment variables, and working directory of a STDIO server |
url, headers | Address and request headers of a remote server |
type | stdio, sse, or streamableHttp. An entry with url but no type is treated as sse, so set it explicitly |
timeout | Request timeout in seconds; default 60, minimum 1 |
disabled | Disables the server when true |
autoApprove | Names of tools allowed to be auto-approved |
${env:VAR} is resolved each time the server connects. Dline uses the value saved for this server first, then the environment variable of the VS Code process. If neither exists, Dline asks for the value in a masked input box and saves it for this server only, in the owner-only secret store under the Dline data directory rather than in the configuration file. Dline only asks after the Dline sidebar or a Dline panel has been opened in the window; until then the server waits, and the other servers connect as usual. If you cancel or submit an empty value, the server is not connected and shows an error; restart it to be asked again. The key icon (Clear Saved Variables) on the server row in the MCP settings forgets the values saved for that server and reconnects it.
Workspace servers
Section titled “Workspace servers”A project can place .yaml, .yml, or .json descriptor files under <workspace>/.agents/mcp/. Each file describes one server that applies only to that workspace. Subfolders are scanned as well. The file name is not used: a server is identified by its name.
<workspace>/└── .agents/ └── mcp/ ├── project-db.yml └── remote-docs.jsonLocal server (STDIO)
Section titled “Local server (STDIO)”.agents/mcp/project-db.yml:
name: project-dbdescription: Query the project databasetype: stdiocommand: nodeargs: ["${workspaceFolder}/tools/db-mcp.js"]env: DB_URL: "${env:PROJECT_DB_URL}"timeout: 120Remote server
Section titled “Remote server”.agents/mcp/remote-docs.json:
{ "name": "remote-docs", "description": "Search the team documentation service", "type": "streamableHttp", "url": "https://docs.example.com/mcp", "headers": { "Authorization": "Bearer ${env:DOCS_MCP_TOKEN}" }}Descriptor rules
Section titled “Descriptor rules”nameis required and must be unique within the workspace. When two files use the samename, the file that sorts first by path is loaded and the other is ignored with a warning.descriptionis optional. Other fields are the same as in the global configuration, without the outermcpServersobject.${workspaceFolder}is replaced with the workspace root. Astdioserver withoutcwduses the workspace root as its working directory.${env:VAR}is resolved when the server connects, in the same order as for global servers. A value you enter is saved for this server in this workspace only and is not shared with global servers, other servers, or other workspaces.- Credentials must come from
${env:VAR}. A descriptor is rejected when plain text appears in a field whose name hastoken,secret,password,credential,cookie,authorization, orapi_keyas a whole segment (for exampleAPI_TOKEN,db-password, orAuthorization), in a URL query parameter with such a name, or in an argument written as--token=<value>. Pass credentials throughenvorheadersrather thanargs. autoApprovein a workspace descriptor is ignored, so a descriptor cannot auto-approve tools. A workspace server’s tools start unapproved; you can turn on Auto-approve for them in MCP server management. Your choice is stored in Dline’s settings for this workspace, not in the repository, and it is cleared when the descriptor changes, so an edited server must be approved again.- Dline watches
.agents/mcp/. Adding, editing, or deleting a descriptor takes effect without reloading the window. A descriptor that fails validation is skipped and the error is logged.
Managing servers
Section titled “Managing servers”Enabling or disabling a server is saved per task while a task is open, and per workspace otherwise. See Capability toggle scopes.
On the Configure tab, each server can be:
- enabled or disabled with its switch, including workspace servers. The switch applies to the current workspace and is kept in Dline’s local workspace state; it does not change
mcp_settings.jsonor a descriptor file in the repository; - restarted with Restart Server, or reconnected with Retry Connection after a failed connection;
- given a timeout from 30 seconds to 1 hour in Request Timeout (servers from the global configuration only);
- configured to auto-approve individual tools with Auto-approve, or all tools with Auto-approve all tools (for a workspace server, the choice applies only to this workspace and starts unchecked);
- removed with Delete Server.
OAuth authentication
Section titled “OAuth authentication”When a remote server requires OAuth, the connection reports that authentication is needed and the server row shows an Authenticate button. Selecting it opens the authorization page in your external browser. After you authorize, the browser returns to a local Dline page at http://127.0.0.1 (ports 48820–48839 are tried first) that confirms the result, and Dline reconnects the server automatically; there is no prompt to open VS Code. Dline registers itself with the server as the client “Dline”. The browser is needed only for the first authorization: Dline refreshes the saved token afterwards until the server revokes it. In VS Code for the Web, the callback returns through VS Code instead.
Security
Section titled “Security”- Add only servers you trust.
- Reference credentials with
${env:VAR}instead of writing them into repository files. autoApprovein a server configuration does not bypass the global approval settings. Review the parameters of tool calls with side effects before approving them.
Troubleshooting
Section titled “Troubleshooting”| Problem | Fix |
|---|---|
| The server does not connect | Check the command or URL, then select Retry Connection |
| Tools are missing | Make sure the server is enabled and connected |
| Authentication errors | Check headers or environment variables; for OAuth servers, select Authenticate |
| Requests time out | Increase Request Timeout or timeout |
| A workspace server does not appear | Check that the file is under .agents/mcp/ with a .yaml, .yml, or .json extension, that its name is unique, and that the Dline output shows no descriptor validation error |