Fix MCP server API migration and improve logging#67
Open
justintanner wants to merge 1 commit intogyoridavid:mainfrom
Open
Fix MCP server API migration and improve logging#67justintanner wants to merge 1 commit intogyoridavid:mainfrom
justintanner wants to merge 1 commit intogyoridavid:mainfrom
Conversation
- Update MCP server to use registerTool() API with new schema format (fixes compatibility with @modelcontextprotocol/sdk ^1.9.0) - Fix Kokoro buffer handling to properly return ArrayBuffer (ensures type consistency in audio generation) - Improve FFmpeg logging with Pino structured format (aligns with codebase logging conventions)
8f01e54 to
b590e2f
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hello!
Amazing project you have here, I like it so much I got Gemini to make some changes so that it runs locally without error (mac).
I sorry this is a "works on my machine" type PR, but I think the fixes Gemini came up with are good.
Changes
1. MCP Server API Migration (src/server/routers/mcp.ts)
The MCP SDK deprecated the
.tool()API in favor of.registerTool(). This updates the code to use the new API format:Before:
After:
Key changes:
.tool(name, description, schema, handler)to.registerTool(name, { description, inputSchema }, handler)z.object()wrapper for inputSchemaas const) for content typescapabilitiesobject from McpServer constructorImpact: Without this change, the MCP server will fail with newer SDK versions.
2. Kokoro ArrayBuffer Fix (src/short-creator/libraries/Kokoro.ts)
Fixed
concatWavBuffers()to properly return an ArrayBuffer instead of a Node.js Buffer:This ensures type consistency with the function signature and prevents potential issues with downstream ArrayBuffer consumers.
3. FFmpeg Structured Logging (src/short-creator/libraries/FFmpeg.ts)
Updated FFmpeg initialization logging to use Pino's structured format:
This improves log parsing and consistency with the rest of the codebase's logging patterns.
Compatibility