MCP: invalid location of mcp when used --global

Open Beginner friendly
#49,904 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
cli

Research direction

Start by reproducing MCP addition with the --global flag on Windows 11 using Git Bash, then trace the command's configuration handling around opencode.json. Verify that the server is written under the top-level "mcp" field rather than "mcp"."servers", and add or update coverage if the relevant test entry point is found.

Written by the indexing model from the issue text.

Description

Description

when we use --global flag while adding mcp it gets added to "mcp"."servers" instead just "mcp" field in opencode.json

Plugins

No response

OpenCode version

2.0.8

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

windows 11

Terminal

Git bash

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 20m
Merged PRs (30d)
358

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anomalyco/opencode

All issues in anomalyco/opencode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.