Просмотр исходного кода

docs: adding spellcheck command

Jay V 4 месяцев назад
Родитель
Сommit
78321a95e8

+ 5 - 0
.opencode/command/spellcheck.md

@@ -0,0 +1,5 @@
+---
+description: Spellcheck all markdown file changes
+---
+
+Look at all the unstaged changes to markdown (.md, .mdx) files, pull out the lines that have changed, and check for spelling and grammar errors.

+ 2 - 2
bun.lock

@@ -239,7 +239,7 @@
         "sharp": "0.32.5",
         "shiki": "3.4.2",
         "solid-js": "catalog:",
-        "toolbeam-docs-theme": "0.4.7",
+        "toolbeam-docs-theme": "0.4.8",
       },
       "devDependencies": {
         "@types/node": "catalog:",
@@ -2797,7 +2797,7 @@
 
     "toidentifier": ["[email protected]", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="],
 
-    "toolbeam-docs-theme": ["[email protected].7", "", { "peerDependencies": { "@astrojs/starlight": "^0.34.3", "astro": "^5.7.13" } }, "sha512-oVA/V4M4s4vtLljfnZrOSuCNomek5h9jIYkr92l4QgAQvB3ht+D7xAJIy27IGVJzYA5scUE1OK84ZZqeajoeWw=="],
+    "toolbeam-docs-theme": ["[email protected].8", "", { "peerDependencies": { "@astrojs/starlight": "^0.34.3", "astro": "^5.7.13" } }, "sha512-b+5ynEFp4Woe5a22hzNQm42lD23t13ZMihVxHbzjA50zdcM9aOSJTIjdJ0PDSd4/50HbBXcpHiQsz6rM4N88ww=="],
 
     "tr46": ["[email protected]", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],
 

+ 1 - 1
packages/web/package.json

@@ -31,7 +31,7 @@
     "sharp": "0.32.5",
     "shiki": "3.4.2",
     "solid-js": "catalog:",
-    "toolbeam-docs-theme": "0.4.7"
+    "toolbeam-docs-theme": "0.4.8"
   },
   "devDependencies": {
     "opencode": "workspace:*",

+ 81 - 10
packages/web/src/content/docs/mcp-servers.mdx

@@ -3,10 +3,10 @@ title: MCP servers
 description: Add local and remote MCP tools.
 ---
 
-You can add external tools to opencode using the _Model Context Protocol_, or MCP. opencode supports both:
+You can add external tools to OpenCode using the _Model Context Protocol_, or MCP. OpenCode supports both:
 
 - Local servers
-- And remote servers
+- Remote servers
 
 Once added, MCP tools are automatically available to the LLM alongside built-in tools.
 
@@ -14,15 +14,22 @@ Once added, MCP tools are automatically available to the LLM alongside built-in
 
 ## Configure
 
-You can define MCP servers in your opencode config under `mcp`.
+You can define MCP servers in your OpenCode config under `mcp`.
 
 ---
 
 ### Local
 
-Add local MCP servers using `"type": "local"` within the MCP object. Multiple MCP servers can be added. The key string for each server can be any arbitrary name.
+Add local MCP servers using `"type": "local"` within the MCP object. Multiple MCP servers can be added.
 
-```json title="opencode.json"
+:::tip
+MCP servers add to your context, so you want to be careful with which
+ones you enable.
+:::
+
+The key string for each server can be any arbitrary name.
+
+```json title="opencode.json" {15}
 {
   "$schema": "https://opencode.ai/config.json",
   "mcp": {
@@ -95,16 +102,70 @@ Local and remote servers can be used together within the same `mcp` config objec
 
 ---
 
-## Per agent
+## Manage
+
+Your MCPs are available as tools in OpenCode, alongside built-in tools. So you
+can manage them through the OpenCode config like any other tool.
+
+---
+
+### Global
+
+This means that you can enable or disable them globally.
+
+```json title="opencode.json" {14}
+{
+  "$schema": "https://opencode.ai/config.json",
+  "mcp": {
+    "my-mcp-foo": {
+      "type": "local",
+      "command": ["bun", "x", "my-mcp-command-foo"]
+    },
+    "my-mcp-bar": {
+      "type": "local",
+      "command": ["bun", "x", "my-mcp-command-bar"]
+    }
+  },
+  "tools": {
+    "my-mcp-foo": false
+  }
+}
+```
+
+We can also use a glob pattern to disable all matching MCPs.
+
+```json title="opencode.json" {14}
+{
+  "$schema": "https://opencode.ai/config.json",
+  "mcp": {
+    "my-mcp-foo": {
+      "type": "local",
+      "command": ["bun", "x", "my-mcp-command-foo"]
+    },
+    "my-mcp-bar": {
+      "type": "local",
+      "command": ["bun", "x", "my-mcp-command-bar"]
+    }
+  },
+  "tools": {
+    "my-mcp*": false
+  }
+}
+```
+
+Here we are using the glob pattern `my-mcp*` to disable all MCPs.
+
+---
+
+### Per agent
 
 If you have a large number of MCP servers you may want to only enable them per
 agent and disable them globally. To do this:
 
-1. Configure the MCP server.
-2. Disable it as a tool globally.
-3. In your [agent config](/docs/agents#tools) enable the MCP server as a tool.
+1. Disable it as a tool globally.
+2. In your [agent config](/docs/agents#tools) enable the MCP server as a tool.
 
-```json title="opencode.json" {11, 14-17}
+```json title="opencode.json" {11, 14-18}
 {
   "$schema": "https://opencode.ai/config.json",
   "mcp": {
@@ -126,3 +187,13 @@ agent and disable them globally. To do this:
   }
 }
 ```
+
+---
+
+#### Glob patterns
+
+The glob pattern uses simple regex globbing patterns.
+
+- `*` matches zero or more of any character
+- `?` matches exactly one character
+- All other characters match literally