Scope and lifecycle
Project vs. global MCP config, connect/disconnect lifecycle, and why "connected" isn't proof a server works.
Every MCP server you add lives at one of two scopes, which determines who else sees it and where its configuration is stored.
Scope
| Scope | Where it's written | Use it for |
|---|---|---|
| Project | The repo's own OpenCode config | Tools that belong to, or should be shared with, this project |
| Global | Your user-level OpenCode config | Personal tools you want available in every project |
Lifecycle
Each server, per scope, supports: connect, disconnect, sign-in, sign-out, and permanent removal.
What reaches the agent
Once connected, the agent gets the server's tools, plus its own instructions, its resources, and its resource templates: all of it, not just the tool list.
Connected is not the same as working
A server reporting "connected" only means the handshake succeeded. It is not proof that the server's tools actually do anything useful, or anything at all. If a server's behavior matters for what you're about to do, invoke one of its tools and check the result before relying on it.