docs(cli): document non-interactive mcp add flags#32283
Open
JSap0914 wants to merge 1 commit into
Open
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.
Contributor
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.
Comment on lines
+255
to
+259
| | 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. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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