zed/assets
John D. Swanson 62ae7fb51b
Add global and HTTP context server timeout settings (#45378)
### Closes 
- Maybe https://github.com/zed-industries/zed/issues/38252 (there might
be something going on with NPX too)
- Also addresses
https://github.com/zed-industries/zed/pull/39021#issuecomment-3644818347



### Why
Some more involved MCP servers timeout often, especially on first setup.
I got tired of having to set timeouts manually per server. I also
noticed a timeout could not be set for http context servers, which
causes Context7 or GitHub's remote servers to timeout at 60s sometimes.

### Overview

MCP Timeout Configuration Feature

This PR adds additional configurable timeout settings for Model Context
Protocol servers including a global timeout and the addition of timeouts
for http servers, addressing issues where servers were timing out after
a fixed 60 seconds regardless of user needs.

**Key Features:**
- **Global timeout setting** (`context_server_timeout`) - default
timeout for all MCP servers (default: 60s, max: 10min)
- **Per-server timeout overrides** - individual servers can specify
custom timeouts via `timeout` field
- **Precedence hierarchy** - per-server timeout > global timeout >
default (60s)
- **Automatic bounds checking** - enforces 10-minute maximum to prevent
resource exhaustion
- **Support for both transports** - works with stdio and HTTP-based
context servers
- **Comprehensive test coverage** - 3 new tests validating global,
override, and stdio timeout behavior
- **Full backward compatibility** - existing configurations work
unchanged with sensible defaults


### Release Notes:

- Added the ability to configure timeouts for context server tool calls.
The new global `context_server_timeout` setting controls the default
timeout (default is 60s, max: 10min). Additionally, per-server timeouts
can be configured using the `timeout` field within servers defined in
the `"context_servers" setting

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-01-05 13:45:22 -05:00
..
badge Adjust Zed badge (#35294) 2025-07-29 15:09:31 -04:00
fonts Use IBM Plex Sans / Lilex (#36084) 2025-08-13 13:25:52 -06:00
icons Add adjustments to agent v2 pane changes (#44885) 2025-12-15 13:02:01 -03:00
images Add onboarding banner for claude code support (#37443) 2025-09-03 10:59:14 +00:00
keymaps keymap_editor: Allow to open the keymap.json with a keybinding (#45987) 2026-01-04 17:54:25 +00:00
prompts A couple new inline assistant tests (#45049) 2025-12-17 13:02:03 -08:00
settings Add global and HTTP context server timeout settings (#45378) 2026-01-05 13:45:22 -05:00
sounds call: Play a different sound when a guest joins (#38987) 2025-09-27 09:20:55 -04:00
themes Terminal ANSI colors (#44912) 2025-12-15 15:37:00 -06:00