[pull] main from modelcontextprotocol:main#249
Merged
pull[bot] merged 3 commits intothreatcode:mainfrom Nov 20, 2025
Merged
Conversation
* fix(filesystem): convert to modern TypeScript SDK APIs
Convert the filesystem server to use the modern McpServer API instead
of the low-level Server API.
Key changes:
- Replace Server with McpServer from @modelcontextprotocol/sdk/server/mcp.js
- Convert all 13 tools to use registerTool() instead of manual request handlers
- Use Zod schemas directly in inputSchema/outputSchema
- Add structuredContent to all tool responses
- Fix type literals to use 'as const' assertions
- Update roots protocol handling to use server.server.* pattern
- Fix tsconfig to exclude vitest.config.ts
Tools converted:
- read_file (deprecated)
- read_text_file
- read_media_file
- read_multiple_files
- write_file
- edit_file
- create_directory
- list_directory
- list_directory_with_sizes
- directory_tree
- move_file
- search_files
- get_file_info
- list_allowed_directories
The modern API provides:
- Less boilerplate code
- Better type safety with Zod
- More declarative tool registration
- Cleaner, more maintainable code
* fix: use default import for minimatch
minimatch v10+ uses default export instead of named export
* fix(filesystem): use named import for minimatch
The minimatch module doesn't have a default export, so we need to use
the named import syntax instead.
Fixes TypeScript compilation error:
error TS2613: Module has no default export. Did you mean to use
'import { minimatch } from "minimatch"' instead?
* fix(sequential-thinking): convert to modern TypeScript SDK APIs Convert the sequential-thinking server to use the modern McpServer API instead of the low-level Server API. Key changes: - Replace Server with McpServer from @modelcontextprotocol/sdk/server/mcp.js - Use registerTool() method instead of manual request handlers - Use Zod schemas directly in inputSchema/outputSchema - Add structuredContent to tool responses - Fix type literals to use 'as const' assertions The modern API provides: - Less boilerplate code - Better type safety with Zod - More declarative tool registration - Cleaner, more maintainable code * fix: exclude test files from TypeScript build Add exclude for test files and vitest.config.ts to tsconfig * refactor: remove redundant validation now handled by Zod Zod schema already validates all required fields and types. Removed validateThoughtData() method and kept only business logic validation (adjusting totalThoughts if needed). * fix(sequentialthinking): add Zod validation to processThought method The modern API migration removed manual validation from processThought(), but tests call this method directly, bypassing the Zod validation in the tool registration layer. This commit adds Zod validation directly in the processThought() method to ensure validation works both when called via MCP and when called directly (e.g., in tests). Also improves error message formatting to match the expected error messages in the tests. * refactor: simplify by removing redundant validation Since processThought() is only called through the tool registration in production, validation always happens via Zod schemas at that layer. Removed redundant validation logic from processThought() and updated tests to reflect this architectural decision. Changes: - Remove Zod validation from processThought() method - Accept ThoughtData type instead of unknown - Remove 10 validation tests that are now handled at tool registration - Add comment explaining validation approach
* fix(memory): convert to modern TypeScript SDK APIs Convert the memory server to use the modern McpServer API instead of the low-level Server API. Key changes: - Replace Server with McpServer from @modelcontextprotocol/sdk/server/mcp.js - Convert all 9 tools to use registerTool() instead of manual request handlers - Create reusable Zod schemas for Entity and Relation types - Use Zod schemas directly in inputSchema/outputSchema - Add structuredContent to all tool responses - Fix type literals to use 'as const' assertions The modern API provides: - Less boilerplate code (removed ~200 lines of schema definitions) - Better type safety with Zod - More declarative tool registration - Cleaner, more maintainable code * fix: exclude test files from TypeScript build Add exclude for test files and vitest.config.ts to tsconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )