docs: Fix links in context-servers documentation (#16538)

Release Notes:

- N/A
This commit is contained in:
jvmncs 2024-08-20 14:16:51 -04:00 committed by GitHub
parent 8381b06d2d
commit 85731dfe8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 9 deletions

View File

@ -39,6 +39,8 @@
- [Inline Assistant](./assistant/inline-assistant.md) - [Inline Assistant](./assistant/inline-assistant.md)
- [Commands](./assistant/commands.md) - [Commands](./assistant/commands.md)
- [Prompts](./assistant/prompting.md) - [Prompts](./assistant/prompting.md)
- [Context Servers](./assistant/context-servers.md)
- [Model Context Protocol](./assistant/model-context-protocol.md)
# Extensions # Extensions

View File

@ -16,6 +16,6 @@ This section covers various aspects of the Assistant:
- [Prompting & Prompt Library](./prompting.md): Learn how to write and save prompts, how to use the Prompt Library, and how to edit prompt templates. - [Prompting & Prompt Library](./prompting.md): Learn how to write and save prompts, how to use the Prompt Library, and how to edit prompt templates.
- [Context Servers](./context_servers.md): Learn how to add custom slash commands implemented in external codebases with the Context Server Protocol. - [Context Servers](./context-servers.md): Learn how to add custom slash commands implemented in external codebases with the Context Server Protocol.
- [Model Context Protocol](./model_context_protocol.md): Read the full specification of the Model Context Protocol that Context Servers follow to interface with the Assistant. - [Model Context Protocol](./model-context-protocol.md): Read the full specification of the Model Context Protocol that Context Servers follow to interface with the Assistant.

View File

@ -26,9 +26,17 @@ To configure Zed to use a Context Server, add the command required to start the
A Context Server is a server listening for JSON-RPC requests over stdin/stdout. The server must follow the Model Context Protocol (defined below) in order to declare its capabilities such that Zed can make use of them. A Context Server is a server listening for JSON-RPC requests over stdin/stdout. The server must follow the Model Context Protocol (defined below) in order to declare its capabilities such that Zed can make use of them.
### Implementing a Context Server
Context Servers are JSON-RPC servers communicating over stdio. Context Servers must comply with the [Model Context Protocol (MCP)](./model_context_protocol).
See [python-context-server](https://github.com/zed-industries/python-context-server) for a minimal working example.
Currently, Zed's client only implements a subset of the protocol required to support custom prompt insertions and manipulations. This is likely to be expanded in the future.
### Should you write a Context Server? ### Should you write a Context Server?
[Extensions](./extensions.md) are also capable of adding slash commands to the Assistant. [Extensions](../extensions.md) are also capable of [adding slash commands to the Assistant](../extensions/slash-commands.md).
If your slash commands are already implemented in a language other than Rust, wrapping them in a Context Server implementation will likely be the fastest way to plug them into Zed. If your slash commands are already implemented in a language other than Rust, wrapping them in a Context Server implementation will likely be the fastest way to plug them into Zed.
@ -37,9 +45,3 @@ An Extension should be preferred when:
- Your slash commands are implemented in WebAssembly-compatible Rust - Your slash commands are implemented in WebAssembly-compatible Rust
- You want Zed to manage distribution of your slash commands - You want Zed to manage distribution of your slash commands
- You want to publish your slash commands - You want to publish your slash commands
### Implementing a Context Server
Context Servers must comply with the [Model Context Protocol (MCP)](./model_context_protocol). See [python-context-server](https://github.com/zed-industries/python-context-server) for a minimal working example.
Currently, Zed's client only implements the subset of the protocol required to support custom prompt insertions and manipulations, although this is likely to be extended in the future.