Skip to content

fix(skill): correct MCP local server env key to environment in customize-opencode - #35867

Closed
NumerousJLs wants to merge 2 commits into
anomalyco:devfrom
NumerousJLs:fix/skill-mcp-env-key
Closed

fix(skill): correct MCP local server env key to environment in customize-opencode#35867
NumerousJLs wants to merge 2 commits into
anomalyco:devfrom
NumerousJLs:fix/skill-mcp-env-key

Conversation

@NumerousJLs

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #35860

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The built-in customize-opencode skill showed "env" as the key for MCP local server environment variables in two example blocks. The config schema (packages/core/src/config/mcp.ts) and the runtime (packages/opencode/src/mcp/index.ts:342) both use "environment". The config loader strips unknown keys without warning, so users copying the example had their env vars silently dropped — no error, just absent subprocess environment variables.

Two changes in one file:

-      "env": {}
+      "environment": {}
-      "env": { "BROWSER": "chromium" }
+      "environment": { "BROWSER": "chromium" }

How did you verify your code works?

  • bun test test/plugin/skill.test.ts from packages/core — 1 pass, 0 fail
  • bun run typecheck (turbo, all 30 packages) — 30 successful, 0 errors
  • Confirmed "environment" matches the field name in packages/core/src/config/mcp.ts:12 and what mcp/index.ts:342 reads at runtime

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

…ize-opencode

The built-in customize-opencode skill showed two example MCP local server
blocks using "env" as the key for environment variables. The config schema
(McpLocalConfig) and the runtime in mcp/index.ts both use "environment".
Users copying these examples had their env vars silently dropped with no
error, since the config loader strips unknown keys.

Closes anomalyco#35860
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: customize-opencode skill example for local MCP uses env but schema/runtime expect environment

1 participant