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 server initialization instructions are discarded and not incorporated into LLM context · Issue #32856 · anomalyco/opencode

MCP server initialization instructions are discarded and not incorporated into LLM context #32856

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
MCP server initialization instructions are discarded and not incorporated into LLM context#32856
Copy link
Assignees
rekram1-node

Description

@bryant-eastham
bryant-eastham
opened on Jun 18, 2026
Issue body actions

Summary

OpenCode calls Initialize() on MCP servers but discards the InitializeResult, including the Instructions field defined by the MCP protocol. Server-level instructions are never incorporated into the system prompt or LLM context.

Details

The MCP protocol specifies an Instructions field on InitializeResult (mcp-go v0.17.0 mcp/types.go line 292):

// Instructions describing how to use the server and its features.
// This can be used by clients to improve the LLM understanding of
// available tools, resources, etc. It can be thought of like a "hint" to the model.
// For example, this information MAY be added to the system prompt.
Instructions string `json:"instructions,omitempty"`

However, in internal/llm/agent/mcp-tools.go, the InitializeResult is discarded at both call sites:

  • Line 57 (tool invocation path): _, err := c.Initialize(ctx, initRequest)
  • Line 151 (tool discovery path): _, err := c.Initialize(ctx, initRequest)

The system prompt is built in internal/llm/prompt/prompt.go (GetAgentPrompt, line 15) from hardcoded templates and project context files only. No MCP server data is injected.

Impact

MCP servers that rely on the protocol's Instructions field to provide usage guidance to the LLM have no effect. Server authors must work around this by exposing instructions through tool calls instead, which requires the LLM to know to call a specific tool — defeating the purpose of server-level instructions.

Expected behavior

The InitializeResult.Instructions field from each MCP server should be read during initialization and incorporated into the LLM context (e.g., appended to the system prompt or injected as context alongside tool definitions), as the MCP protocol intends.

Activity

  1. github-actions
    assigned
    rekram1-node
    on Jun 18, 2026
  2. github-actions commented on Jun 18, 2026

    @github-actions
    github-actionsBot
    on Jun 18, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • [FEATURE]: Full MCP client capabilities #28567: This comprehensive MCP client capabilities tracking issue explicitly lists InitializeResult.instructions as a missing/unimplemented feature (see the [^instructions] footnote in that issue).
  3. bryant-eastham commented on Jun 18, 2026

    @bryant-eastham
    bryant-eastham
    on Jun 18, 2026
    Author
    More actions

    Opencode generated this for me, and didn't check for duplicates. Already a PR in the queue as well.

  4. bryant-eastham
    closed this as a duplicateof [FEATURE]: Full MCP client capabilities #28567 on Jun 18, 2026
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

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.