This guide connects Cursor to OpenCode++ through the stdio MCP server. Cursor remains the editor and coding agent; OpenCode++ provides task-aware context, edit boundaries, evidence gates, and loop decision reports.
Build the package:
npm run buildAdd the MCP server to Cursor's MCP configuration:
{
"mcpServers": {
"opencode-plusplus": {
"command": "opencode-plusplus-mcp",
"args": []
}
}
}For local development:
{
"mcpServers": {
"opencode-plusplus": {
"command": "node",
"args": ["path/to/opencode-plusplus/dist/mcp/server.js"]
}
}
}Call:
opencode_plusplus_start_loopExample:
{
"repo": "F:/path/to/repo",
"task": "refactor auth session module",
"agent": "cursor",
"type": "refactor",
"base": "main"
}Cursor should pin the returned mustInspect, allowedEditGlobs, avoidEditGlobs, and requiredCommands into the active task context.
Record edits:
{
"repo": "F:/path/to/repo",
"traceId": "refactor-auth-session-module",
"agent": "cursor",
"action": "edit",
"files": ["src/auth/session.ts", "test/auth/session.test.ts"],
"reason": "Split timeout behavior and updated related tests"
}Record verification:
{
"repo": "F:/path/to/repo",
"traceId": "refactor-auth-session-module",
"agent": "cursor",
"action": "run-test",
"command": "npm test -- test/auth/session.test.ts",
"result": "passed"
}Call:
opencode_plusplus_evaluateExample:
{
"repo": "F:/path/to/repo",
"task": "refactor auth session module",
"traceId": "refactor-auth-session-module",
"base": "main",
"phase": "after-edit",
"failOn": "required"
}Cursor should surface blocking, nextAction, requiredCommands, missingEvidence, and allowedEditGlobs to the user before closing the task.
Call opencode_plusplus_repair when evaluation blocks. Use requiredActions as the repair checklist and avoid expanding edits outside allowedEditGlobs unless the next action is repack or expand-context.
Call:
opencode_plusplus_finalizeExample:
{
"repo": "F:/path/to/repo",
"task": "refactor auth session module",
"traceId": "refactor-auth-session-module",
"base": "main",
"finalState": "success"
}passed: true plus blocking: false is the signal that OpenCode++ considers the task ready for review.
- Cursor rules, AGENTS.md, and MCP results can overlap; the task run returned by
start_loopshould be treated as the task-specific source of truth. - MCP mode cannot force Cursor to run commands or obey gates without host workflow support.
- Cursor MCP configuration and tool invocation UX may vary by Cursor version.
- For strict enforcement, use the CLI orchestrator with an executor instead of agent-led MCP mode.