Skip to content

Commit d3d8870

Browse files
committed
feat(config-yaml): support configuring MCP server transport
1 parent 8665a08 commit d3d8870

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

core/config/yaml/loadYaml.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function convertYamlMcpToContinueMcp(
6767
): ExperimentalMCPOptions {
6868
return {
6969
transport: {
70-
type: "stdio",
70+
type: server.transport ?? "stdio",
7171
command: server.command,
7272
args: server.args ?? [],
7373
env: server.env,

docs/docs/customize/deep-dives/mcp.mdx

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,36 @@ To set up your own MCP server, read the [MCP quickstart](https://modelcontextpro
3737
"type": "stdio",
3838
"command": "uvx",
3939
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
40-
}
40+
}
41+
}
42+
]
43+
}
44+
}
45+
```
46+
</TabItem>
47+
</Tabs>
48+
49+
Alternatively you can connect to a remote MCP server, for example using the `sse` transport:
50+
51+
<Tabs groupId="config-remote-example">
52+
<TabItem value="yaml" label="YAML">
53+
```yaml title="config.yaml"
54+
mcpServers:
55+
- name: Remote MCP Server
56+
transport: sse
57+
url: https://api.example.com/mcp/sse
58+
```
59+
</TabItem>
60+
<TabItem value="json" label="JSON">
61+
```json title="config.json"
62+
{
63+
"experimental": {
64+
"modelContextProtocolServers": [
65+
{
66+
"transport": {
67+
"type": "sse",
68+
"url": "https://api.example.com/mcp/sse"
69+
}
4170
}
4271
]
4372
}

docs/docs/reference.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,8 @@ prompts, context, and tool use. Continue supports any MCP server with the MCP co
380380
- `name` (**required**): The name of the MCP server.
381381
- `command` (**required**): The command used to start the server.
382382
- `args`: An optional array of arguments for the command.
383+
- `transport`: An optional type of transport for remote servers, including `sse` and `websocket`.
384+
- `url`: An optional URL of the remote MCP server, if using remote transports.
383385
- `env`: An optional map of environment variables for the server process.
384386
- `connectionTimeout`: An optional connection timeout number to the server in milliseconds.
385387

packages/config-yaml/src/schemas/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const contextSchema = z.object({
1212
const mcpServerSchema = z.object({
1313
name: z.string(),
1414
command: z.string(),
15+
transport: z.string().optional(),
1516
faviconUrl: z.string().optional(),
1617
args: z.array(z.string()).optional(),
1718
env: z.record(z.string()).optional(),

0 commit comments

Comments
 (0)