Skip to content

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).

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.

The MCP Servers list opened from the input toolbar: the release-tools server with its toggle, and the gear icon in the top-right cornerThe MCP Servers list opened from the input toolbar: the release-tools server with its toggle, and the gear icon in the top-right corner

On the Remote Servers tab:

  1. Enter a unique name in Server Name.
  2. Enter the full URL in Server URL.
  3. Under Transport Type, choose Streamable HTTP (default) or SSE (Legacy).
  4. Select Add Server.

This form has no field for request headers. To add authentication headers, edit the configuration file instead.

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.

{
"mcpServers": {
"local-server": {
"command": "node",
"args": ["/path/to/server.js"],
"env": {
"API_KEY": "${env:MY_API_KEY}"
},
"timeout": 60,
"disabled": false
}
}
}
{
"mcpServers": {
"remote-server": {
"type": "streamableHttp",
"url": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer ${env:MCP_TOKEN}"
}
}
}
}
FieldDescription
command, args, env, cwdLaunch command, arguments, environment variables, and working directory of a STDIO server
url, headersAddress and request headers of a remote server
typestdio, sse, or streamableHttp. An entry with url but no type is treated as sse, so set it explicitly
timeoutRequest timeout in seconds; default 60, minimum 1
disabledDisables the server when true
autoApproveNames 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.

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.json

.agents/mcp/project-db.yml:

name: project-db
description: Query the project database
type: stdio
command: node
args: ["${workspaceFolder}/tools/db-mcp.js"]
env:
DB_URL: "${env:PROJECT_DB_URL}"
timeout: 120

.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}"
}
}
  • name is required and must be unique within the workspace. When two files use the same name, the file that sorts first by path is loaded and the other is ignored with a warning. description is optional. Other fields are the same as in the global configuration, without the outer mcpServers object.
  • ${workspaceFolder} is replaced with the workspace root. A stdio server without cwd uses 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 has token, secret, password, credential, cookie, authorization, or api_key as a whole segment (for example API_TOKEN, db-password, or Authorization), in a URL query parameter with such a name, or in an argument written as --token=<value>. Pass credentials through env or headers rather than args.
  • autoApprove in 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.

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.json or 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.

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.

  • Add only servers you trust.
  • Reference credentials with ${env:VAR} instead of writing them into repository files.
  • autoApprove in a server configuration does not bypass the global approval settings. Review the parameters of tool calls with side effects before approving them.
ProblemFix
The server does not connectCheck the command or URL, then select Retry Connection
Tools are missingMake sure the server is enabled and connected
Authentication errorsCheck headers or environment variables; for OAuth servers, select Authenticate
Requests time outIncrease Request Timeout or timeout
A workspace server does not appearCheck 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