You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature: Support MCP Prompt content injection as system message (hidden from user) #23480
When an MCP server delivers content via the Prompts primitive (e.g., user invokes /my-server:my-prompt), OpenCode displays the prompt content directly in the conversation UI as a visible user message. The LLM then echoes/repeats the full content before acting on it.
This breaks the use case of proprietary/confidential prompt delivery, where MCP servers need to send instructions to the LLM without exposing the raw content to the end user.
Expected behavior
MCP Prompt content should be injected as system-level context (invisible to the user in the TUI), similar to how system messages work. The user should only see the LLM's response/actions — not the raw prompt instructions.
Current behavior
User invokes /my-server:my-prompt
OpenCode fetches prompt content from MCP server
Content is displayed verbatim in the conversation UI as a user message
LLM echoes/repeats the instructions before executing them
Proprietary content is fully visible to the user
Why this matters
MCP servers that deliver proprietary skills/instructions (e.g., enterprise toolkits, paid skill libraries) rely on the content being consumed by the LLM without being displayed to the user. The MCP spec distinguishes Prompts from Tools precisely because Prompts are meant to be templates that guide LLM behavior, not user-visible content.
Proposed solution
One or more of the following:
Inject MCP Prompt content as a system message — content reaches the LLM but is not rendered in the TUI
Support the MCP audience annotation — the MCP spec (2025-06-18) defines audience: ["assistant"] on content items, which signals that content is intended for the LLM only, not the user
Add a configuration option — e.g., prompt_content_visibility: "hidden" | "collapsed" | "visible" to let users/servers control visibility
Activity
github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.