[PR #35] [CLOSED] feat: implement MCP prompts support #9513

Closed
opened 2026-02-16 18:13:41 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/35
Author: @ezynda3
Created: 5/18/2025
Status: Closed

Base: devHead: handle-mcp-prompts


📝 Commits (6)

  • e12526c Add prompts from MCP servers as commands
  • e2eb958 Parse messages returned from prompt request correctly
  • 054b882 feat: implement MCP prompts support
  • a5aed60 chore: update mark3labs/mcp-go to latest version
  • aad4791 refactor: reuse MCP client for tools and prompts
  • e0bbacb Merge branch 'dev' into handle-mcp-prompts

📊 Changes

10 files changed (+522 additions, -62 deletions)

View changed files

📝 go.mod (+3 -5)
📝 go.sum (+2 -0)
internal/llm/agent/mcp-common.go (+199 -0)
internal/llm/agent/mcp-prompts.go (+21 -0)
📝 internal/llm/agent/mcp-tools.go (+2 -36)
internal/tui/components/dialog/argument.go (+15 -0)
📝 internal/tui/components/dialog/arguments.go (+2 -0)
internal/tui/components/dialog/mcp_prompt.go (+11 -0)
📝 internal/tui/page/chat.go (+90 -0)
📝 internal/tui/tui.go (+177 -21)

📄 Description

Summary

  • Adds support for Model Context Protocol (MCP) prompts, which enable servers to define reusable prompt templates and workflows that clients can easily surface to users and LLMs. They provide a powerful way to standardize and share common LLM interactions.
  • Implements fetching prompts from MCP servers, registering them as commands, and handling structured responses with resources.

Test plan

  • Verify MCP prompts appear in the command list
  • Test executing prompts with and without arguments
  • Verify structured responses with resources are properly displayed

🤖 Generated with opencode


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/35 **Author:** [@ezynda3](https://github.com/ezynda3) **Created:** 5/18/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `handle-mcp-prompts` --- ### 📝 Commits (6) - [`e12526c`](https://github.com/anomalyco/opencode/commit/e12526c5d4c89909acd2ff81c852cd78771d873e) Add prompts from MCP servers as commands - [`e2eb958`](https://github.com/anomalyco/opencode/commit/e2eb9584532edd683833d67bef712430c0f649d9) Parse messages returned from prompt request correctly - [`054b882`](https://github.com/anomalyco/opencode/commit/054b8827b486aa921fae5c22d9f42dbfad24f3a9) feat: implement MCP prompts support - [`a5aed60`](https://github.com/anomalyco/opencode/commit/a5aed606907cb9b67ab21f49960b0e2e5d9fc820) chore: update mark3labs/mcp-go to latest version - [`aad4791`](https://github.com/anomalyco/opencode/commit/aad4791c3656b164a7a34e5653d2aa41d22caf49) refactor: reuse MCP client for tools and prompts - [`e0bbacb`](https://github.com/anomalyco/opencode/commit/e0bbacbf45bea51559635c1695e0ce13313887da) Merge branch 'dev' into handle-mcp-prompts ### 📊 Changes **10 files changed** (+522 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+3 -5) 📝 `go.sum` (+2 -0) ➕ `internal/llm/agent/mcp-common.go` (+199 -0) ➕ `internal/llm/agent/mcp-prompts.go` (+21 -0) 📝 `internal/llm/agent/mcp-tools.go` (+2 -36) ➕ `internal/tui/components/dialog/argument.go` (+15 -0) 📝 `internal/tui/components/dialog/arguments.go` (+2 -0) ➕ `internal/tui/components/dialog/mcp_prompt.go` (+11 -0) 📝 `internal/tui/page/chat.go` (+90 -0) 📝 `internal/tui/tui.go` (+177 -21) </details> ### 📄 Description ## Summary - Adds support for Model Context Protocol (MCP) prompts, which enable servers to define reusable prompt templates and workflows that clients can easily surface to users and LLMs. They provide a powerful way to standardize and share common LLM interactions. - Implements fetching prompts from MCP servers, registering them as commands, and handling structured responses with resources. ## Test plan - Verify MCP prompts appear in the command list - Test executing prompts with and without arguments - Verify structured responses with resources are properly displayed 🤖 Generated with opencode --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:41 -05:00
yindo closed this issue 2026-02-16 18:13:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9513