Convert the everything 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 simple tools to use registerTool() for cleaner code
- Convert simple prompts to use registerPrompt()
- Keep advanced features using server.server.setRequestHandler() for low-level access
- Add type dependencies (@types/jszip, @types/cors)
- Update all transport files to use server.server.connect/close pattern
- Fix type literals to use 'as const' assertions
Tools converted to registerTool():
- echo, add, printEnv, getTinyImage, annotatedMessage, getResourceLinks,
structuredContent, zip
Tools still using setRequestHandler() (need low-level access):
- longRunningOperation (progress tokens)
- sampleLLM (sampling protocol)
- elicitation (elicitation protocol)
- listRoots (client capabilities)
- getResourceReference (strict resource content typing)
All features maintained:
- 13 tools including progress notifications, sampling, elicitation
- 3 prompts (simple, complex, resource)
- 100 paginated resources with templates
- Resource subscriptions
- Completions for prompts and resources
- Roots protocol support
- Logging at various levels
- All three transports (stdio, SSE, streamable HTTP)
The modern API provides:
- Less boilerplate code where applicable
- Better type safety with Zod
- More declarative registration
- Cleaner, more maintainable code
Models are confused about the case of the variables, which results into random validation errors. Keeping them the same helps to remove back and forth.
Adds test coverage for the previously untested git_status function.
The test verifies that the function returns valid git status output
containing branch information.
test files were being compiled into dist during build,
causing issues in docker environments. added exclude
pattern to tsconfig to skip __tests__ directory.
fixes#2928
The test was expecting forward slashes to always be converted to backslashes, but normalizePath() only does this on Windows (process.platform === 'win32'). On Linux/Unix, forward slashes are preserved.
Improved the fix by:
1. Removing relative path assertion from the "as is" test since it doesn't match intent
2. Adding a dedicated test that validates platform-specific behavior naturally without mocking
3. Using the actual platform instead of unreliable Object.defineProperty mocking
This approach is more reliable and clearly documents expected behavior per platform.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The afterEach function was used in the test file but not imported from vitest, causing a build failure. This was introduced in PR #2851.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>