diff options
| author | Matt Gillard <[email protected]> | 2025-10-30 17:25:24 +1100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-10-30 01:25:24 -0500 |
| commit | 3ae75d70310347023f16a7d25156824e630fd9c0 (patch) | |
| tree | 6cd360a7d5a1f61b39707ddce3254f33797b22ea /packages/web/src/content/docs | |
| parent | 4b5e44796156a39f386b26b88f16743011b66323 (diff) | |
| download | opencode-3ae75d70310347023f16a7d25156824e630fd9c0.tar.gz opencode-3ae75d70310347023f16a7d25156824e630fd9c0.zip | |
add optional timeout field to mcp config to allow users to use responding servers (#3558)
Co-authored-by: Matt Gillard <[email protected]>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <[email protected]>
Diffstat (limited to 'packages/web/src/content/docs')
| -rw-r--r-- | packages/web/src/content/docs/mcp-servers.mdx | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/packages/web/src/content/docs/mcp-servers.mdx b/packages/web/src/content/docs/mcp-servers.mdx index ab87449e0..132537b05 100644 --- a/packages/web/src/content/docs/mcp-servers.mdx +++ b/packages/web/src/content/docs/mcp-servers.mdx @@ -45,12 +45,12 @@ with a unique name. You can refer to that MCP by name when prompting the LLM. "mcp": { "name-of-mcp-server": { // ... - "enabled": true + "enabled": true, }, "name-of-other-mcp-server": { // ... - } - } + }, + }, } ``` @@ -72,10 +72,10 @@ Add local MCP servers using `type` to `"local"` within the MCP object. "command": ["npx", "-y", "my-mcp-command"], "enabled": true, "environment": { - "MY_ENV_VAR": "my_env_var_value" - } - } - } + "MY_ENV_VAR": "my_env_var_value", + }, + }, + }, } ``` @@ -91,8 +91,8 @@ For example, here's how I can add the test "mcp_everything": { "type": "local", "command": ["npx", "-y", "@modelcontextprotocol/server-everything"], - } - } + }, + }, } ``` @@ -106,12 +106,13 @@ use the mcp_everything tool to add the number 3 and 4 Here are all the options for configuring a local MCP server. -| Option | Type | Required | Description | -| ------------- | ------- | -------- | ----------------------------------------------------- | -| `type` | String | Y | Type of MCP server connection, must be `"local"`. | -| `command` | Array | Y | Command and arguments to run the MCP server. | -| `environment` | Object | | Environment variables to set when running the server. | -| `enabled` | Boolean | | Enable or disable the MCP server on startup. | +| Option | Type | Required | Description | +| ------------- | ------- | -------- | ----------------------------------------------------------------------------------- | +| `type` | String | Y | Type of MCP server connection, must be `"local"`. | +| `command` | Array | Y | Command and arguments to run the MCP server. | +| `environment` | Object | | Environment variables to set when running the server. | +| `enabled` | Boolean | | Enable or disable the MCP server on startup. | +| `timeout` | Number | | Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds). | --- @@ -139,12 +140,13 @@ Here the `url` is the URL of the remote MCP server and with the `headers` option #### Options -| Option | Type | Required | Description | -| --------- | ------- | -------- | -------------------------------------------------- | -| `type` | String | Y | Type of MCP server connection, must be `"remote"`. | -| `url` | String | Y | URL of the remote MCP server. | -| `enabled` | Boolean | | Enable or disable the MCP server on startup. | -| `headers` | Object | | Headers to send with the request. | +| Option | Type | Required | Description | +| --------- | ------- | -------- | ----------------------------------------------------------------------------------- | +| `type` | String | Y | Type of MCP server connection, must be `"remote"`. | +| `url` | String | Y | URL of the remote MCP server. | +| `enabled` | Boolean | | Enable or disable the MCP server on startup. | +| `headers` | Object | | Headers to send with the request. | +| `timeout` | Number | | Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds). | --- |
