Skip to content

feat: register the lerd MCP server with OpenCode - #1547

Open
geodro wants to merge 1 commit into
mainfrom
feat/1542-opencode-mcp
Open

feat: register the lerd MCP server with OpenCode#1547
geodro wants to merge 1 commit into
mainfrom
feat/1542-opencode-mcp

Conversation

@geodro

@geodro geodro commented Aug 23, 2026

Copy link
Copy Markdown
Member

OpenCode is the one client so far that shares neither of the two JSON shapes lerd already writes. Its entry lives under an mcp key rather than mcpServers or servers, names the transport local rather than stdio, folds the command and its arguments into a single array, and expects the entry to say it is enabled. That made it a new format rather than another row in the table, so lerdJSONEntry now takes the client it is building for instead of a bare needsType flag.

Everything else was already general enough to carry it. mergeServerJSON and removeServerJSON key off the client's own ServerKey, so the merge, the removal and the has-lerd check needed no changes at all.

OpenCode reads AGENTS.md from the project root, which the codex entry already writes, so the only context file it claims for itself is the copy under its own config directory. That is the same reasoning the antigravity entry uses for GEMINI.md.

Registered at opencode.json in the project root and ~/.config/opencode/opencode.json globally, both taken from OpenCode's own documentation rather than inferred.

Closes #1542

OpenCode is the one client so far that shares neither of the two JSON shapes lerd already writes. Its entry lives under an mcp key rather than mcpServers or servers, names the transport local rather than stdio, folds the command and its arguments into a single array, and expects the entry to say it is enabled. That is a new format rather than another row in the table, so lerdJSONEntry now takes the client it is building for instead of a bare needsType flag.

Everything else was already general enough to carry it. mergeServerJSON and removeServerJSON key off the client's own ServerKey, so the merge, the removal and the has-lerd check needed nothing.

It reads AGENTS.md from the project root, which the codex entry already writes, so the only context file it claims for itself is the copy under its own config directory. Same reasoning the antigravity entry uses for GEMINI.md.

Closes #1542
@tjbarber

Copy link
Copy Markdown

Thank you for adding this!

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.

Add OpenCode support to lerd mcp:enable-global and lerd mcp:inject

2 participants