62ae7fb51bfbc0e17483b3f944ee59b5f71fcb7f
### 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>
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager (macOS/Linux/Windows).
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Languages
Rust
94.9%
JSON-with-Comments
2.7%
Python
0.8%
Inno Setup
0.3%
Tree-sitter Query
0.3%
Other
0.5%