Repository navigation
filesystem: add structured startup validation errors - #4056
Shiyao-Huang wants to merge 1 commit into
Conversation
LuuOW
left a comment
There was a problem hiding this comment.
Technical audit: Verified MCP server implementation for consistency with current SDK patterns.
|
Thank you for this pull request, and apologies for the long wait for a response. These servers are reference implementations: they exist to show how each part of MCP is used, not to be general-purpose products, so new features are taken selectively, and this change isn't one the maintainers plan to take. This repository also now accepts issues, not pull requests, from anyone but its maintainers; the policy is in This is not a judgment on the idea or on you. A server in the MCP Registry may well offer it, and anyone is welcome to build on these servers to do so. If you think we've misread it, please open an issue describing the problem and the expected behavior. This is part of the backlog triage in #4875. |
Summary
Fixes #3512 by adding a machine-readable fatal startup validation error for the filesystem server.
When startup fails because no allowed directory is accessible, the server now emits a stable JSON payload on
stderrwith:type: "startup_validation_error"code: "no_accessible_directories"messagerejectedInputs[]containing:inputcheckedPathsreason(inaccessibleornot_directory)The existing fail-closed behavior remains unchanged, and per-path warning output is preserved.
Files Changed
src/filesystem/index.tssrc/filesystem/__tests__/startup-validation.test.tsValidation
Notes
not_directoryfatal case