Skip to content

Conversation

@mdliss
Copy link
Contributor

@mdliss mdliss commented Nov 26, 2025

Fixes #43165

Problem

MCP prompts were only available in text threads, not agent threads. Users with MCP servers that expose prompts couldn't use them in the main agent panel.

Solution

Added MCP prompt support to agent threads by:

  • Creating ContextServerPromptRegistry to track MCP prompts from context servers
  • Subscribing to context server events to reload prompts when MCP servers start/stop
  • Converting MCP prompts to available commands that appear in the slash command menu
  • Integrating prompt expansion into the agent message flow

Testing

Tested with a custom MCP server exposing explain-code and write-tests prompts. Prompts now appear in the / slash command menu in agent threads.

Release Notes:

  • Added MCP prompt support to agent threads. Prompts from MCP servers now appear in the slash command menu when typing / in agent threads.
Fixes zed-industries#43165

MCP prompts are now available in agent threads, not just text threads.
- Added ContextServerPromptRegistry to track MCP prompts from context servers
- Integrated prompt discovery into agent session initialization
- Prompts appear in slash command menu when typing /
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 26, 2025
@SomeoneToIgnore SomeoneToIgnore added the area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features label Nov 26, 2025
@agu-z agu-z moved this from Community PRs to In progress in Quality Week – December 2025 Dec 15, 2025
@agu-z agu-z force-pushed the add-mcp-prompt-support branch from adea654 to 1e459af Compare December 16, 2025 00:25
@agu-z
Copy link
Contributor

agu-z commented Dec 16, 2025

@mdliss Thank you for the head start on this! I think we can now merge it.

CleanShot.2025-12-16.at.13.09.32.mp4
@agu-z agu-z enabled auto-merge (squash) December 16, 2025 16:30
@agu-z agu-z merged commit 4896f47 into zed-industries:main Dec 16, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Quality Week – December 2025 Dec 16, 2025
HactarCE pushed a commit that referenced this pull request Dec 17, 2025
Fixes #43165

## Problem
MCP prompts were only available in text threads, not agent threads.
Users with MCP servers that expose prompts couldn't use them in the main
agent panel.

## Solution
Added MCP prompt support to agent threads by:
- Creating `ContextServerPromptRegistry` to track MCP prompts from
context servers
- Subscribing to context server events to reload prompts when MCP
servers start/stop
- Converting MCP prompts to available commands that appear in the slash
command menu
- Integrating prompt expansion into the agent message flow

## Testing
Tested with a custom MCP server exposing `explain-code` and
`write-tests` prompts. Prompts now appear in the `/` slash command menu
in agent threads.

Release Notes:

- Added MCP prompt support to agent threads. Prompts from MCP servers
now appear in the slash command menu when typing `/` in agent threads.

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
Fixes zed-industries#43165

## Problem
MCP prompts were only available in text threads, not agent threads.
Users with MCP servers that expose prompts couldn't use them in the main
agent panel.

## Solution
Added MCP prompt support to agent threads by:
- Creating `ContextServerPromptRegistry` to track MCP prompts from
context servers
- Subscribing to context server events to reload prompts when MCP
servers start/stop
- Converting MCP prompts to available commands that appear in the slash
command menu
- Integrating prompt expansion into the agent message flow

## Testing
Tested with a custom MCP server exposing `explain-code` and
`write-tests` prompts. Prompts now appear in the `/` slash command menu
in agent threads.

Release Notes:

- Added MCP prompt support to agent threads. Prompts from MCP servers
now appear in the slash command menu when typing `/` in agent threads.

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
Fixes zed-industries#43165

## Problem
MCP prompts were only available in text threads, not agent threads.
Users with MCP servers that expose prompts couldn't use them in the main
agent panel.

## Solution
Added MCP prompt support to agent threads by:
- Creating `ContextServerPromptRegistry` to track MCP prompts from
context servers
- Subscribing to context server events to reload prompts when MCP
servers start/stop
- Converting MCP prompts to available commands that appear in the slash
command menu
- Integrating prompt expansion into the agent message flow

## Testing
Tested with a custom MCP server exposing `explain-code` and
`write-tests` prompts. Prompts now appear in the `/` slash command menu
in agent threads.

Release Notes:

- Added MCP prompt support to agent threads. Prompts from MCP servers
now appear in the slash command menu when typing `/` in agent threads.

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

3 participants