opencode-mcp 1.0.1 → 1.1.0

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 CHANGED
@@ -5,6 +5,19 @@ 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.1.0] - 2025-02-08
9
+
10
+ ### Added
11
+
12
+ - **Test suite** — 102 tests across 5 test files using Vitest
13
+ - `helpers.test.ts` — 35 tests for all formatting and response helper functions
14
+ - `client.test.ts` — 37 tests for HTTP client, error handling, retry logic, auth
15
+ - `tools.test.ts` — 16 tests for tool registration and handler behavior
16
+ - `resources.test.ts` — 7 tests for MCP resource registration and handlers
17
+ - `prompts.test.ts` — 7 tests for MCP prompt registration and handlers
18
+ - `vitest.config.ts` configuration
19
+ - `test`, `test:watch`, and `test:coverage` npm scripts
20
+
8
21
  ## [1.0.1] - 2025-02-08
9
22
 
10
23
  ### Changed
package/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # opencode-mcp
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/opencode-mcp.svg)](https://www.npmjs.com/package/opencode-mcp)
4
- [![license](https://img.shields.io/npm/l/opencode-mcp.svg)](https://github.com/AlaeddineMessadi/opencode-mcp/blob/main/LICENSE)
5
- [![node](https://img.shields.io/node/v/opencode-mcp.svg)](https://nodejs.org/)
3
+ [![npm version](https://img.shields.io/npm/v/opencode-mcp)](https://www.npmjs.com/package/opencode-mcp)
4
+ [![license](https://img.shields.io/github/license/AlaeddineMessadi/opencode-mcp)](https://github.com/AlaeddineMessadi/opencode-mcp/blob/main/LICENSE)
5
+ [![node](https://img.shields.io/node/v/opencode-mcp)](https://nodejs.org/)
6
+ [![npm downloads](https://img.shields.io/npm/dm/opencode-mcp)](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
 
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.1",
49
+ version: "1.1.0",
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.1 started (connecting to OpenCode at ${baseUrl})`);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "MCP server that wraps the OpenCode AI headless server API — 70 tools, 10 resources, 5 prompts for any MCP client",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -18,6 +18,9 @@
18
18
  "postbuild": "chmod +x dist/index.js",
19
19
  "start": "node dist/index.js",
20
20
  "dev": "tsc --watch",
21
+ "test": "vitest run",
22
+ "test:watch": "vitest",
23
+ "test:coverage": "vitest run --coverage",
21
24
  "prepublishOnly": "npm run build"
22
25
  },
23
26
  "keywords": [
@@ -52,6 +55,7 @@
52
55
  },
53
56
  "devDependencies": {
54
57
  "@types/node": "^22.0.0",
55
- "typescript": "^5.7.0"
58
+ "typescript": "^5.7.0",
59
+ "vitest": "^4.0.18"
56
60
  }
57
61
  }