context-servers.md

 1# Context Servers
 2
 3Context servers are a mechanism for pulling context into the Assistant from an external source. They are powered by the [Model Context Protocol](./model-context-protocol.md).
 4
 5Currently Zed supports context servers providing [slash commands](./commands.md) for use in the Assistant.
 6
 7## Installation
 8
 9Context servers can be installed via [extensions](../extensions/context-servers.md).
10
11If you don't already have a context server, check out one of these:
12
13- [Postgres Context Server](https://github.com/zed-extensions/postgres-context-server)
14
15## Configuration
16
17Context servers may require some configuration in order to run or to change their behavior.
18
19You can configure each context server using the `context_servers` setting in your `settings.json`:
20
21```json
22{
23  "context_servers": {
24    "postgres-context-server": {
25      "settings": {
26        "database_url": "postgresql://postgres@localhost/my_database"
27      }
28    }
29  }
30}
31```
32
33If desired, you may also provide a custom command to execute a context server:
34
35```json
36{
37  "context_servers": {
38    "my-context-server": {
39      "command": {
40        "path": "/path/to/my-context-server",
41        "args": ["run"],
42        "env": {}
43      },
44      "settings": {
45        "enable_something": true
46      }
47    }
48  }
49}
50```