fix(hooks): migrate MCP server from deprecated Server to McpServer #150

Merged
jack merged 7 commits from fix/140-mcp-server-deprecated-api into main 2026-01-24 17:10:01 +00:00
Owner

Summary

Migrate from the deprecated Server class to the new McpServer API from the MCP TypeScript SDK.

Changes:

  • Import McpServer from @modelcontextprotocol/sdk/server/mcp.js instead of Server from /server/index.js
  • Use server.tool() for direct tool registration with handlers
  • Remove unused schema imports (CallToolRequestSchema, ListToolsRequestSchema)

Benefits:

  • Resolves TS6385 deprecation warning
  • Simpler API - server.tool() handles both ListTools and CallTool automatically
  • Reduced code from 222 to 172 lines (-50 lines, -23%)

Closes #140

## Summary Migrate from the deprecated `Server` class to the new `McpServer` API from the MCP TypeScript SDK. ### Changes: - Import `McpServer` from `@modelcontextprotocol/sdk/server/mcp.js` instead of `Server` from `/server/index.js` - Use `server.tool()` for direct tool registration with handlers - Remove unused schema imports (`CallToolRequestSchema`, `ListToolsRequestSchema`) ### Benefits: - Resolves TS6385 deprecation warning - Simpler API - `server.tool()` handles both ListTools and CallTool automatically - Reduced code from 222 to 172 lines (-50 lines, -23%) Closes #140
fix(hooks): migrate MCP server from deprecated Server to McpServer
Some checks failed
CI / check (pull_request) Successful in 0s
CI / build (pull_request) Failing after 29s
CI / validate-plugin (pull_request) Has been skipped
5ec10f6eab
Migrate from the deprecated `Server` class to the new `McpServer` API:
- Import `McpServer` from `@modelcontextprotocol/sdk/server/mcp.js`
- Use `server.tool()` for direct tool registration with handlers
- Remove unused schema imports (CallToolRequestSchema, ListToolsRequestSchema)

The new API is simpler and automatically handles ListTools and CallTool
requests when tools are registered via `server.tool()`.

Reduces mcp-entry.ts from 222 to 172 lines (-50 lines, -23%).

Closes #140

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jonas.hanisch force-pushed fix/140-mcp-server-deprecated-api from 5ec10f6eab
Some checks failed
CI / check (pull_request) Successful in 0s
CI / build (pull_request) Failing after 29s
CI / validate-plugin (pull_request) Has been skipped
to 09c286303d
Some checks failed
CI / check (pull_request) Successful in 1s
CI / build (pull_request) Failing after 56s
CI / validate-plugin (pull_request) Has been skipped
2026-01-24 10:41:16 +00:00
Compare
jonas.hanisch force-pushed fix/140-mcp-server-deprecated-api from 09c286303d
Some checks failed
CI / check (pull_request) Successful in 1s
CI / build (pull_request) Failing after 56s
CI / validate-plugin (pull_request) Has been skipped
to f22ebd4e6c
Some checks failed
CI / build (pull_request) Failing after 27s
2026-01-24 16:51:15 +00:00
Compare
jonas.hanisch force-pushed fix/140-mcp-server-deprecated-api from f22ebd4e6c
Some checks failed
CI / build (pull_request) Failing after 27s
to 6c3f6eff4c
All checks were successful
CI / build (pull_request) Successful in 41s
2026-01-24 16:54:51 +00:00
Compare
Merge branch 'main' into fix/140-mcp-server-deprecated-api
All checks were successful
CI / build (pull_request) Successful in 1m12s
24c2c0952f
Merge branch 'main' into fix/140-mcp-server-deprecated-api
All checks were successful
CI / build (pull_request) Successful in 1m14s
74d28ff37f
Merge branch 'main' into fix/140-mcp-server-deprecated-api
All checks were successful
CI / build (pull_request) Successful in 1m14s
3c493a603d
Merge branch 'main' into fix/140-mcp-server-deprecated-api
All checks were successful
CI / build (pull_request) Successful in 46s
ae43249afd
Merge branch 'main' into fix/140-mcp-server-deprecated-api
All checks were successful
CI / build (pull_request) Successful in 53s
8a7c59510b
Merge branch 'main' into fix/140-mcp-server-deprecated-api
All checks were successful
CI / build (pull_request) Successful in 39s
12801c0db9
jack merged commit a2314493a7 into main 2026-01-24 17:10:01 +00:00
Sign in to join this conversation.
No description provided.