Repository navigation
Conversation
`opencode mcp add` gained non-interactive flags (--url, --header, --env, and a command after `--`) but the CLI reference only described the interactive wizard. Document the non-interactive form with a remote and a local example and a flag table.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the CLI documentation for opencode mcp add to better explain interactive vs non-interactive usage and document flags for remote/local MCP servers.
Changes:
- Clarifies interactive usage when running
opencode mcp addwithout arguments - Adds non-interactive examples for remote (
--url,--header) and local (-- ...) server configuration - Documents supported flags and notes variable substitution for secrets
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | Flag | Description | | ||
| | ---------- | ------------------------------------------------------------------- | | ||
| | `--url` | URL for a remote MCP server. | | ||
| | `--header` | HTTP header for a remote server as `KEY=VALUE`. Repeatable. | | ||
| | `--env` | Environment variable for a local server as `KEY=VALUE`. Repeatable. | |
|
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:
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. |
Issue for this PR
Fixes #32259.
Replaces closed PR #32267.
Type of change
What does this PR do?
Documents the non-interactive
opencode mcp addform.The CLI reference now shows remote and local examples, lists
--url,--header, and--env, and links to variable substitution docs for{env:...}values.How did you verify your code works?
packages/opencode/src/cli/cmd/mcp.tsbunx prettier --check packages/web/src/content/docs/cli.mdxgit diff --checkmcp adddocs sectionScreenshots / recordings
No UI change.
Checklist