Skip to content

Commit 78321a9

Browse files
committed
docs: adding spellcheck command
1 parent 225adc4 commit 78321a9

4 files changed

Lines changed: 89 additions & 13 deletions

File tree

.opencode/command/spellcheck.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
description: Spellcheck all markdown file changes
3+
---
4+
5+
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.

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"sharp": "0.32.5",
3232
"shiki": "3.4.2",
3333
"solid-js": "catalog:",
34-
"toolbeam-docs-theme": "0.4.7"
34+
"toolbeam-docs-theme": "0.4.8"
3535
},
3636
"devDependencies": {
3737
"opencode": "workspace:*",

packages/web/src/content/docs/mcp-servers.mdx

Lines changed: 81 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,33 @@ title: MCP servers
33
description: Add local and remote MCP tools.
44
---
55

6-
You can add external tools to opencode using the _Model Context Protocol_, or MCP. opencode supports both:
6+
You can add external tools to OpenCode using the _Model Context Protocol_, or MCP. OpenCode supports both:
77

88
- Local servers
9-
- And remote servers
9+
- Remote servers
1010

1111
Once added, MCP tools are automatically available to the LLM alongside built-in tools.
1212

1313
---
1414

1515
## Configure
1616

17-
You can define MCP servers in your opencode config under `mcp`.
17+
You can define MCP servers in your OpenCode config under `mcp`.
1818

1919
---
2020

2121
### Local
2222

23-
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.
23+
Add local MCP servers using `"type": "local"` within the MCP object. Multiple MCP servers can be added.
2424

25-
```json title="opencode.json"
25+
:::tip
26+
MCP servers add to your context, so you want to be careful with which
27+
ones you enable.
28+
:::
29+
30+
The key string for each server can be any arbitrary name.
31+
32+
```json title="opencode.json" {15}
2633
{
2734
"$schema": "https://opencode.ai/config.json",
2835
"mcp": {
@@ -95,16 +102,70 @@ Local and remote servers can be used together within the same `mcp` config objec
95102

96103
---
97104

98-
## Per agent
105+
## Manage
106+
107+
Your MCPs are available as tools in OpenCode, alongside built-in tools. So you
108+
can manage them through the OpenCode config like any other tool.
109+
110+
---
111+
112+
### Global
113+
114+
This means that you can enable or disable them globally.
115+
116+
```json title="opencode.json" {14}
117+
{
118+
"$schema": "https://opencode.ai/config.json",
119+
"mcp": {
120+
"my-mcp-foo": {
121+
"type": "local",
122+
"command": ["bun", "x", "my-mcp-command-foo"]
123+
},
124+
"my-mcp-bar": {
125+
"type": "local",
126+
"command": ["bun", "x", "my-mcp-command-bar"]
127+
}
128+
},
129+
"tools": {
130+
"my-mcp-foo": false
131+
}
132+
}
133+
```
134+
135+
We can also use a glob pattern to disable all matching MCPs.
136+
137+
```json title="opencode.json" {14}
138+
{
139+
"$schema": "https://opencode.ai/config.json",
140+
"mcp": {
141+
"my-mcp-foo": {
142+
"type": "local",
143+
"command": ["bun", "x", "my-mcp-command-foo"]
144+
},
145+
"my-mcp-bar": {
146+
"type": "local",
147+
"command": ["bun", "x", "my-mcp-command-bar"]
148+
}
149+
},
150+
"tools": {
151+
"my-mcp*": false
152+
}
153+
}
154+
```
155+
156+
Here we are using the glob pattern `my-mcp*` to disable all MCPs.
157+
158+
---
159+
160+
### Per agent
99161

100162
If you have a large number of MCP servers you may want to only enable them per
101163
agent and disable them globally. To do this:
102164

103-
1. Configure the MCP server.
104-
2. Disable it as a tool globally.
105-
3. In your [agent config](/docs/agents#tools) enable the MCP server as a tool.
165+
1. Disable it as a tool globally.
166+
2. In your [agent config](/docs/agents#tools) enable the MCP server as a tool.
106167

107-
```json title="opencode.json" {11, 14-17}
168+
```json title="opencode.json" {11, 14-18}
108169
{
109170
"$schema": "https://opencode.ai/config.json",
110171
"mcp": {
@@ -126,3 +187,13 @@ agent and disable them globally. To do this:
126187
}
127188
}
128189
```
190+
191+
---
192+
193+
#### Glob patterns
194+
195+
The glob pattern uses simple regex globbing patterns.
196+
197+
- `*` matches zero or more of any character
198+
- `?` matches exactly one character
199+
- All other characters match literally

0 commit comments

Comments
 (0)