Skip to content

docs(cli): document non-interactive mcp add flags - #32283

Closed
JSap0914 wants to merge 1 commit into
anomalyco:devfrom
JSap0914:mcp-add-flags
Closed

JSap0914 wants to merge 1 commit into
anomalyco:devfrom
JSap0914:mcp-add-flags

Conversation

@JSap0914

Copy link
Copy Markdown

Issue for this PR

Fixes #32259.

Replaces closed PR #32267.

Type of change

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

What does this PR do?

Documents the non-interactive opencode mcp add form.

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?

  • Checked the documented flags against packages/opencode/src/cli/cmd/mcp.ts
  • bunx prettier --check packages/web/src/content/docs/cli.mdx
  • git diff --check
  • tmux readback of the updated mcp add docs section

Screenshots / recordings

No UI change.

Checklist

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

`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.
Copilot AI review requested due to automatic review settings June 14, 2026 08:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 add without 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. |
@github-actions

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

2 participants