Skip to content

feat: add MCP server for Cursor, Claude Code, and Windsurf support#4

Merged
Helweg merged 2 commits intomainfrom
feature/mcp-server
Feb 23, 2026
Merged

feat: add MCP server for Cursor, Claude Code, and Windsurf support#4
Helweg merged 2 commits intomainfrom
feature/mcp-server

Conversation

@Helweg
Copy link
Copy Markdown
Owner

@Helweg Helweg commented Feb 23, 2026

Summary

  • Adds a standalone MCP server (src/mcp-server.ts) exposing all 8 index tools and 4 prompts over stdio transport, enabling integration with Cursor, Claude Code, and Windsurf
  • Adds CLI entry point (src/cli.ts) with --project and --config flags, registered as opencode-codebase-index-mcp bin
  • Includes comprehensive test suite (16 tests) using InMemoryTransport for tool/prompt registration and execution
  • Updates build config, package.json exports, and documentation

Add dual-mode MCP server alongside existing OpenCode plugin so any
MCP-compatible client can share the same codebase index.

- Create src/mcp-server.ts with 8 tools and 4 prompts wrapping Indexer
- Create src/cli.ts with --project/--config flags and stdio transport
- Add bin entry (opencode-codebase-index-mcp) to package.json
- Move @modelcontextprotocol/sdk and zod to optional peer dependencies
- Add createRequire ESM banner for native .node module loading
- Add 16 tests via InMemoryTransport covering all tools and prompts
- Update README with MCP setup docs (Cursor, Claude Code config examples)
- Update AGENTS.md with MCP entries in file structure and code map

Closes #3
@Helweg Helweg merged commit 4f949cb into main Feb 23, 2026
1 check passed
@Helweg Helweg deleted the feature/mcp-server branch February 23, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant