瀏覽代碼

docs: Clarify MCP config instructions (#1026)

Michael Hanson 1 年之前
父節點
當前提交
132e26ddbf
共有 1 個文件被更改,包括 9 次插入4 次删除
  1. 9 4
      packages/web/src/content/docs/docs/mcp-servers.mdx

+ 9 - 4
packages/web/src/content/docs/docs/mcp-servers.mdx

@@ -18,19 +18,24 @@ You can define MCP servers in your opencode config under `mcp`.
 
 
 ### Local
 ### Local
 
 
-Add a local MCP servers under `mcp.localmcp`.
+Add local MCP servers under `mcp` with `"type": "local"`.
 
 
 ```json title="opencode.json"
 ```json title="opencode.json"
 {
 {
   "$schema": "https://opencode.ai/config.json",
   "$schema": "https://opencode.ai/config.json",
   "mcp": {
   "mcp": {
-    "localmcp": {
+    "my-local-mcp-server": {
       "type": "local",
       "type": "local",
       "command": ["bun", "x", "my-mcp-command"],
       "command": ["bun", "x", "my-mcp-command"],
       "enabled": true,
       "enabled": true,
       "environment": {
       "environment": {
         "MY_ENV_VAR": "my_env_var_value"
         "MY_ENV_VAR": "my_env_var_value"
       }
       }
+    }, {
+    "my-different-local-mcp-server": {
+      "type": "local",
+      "command": ["bun", "x", "my-other-mcp-command"],
+      "enabled": true
     }
     }
   }
   }
 }
 }
@@ -40,13 +45,13 @@ You can also disable a server by setting `enabled` to `false`. This is useful if
 
 
 ### Remote
 ### Remote
 
 
-Add a remote MCP servers under `mcp.remotemcp`.
+Add remote MCP servers under `mcp` with `"type": "remote"`.
 
 
 ```json title="opencode.json"
 ```json title="opencode.json"
 {
 {
   "$schema": "https://opencode.ai/config.json",
   "$schema": "https://opencode.ai/config.json",
   "mcp": {
   "mcp": {
-    "remotemcp": {
+    "my-remote-mcp": {
       "type": "remote",
       "type": "remote",
       "url": "https://my-mcp-server.com",
       "url": "https://my-mcp-server.com",
       "enabled": true,
       "enabled": true,