Skip to content

feat: top level tool config - #2008

Merged
thdxr merged 1 commit into
anomalyco:devfrom
rekram1-node:top-level-tool-cfg
Aug 17, 2025
Merged

thdxr merged 1 commit into
anomalyco:devfrom
rekram1-node:top-level-tool-cfg

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Aug 17, 2025 •

Copy link
Copy Markdown
Collaborator

I've heard the following a few times: "I want to enable an mcp server only for a particular agent"

currently it is kinda messy to disable a tool for each agent, then only not disable for one, having a top level configuration option can allow someone to disable an mcp server by default and only enable for the particular agent they want.

This follows existing pattern that permissions uses

note

if this isn't wanted feel free to close, ik there was talk of combining tools + permissions

@rekram1-node
rekram1-node requested a review from thdxr August 17, 2025 02:45
@thdxr
thdxr merged commit daea79c into anomalyco:dev Aug 17, 2025
@arsham

arsham commented Aug 19, 2025

Copy link
Copy Markdown

Can you provide an example please? I am trying to test this feature but I can't figure out how to use it. I am currently using v0.5.6 so it should be implemented in this version. Here is my setup:

  "mcp": {
    "context7": {
      "type": "local",
      "enabled": false,
      "command": ["npx", "-y", "@upstash/context7-mcp"]
    }
  }

And the sample agent:

---
description: >-
  Use this agent when you need to call a tool.
tools:
  context7: true
---

When asked to access a tool, just check if you can call it. When asked to
access a MCP server, try to interact with it. Do not read from files to
determine what is exposed to you, just use your tools.

I can confirm that removing the "enabled" flag would let the agent access the tool.

@rekram1-node

Copy link
Copy Markdown
Collaborator Author

@arsham so basically:

  • enabled flag in mcp config means is the mcp server able to be ran at all (not even agent specific it is almost like opencode will ignore the mcp server if it isnt enabled)
  • so you will want to remove the enabled flag there or set it to true either works
  • then set “tools”: { “context7*”: false} << this will disable all context7 tools by default << dont set this within mcp config this is a “top level” option
  • then on a per agent basis you can enable context7*: true

Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
simonklee added a commit that referenced this pull request Nov 12, 2026
Brings borrowed Markdown reads (#2005), one keymap view per key (#2008), allocation-free Markdown lines and code blocks (#2006), exact layout for culled ScrollBox content (#2003), zeroed hidden Yoga nodes (#2009), ordered tree-sitter edits (#2002), syntax::prewarm (#2007) and notification text kept inside its OSC (#1998). The header hash changes to 0x3afe582f1647625d, so native artifacts must be rebuilt. No client code changes. #817's super+backspace binding reaches the prompt (OT817), and #1998 changes OSC 9 for text that starts with a digit and for ConEmu (OT1998).
simonklee added a commit that referenced this pull request Nov 12, 2026
Brings borrowed Markdown reads (#2005), one keymap view per key (#2008), allocation-free Markdown lines and code blocks (#2006), exact layout for culled ScrollBox content (#2003), zeroed hidden Yoga nodes (#2009), ordered tree-sitter edits (#2002), syntax::prewarm (#2007) and notification text kept inside its OSC (#1998). The header hash changes to 0x3afe582f1647625d, so native artifacts must be rebuilt. No client code changes. #817's super+backspace binding reaches the prompt (OT817), and #1998 changes OSC 9 for text that starts with a digit and for ConEmu (OT1998).
simonklee added a commit that referenced this pull request Nov 12, 2026
Brings borrowed Markdown reads (#2005), one keymap view per key (#2008), allocation-free Markdown lines and code blocks (#2006), exact layout for culled ScrollBox content (#2003), zeroed hidden Yoga nodes (#2009), ordered tree-sitter edits (#2002), syntax::prewarm (#2007) and notification text kept inside its OSC (#1998). The header hash changes to 0x3afe582f1647625d, so native artifacts must be rebuilt. No client code changes. #817's super+backspace binding reaches the prompt (OT817), and #1998 changes OSC 9 for text that starts with a digit and for ConEmu (OT1998).
simonklee added a commit that referenced this pull request Nov 12, 2026
Brings borrowed Markdown reads (#2005), one keymap view per key (#2008), allocation-free Markdown lines and code blocks (#2006), exact layout for culled ScrollBox content (#2003), zeroed hidden Yoga nodes (#2009), ordered tree-sitter edits (#2002), syntax::prewarm (#2007) and notification text kept inside its OSC (#1998). The header hash changes to 0x3afe582f1647625d, so native artifacts must be rebuilt. No client code changes. #817's super+backspace binding reaches the prompt (OT817), and #1998 changes OSC 9 for text that starts with a digit and for ConEmu (OT1998).
simonklee added a commit that referenced this pull request Nov 13, 2026
Brings borrowed Markdown reads (#2005), one keymap view per key (#2008), allocation-free Markdown lines and code blocks (#2006), exact layout for culled ScrollBox content (#2003), zeroed hidden Yoga nodes (#2009), ordered tree-sitter edits (#2002), syntax::prewarm (#2007) and notification text kept inside its OSC (#1998). The header hash changes to 0x3afe582f1647625d, so native artifacts must be rebuilt. No client code changes. #817's super+backspace binding reaches the prompt (OT817), and #1998 changes OSC 9 for text that starts with a digit and for ConEmu (OT1998).
simonklee added a commit that referenced this pull request Nov 13, 2026
Brings borrowed Markdown reads (#2005), one keymap view per key (#2008), allocation-free Markdown lines and code blocks (#2006), exact layout for culled ScrollBox content (#2003), zeroed hidden Yoga nodes (#2009), ordered tree-sitter edits (#2002), syntax::prewarm (#2007) and notification text kept inside its OSC (#1998). The header hash changes to 0x3afe582f1647625d, so native artifacts must be rebuilt. No client code changes. #817's super+backspace binding reaches the prompt (OT817), and #1998 changes OSC 9 for text that starts with a digit and for ConEmu (OT1998).
simonklee added a commit that referenced this pull request Nov 14, 2026
Brings borrowed Markdown reads (#2005), one keymap view per key (#2008), allocation-free Markdown lines and code blocks (#2006), exact layout for culled ScrollBox content (#2003), zeroed hidden Yoga nodes (#2009), ordered tree-sitter edits (#2002), syntax::prewarm (#2007) and notification text kept inside its OSC (#1998). The header hash changes to 0x3afe582f1647625d, so native artifacts must be rebuilt. No client code changes. #817's super+backspace binding reaches the prompt (OT817), and #1998 changes OSC 9 for text that starts with a digit and for ConEmu (OT1998).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants