GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [FEATURE]: Allow to enable MCP on a per-agent basis · Issue #5373 · anomalyco/opencode

[FEATURE]: Allow to enable MCP on a per-agent basis #5373

New issue
Copy link
New issue
Copy link
Closed
Closed
[FEATURE]: Allow to enable MCP on a per-agent basis#5373
Copy link
Assignees
rekram1-node
Labels
discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Description

@lcswillems
lcswillems
opened on Dec 11, 2025
Issue body actions

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I'm using Playwright MCP server. I'd like this MCP server to only appear in the context of my scrap agent (and only be usable by my scrap agent too).

I can enable / disable a MCP server globally but I can't enable / disable a MCP server on a per-agent basis.

By default, I'd like the playwright MCP server to be disabled for all my agents (i.e. the MCP server is not in the context at all), and then for my agent scrap, I'd like to enable the playwright MCP server.

I know that there is a "tools" setting globally and per-agent, but this won't disable the MCP server meaning that even though the agent can't use it, it still appears in the context.

Reacted by Sachnun, Alice Alexandra Moore, Ivan Glushko, Chang Liu and Nacer Laradji

Activity

  1. lcswillems
    added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Dec 11, 2025
  2. github-actions commented on Dec 11, 2025

    @github-actions
    github-actionsBot
    on Dec 11, 2025 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • How to enable/disable mcp server per project #5013: How to enable/disable mcp server per project (similar per-project/per-context MCP configuration request)

    Feel free to ignore if none of these address your specific case.

  3. SamirSaidani commented on Dec 11, 2025

    @SamirSaidani
    SamirSaidani
    on Dec 11, 2025
    More actions

    https://opencode.ai/docs/mcp-servers/#per-agent
    Is it helpful ?

  4. rekram1-node commented on Dec 12, 2025

    @rekram1-node
    rekram1-node
    on Dec 12, 2025
    Member
    More actions

    I know that there is a "tools" setting globally and per-agent, but this won't disable the MCP server meaning that even though the agent can't use it, it still appears in the context.

    Uh that's not true

    If the tool is disabled it will NOT appear in context

    Reacted by Ivan Glushko
  5. rekram1-node
    self-assigned this
    on Dec 12, 2025
  6. paralin commented on Dec 12, 2025

    @paralin
    paralin
    on Dec 12, 2025
    Contributor
    More actions

    #5339

  7. lcswillems commented on Dec 12, 2025

    @lcswillems
    lcswillems
    on Dec 12, 2025
    Author
    More actions

    @paralin How is your PR addressing the issue? It seems the flag is just equivalent to setting the tools in the config, no? Doesn't seem to address the concern with the config. And personally, I would prefer config over flags.

  8. lcswillems commented on Dec 12, 2025

    @lcswillems
    lcswillems
    on Dec 12, 2025
    Author
    More actions

    @rekram1-node I missed your message. When I turn the playwright tools off, the context size reported by OpenCode doesn't decrease. It is only when I disable the MCP that it decreases.

  9. lcswillems commented on Dec 12, 2025

    @lcswillems
    lcswillems
    on Dec 12, 2025
    Author
    More actions

    @rekram1-node I've just tried again:

    If I add the playwright MCP in the global config with "enabled": false, then I can't enable the Playwright tools in my local project. So only way is to enable the playwright MCP in my global config, but now if I disable the tools, the MCP server still gets loaded in the context...

    Or maybe I'm misunderstanding something.

  10. lcswillems commented on Dec 12, 2025

    @lcswillems
    lcswillems
    on Dec 12, 2025
    Author
    More actions

    @rekram1-node Another option would be:

    Allow me to set the Playwright MCP server in the global config with enabled: false. And then in my local configs, allow me to set it to enabled: true. (without having to set the other fields type and command)

  11. rekram1-node commented on Dec 13, 2025

    @rekram1-node
    rekram1-node
    on Dec 13, 2025
    Member
    More actions

    Allow me to set the Playwright MCP server in the global config with enabled: false. And then in my local configs, allow me to set it to enabled: true. (without having to set the other fields type and command)

    If this is all you are asking for we have a separate issue tracking this and itll be added soon

  12. lcswillems commented on Dec 13, 2025

    @lcswillems
    lcswillems
    on Dec 13, 2025
    Author
    More actions

    @rekram1-node Do you have the link of this other issue? So I could confirm whether it is the same? 🙏

  13. rekram1-node commented on Dec 17, 2025

    @rekram1-node
    rekram1-node
    on Dec 17, 2025
    Member
    More actions

    Issue:
    #4525

    there is an Open PR for it that should be merged soon

  14. eXamadeus commented on Dec 31, 2025

    @eXamadeus
    eXamadeus
    on Dec 31, 2025
    Contributor
    More actions

    Check out #6306. This is a configuration issue. It works, you just need wildcards.

  15. rekram1-node
    closed this as completedon Dec 31, 2025
  16. ajhochy
    added a commit that references this issue on Jun 26, 2026

    feat(opencode-fork): per-session mcpAllowlist tool-schema gate [mcp-s…

    3b9c26a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.