Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

mcp: allowing an MCP tool by its documented name hides it; the bare name must be allowed too

Open Beginner friendly
#54,919 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
security, tooling

Research direction

Read packages/core/src/tool.ts around line 231 and packages/core/src/tool/mcp.ts around line 52 to trace the two permission checks. Reproduce with the permissions and opencode run command in the issue, then verify that allowing tutorapi_section_read makes the tool visible and callable. The issue suggests registering MCP tools with the documented permission name.

Written by the indexing model from the issue text.

Description

Description

What we want: an agent that may use only one MCP tool — section_read from the local MCP server tutorapi.

As the docs say — does not work, the agent does not see the tool:

permissions:
  - { action: "*", resource: "*", effect: deny }
  - { action: tutorapi_section_read, resource: "*", effect: allow }

What works — the same tool allowed twice, also by its bare name:

permissions:
  - { action: "*", resource: "*", effect: deny }
  - { action: section_read, resource: "*", effect: allow }
  - { action: tutorapi_section_read, resource: "*", effect: allow }

Why: OpenCode checks the permission twice, under different names:

  • section_read — when it decides whether to show the tool to the agent;
  • tutorapi_section_read — when the agent calls the tool.

Where in the code (v2.0.27):

  • packages/core/src/tool.ts:231 — tool list: whollyDisabled(tool.options?.permission ?? name, rules). MCP tools are registered without options.permission, so the bare name is checked.
  • packages/core/src/tool/mcp.ts:52 — tool call: permission.assert({ action: name(tool.server, tool.name), ... }).
  • Possible fix: register MCP tools with options.permission: name(tool.server, tool.name).
Plugins

opencode-claude (local plugin), openchamber agent-tool

OpenCode version

2.0.25 (the same code is in v2.0.27)

Steps to reproduce
  1. opencode run --agent <agent with the first permissions> --model <model> "List the names of all your tools." — section_read is not listed.
  2. Same with the second permissions — section_read is listed and the call succeeds.
Operating System

Windows 11 (10.0.26200)

Terminal

None, opencode run started from a Node script.

Dominant language
TypeScript
Stars
213k
Forks
28.4k
Avg merge
8h 51m
Merged PRs (30d)
289

Getting set up

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.