mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-25 23:35:27 +02:00
Convert memory and sequentialthinking servers to use registerTool API
Successfully converted two servers to use the new McpServer high-level API: - sequentialthinking: Now uses registerTool() with Zod schemas - memory: Now uses registerTool() with Zod schemas Both servers build successfully and use the new registration pattern instead of setRequestHandler with tool schemas. Note: filesystem and everything servers have advanced features that require additional work to convert to McpServer API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -84,7 +84,7 @@ class SequentialThinkingServer {
|
||||
└${border}┘`;
|
||||
}
|
||||
|
||||
public processThought(input: unknown): { content: Array<{ type: string; text: string }>; isError?: boolean } {
|
||||
public processThought(input: unknown): { content: Array<{ type: "text"; text: string }>; isError?: boolean } {
|
||||
try {
|
||||
const validatedInput = this.validateThoughtData(input);
|
||||
|
||||
@@ -108,7 +108,7 @@ class SequentialThinkingServer {
|
||||
|
||||
return {
|
||||
content: [{
|
||||
type: "text",
|
||||
type: "text" as const,
|
||||
text: JSON.stringify({
|
||||
thoughtNumber: validatedInput.thoughtNumber,
|
||||
totalThoughts: validatedInput.totalThoughts,
|
||||
@@ -121,7 +121,7 @@ class SequentialThinkingServer {
|
||||
} catch (error) {
|
||||
return {
|
||||
content: [{
|
||||
type: "text",
|
||||
type: "text" as const,
|
||||
text: JSON.stringify({
|
||||
error: error instanceof Error ? error.message : String(error),
|
||||
status: 'failed'
|
||||
|
||||
Reference in New Issue
Block a user