opencode-mcp 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +92 -12
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.1] - 2025-02-08
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Removed opencode self-referencing config from README (it doesn't make sense to add opencode-mcp to opencode itself)
|
|
13
|
+
- Added MCP client configs for VS Code (GitHub Copilot), Cline, Continue, Zed, and Amazon Q
|
|
14
|
+
- Clarified that all environment variables and authentication are optional
|
|
15
|
+
- Added "Compatible MCP Clients" section to README
|
|
16
|
+
- Updated docs/configuration.md with all new client configs
|
|
17
|
+
|
|
8
18
|
## [1.0.0] - 2025-02-08
|
|
9
19
|
|
|
10
20
|
### Added
|
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# opencode-mcp
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/opencode-mcp)
|
|
4
|
+
[](https://github.com/AlaeddineMessadi/opencode-mcp/blob/main/LICENSE)
|
|
5
|
+
[](https://nodejs.org/)
|
|
6
|
+
[](https://www.npmjs.com/package/opencode-mcp)
|
|
6
7
|
|
|
7
8
|
An [MCP](https://modelcontextprotocol.io/) server that gives any MCP-compatible client full access to a running [OpenCode](https://opencode.ai/) instance. Manage sessions, send prompts, search files, review diffs, configure providers, control the TUI, and more.
|
|
8
9
|
|
|
@@ -18,6 +19,8 @@ opencode serve
|
|
|
18
19
|
|
|
19
20
|
### 2. Add to your MCP client
|
|
20
21
|
|
|
22
|
+
Pick your client below. No authentication is needed by default — just add the config and restart your client.
|
|
23
|
+
|
|
21
24
|
**Claude Desktop** (`claude_desktop_config.json`):
|
|
22
25
|
|
|
23
26
|
```json
|
|
@@ -63,23 +66,82 @@ claude mcp add opencode -- npx -y opencode-mcp
|
|
|
63
66
|
}
|
|
64
67
|
```
|
|
65
68
|
|
|
66
|
-
**
|
|
69
|
+
**VS Code — GitHub Copilot** (`settings.json`):
|
|
67
70
|
|
|
68
71
|
```json
|
|
69
72
|
{
|
|
70
|
-
"mcp":
|
|
71
|
-
|
|
73
|
+
"github.copilot.chat.mcp.servers": [
|
|
74
|
+
{
|
|
75
|
+
"name": "opencode",
|
|
72
76
|
"type": "stdio",
|
|
73
77
|
"command": "npx",
|
|
74
78
|
"args": ["-y", "opencode-mcp"]
|
|
75
79
|
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Cline** (VS Code extension settings):
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"mcpServers": {
|
|
89
|
+
"opencode": {
|
|
90
|
+
"command": "npx",
|
|
91
|
+
"args": ["-y", "opencode-mcp"]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Continue** (`.continue/config.json`):
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"mcpServers": {
|
|
102
|
+
"opencode": {
|
|
103
|
+
"command": "npx",
|
|
104
|
+
"args": ["-y", "opencode-mcp"]
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Zed** (`settings.json`):
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"context_servers": {
|
|
115
|
+
"opencode": {
|
|
116
|
+
"command": {
|
|
117
|
+
"path": "npx",
|
|
118
|
+
"args": ["-y", "opencode-mcp"]
|
|
119
|
+
}
|
|
120
|
+
}
|
|
76
121
|
}
|
|
77
122
|
}
|
|
78
123
|
```
|
|
79
124
|
|
|
125
|
+
**Amazon Q** (VS Code `settings.json`):
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"amazon-q.mcp.servers": [
|
|
130
|
+
{
|
|
131
|
+
"name": "opencode",
|
|
132
|
+
"type": "stdio",
|
|
133
|
+
"command": "npx",
|
|
134
|
+
"args": ["-y", "opencode-mcp"]
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
80
140
|
That's it. Your MCP client now has access to the entire OpenCode API.
|
|
81
141
|
|
|
82
|
-
### Custom server URL or
|
|
142
|
+
### Custom server URL or authentication (optional)
|
|
143
|
+
|
|
144
|
+
By default, the MCP server connects to `http://127.0.0.1:4096` with no authentication. Both username and password are **optional** — auth is only needed if you've enabled it on the OpenCode server side.
|
|
83
145
|
|
|
84
146
|
If the OpenCode server is on a different host/port or has auth enabled, pass environment variables:
|
|
85
147
|
|
|
@@ -170,11 +232,15 @@ Guided workflow templates:
|
|
|
170
232
|
|
|
171
233
|
## Environment Variables
|
|
172
234
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
|
176
|
-
|
|
177
|
-
| `
|
|
235
|
+
All environment variables are **optional**. You only need to set them if you've changed the defaults on the OpenCode server side.
|
|
236
|
+
|
|
237
|
+
| Variable | Description | Default | Required |
|
|
238
|
+
|---|---|---|---|
|
|
239
|
+
| `OPENCODE_BASE_URL` | URL of the OpenCode server | `http://127.0.0.1:4096` | No |
|
|
240
|
+
| `OPENCODE_SERVER_USERNAME` | HTTP basic auth username | `opencode` | No |
|
|
241
|
+
| `OPENCODE_SERVER_PASSWORD` | HTTP basic auth password | *(none — auth disabled)* | No |
|
|
242
|
+
|
|
243
|
+
> **Note:** Authentication is disabled by default. It only activates when `OPENCODE_SERVER_PASSWORD` is set on both the OpenCode server and the MCP server.
|
|
178
244
|
|
|
179
245
|
## How It Works
|
|
180
246
|
|
|
@@ -229,6 +295,20 @@ npm run dev # watch mode
|
|
|
229
295
|
- [Usage Examples](docs/examples.md) — real workflow examples
|
|
230
296
|
- [Architecture](docs/architecture.md) — system design and data flow
|
|
231
297
|
|
|
298
|
+
## Compatible MCP Clients
|
|
299
|
+
|
|
300
|
+
Works with any MCP-compatible client, including:
|
|
301
|
+
|
|
302
|
+
- [Claude Desktop](https://claude.ai/download)
|
|
303
|
+
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
|
|
304
|
+
- [Cursor](https://cursor.sh/)
|
|
305
|
+
- [Windsurf](https://codeium.com/windsurf)
|
|
306
|
+
- [VS Code (GitHub Copilot)](https://code.visualstudio.com/)
|
|
307
|
+
- [Cline](https://github.com/cline/cline)
|
|
308
|
+
- [Continue](https://continue.dev/)
|
|
309
|
+
- [Zed](https://zed.dev/)
|
|
310
|
+
- [Amazon Q](https://aws.amazon.com/q/developer/)
|
|
311
|
+
|
|
232
312
|
## References
|
|
233
313
|
|
|
234
314
|
- [OpenCode Documentation](https://opencode.ai/docs/)
|
package/dist/index.js
CHANGED
|
@@ -46,7 +46,7 @@ const password = process.env.OPENCODE_SERVER_PASSWORD;
|
|
|
46
46
|
const client = new OpenCodeClient({ baseUrl, username, password });
|
|
47
47
|
const server = new McpServer({
|
|
48
48
|
name: "opencode-mcp",
|
|
49
|
-
version: "1.0.
|
|
49
|
+
version: "1.0.2",
|
|
50
50
|
description: "Full-featured MCP server wrapping the OpenCode AI headless HTTP server. " +
|
|
51
51
|
"Provides 60+ tools, resources, and prompts to manage sessions, send " +
|
|
52
52
|
"prompts, search files, configure providers, control the TUI, monitor " +
|
|
@@ -77,7 +77,7 @@ registerPrompts(server);
|
|
|
77
77
|
async function main() {
|
|
78
78
|
const transport = new StdioServerTransport();
|
|
79
79
|
await server.connect(transport);
|
|
80
|
-
console.error(`opencode-mcp v1.0.
|
|
80
|
+
console.error(`opencode-mcp v1.0.2 started (connecting to OpenCode at ${baseUrl})`);
|
|
81
81
|
}
|
|
82
82
|
main().catch((err) => {
|
|
83
83
|
console.error("Fatal error starting opencode-mcp:", err);
|
package/package.json
CHANGED