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 — MCP tool permissions not working after migration from tools to permissions · Issue #6892 · anomalyco/opencode

MCP tool permissions not working after migration from tools to permissions #6892

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
MCP tool permissions not working after migration from tools to permissions#6892
Copy link
Assignees
thdxr

Description

@Hipfox
Hipfox
opened on Jan 5, 2026
Issue body actions

Description

After the major change that merged tools into permissions, MCP tool permissions can no longer be controlled using the permissions configuration. The legacy tools configuration still works, but the new permissions configuration does not apply to MCP tools.

Working configuration (legacy tools field)

{  
  "$schema": "https://opencode.ai/config.json",  
  "mcp": {  
    "my-mcp": {  
      "type": "local",  
      "command": ["bun", "x", "my-mcp-command"],  
      "enabled": true  
    }  
  },  
  "tools": {  
    "my-mcp*": false  
  },  
  "agent": {  
    "my-agent": {  
      "tools": {  
        "my-mcp*": true  
      }  
    }  
  }  
}

Non-working configuration (new permissions field)

permissions:  
  "my-mcp*": allow

The permissions configuration should control MCP tools the same way the tools configuration did, but it appears that MCP tool patterns are not being properly evaluated in the new permissions system.

Expected Behavior
MCP tools should be controllable using the permissions field with glob patterns like "my-mcp*": allow or "my-mcp*": deny, just as they were with the tools field.

Context
This issue appears to be related to the permissions system overhaul that merged tools into permissions. The migration logic in packages/opencode/src/config/config.ts shows that legacy tools config should be converted to permission config, and the Permission schema includes a catchall pattern that should support arbitrary tool permissions.

However, it seems that MCP tool permissions are not being properly applied when using the new permissions configuration format.

Notes
The documentation shows examples of controlling MCP tools using the tools configuration mcp-servers.mdx, but there are no examples showing how to control MCP tools using the new permissions configuration. This suggests either a documentation gap or an implementation bug.

Wiki pages you might want to explore: https://opencode.ai/docs/mcp-servers/#per-agent

Plugins

No response

OpenCode version

v1.1.1

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. Hipfox
    added
    bugSomething isn't working
    on Jan 5, 2026
  2. github-actions
    assigned
    thdxr
    on Jan 5, 2026
  3. github-actions
    added
    docs
    on Jan 5, 2026
  4. Hipfox commented on Jan 6, 2026

    @Hipfox
    Hipfox
    on Jan 6, 2026
    Author
    More actions

    Update: I just discovered that the issue might be caused by a typo in the field name. I tested it again using permission (singular) instead of permissions (plural), and it worked!
    With this correction, I can now successfully enable an MCP tool (which was globally disabled in opencode.json) within the YAML frontmatter of a specific agent markdown file like this:

    permission:  
      "my-mcp*": allow
    

    It seems the system expects the singular form permission in the frontmatter. Has anyone else encountered this, or is this the intended behavior?

    opencode v1.1.3

  5. einarpersson commented on Jan 10, 2026

    @einarpersson
    einarpersson
    on Jan 10, 2026
    More actions

    Yes! I was also confused by this. I used to have permissions and now it seems to be permission?

    sounds like a bug to me

  6. github-actions commented on Mar 25, 2026

    @github-actions
    github-actionsBot
    on Mar 25, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  7. marcusquinn
    added 2 commits that reference this issue on Apr 11, 2026

    GH#18285: add shopify-dev-mcp agent, fix MCP audit gaps, add permissi…

    6b305af

    GH#18285: add shopify-dev-mcp agent, fix MCP audit gaps, add permissi…

    55f5bd2
  8. kagura-chen
    added a commit that references this issue on Apr 17, 2026

    fix(tool): use relative path for read permission patterns

    3edbdd1
  9. thdxr
    removed
    bugSomething isn't working
    docs
    on May 3, 2026
  10. sapient-engineer commented on May 12, 2026

    @sapient-engineer
    sapient-engineer
    on May 12, 2026
    More actions

    Same, the docs seem to be outdated and I cannot seem to get per agent MCP tool or skill permissions to work. The global settings in the config seem to overwrite everything and the usual last matching rule wins mentioned in the docs appears to be broken.

  11. rekram1-node
    closed this as not plannedon May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @thdxr
    thdxr

Labels

No labels
No labels

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.