Skip to content

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

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

docs(cli): document non-interactive mcp add flags#32283
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. |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants