From 8249afb763cb61e95a86cf8a19e1fb26f81b5870 Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Sun, 11 Jan 2026 04:32:15 -0700 Subject: [PATCH] Fix banner issue in server.py entry point The pyproject.toml script entry point (mcp-office-tools) uses server.py, not server_monolithic.py. Applied same show_banner=False fix and simplified to use app.run() instead of asyncio.run(app.run_stdio_async()). --- .gitignore | 2 +- .mcp.json | 9 --------- src/mcp_office_tools/server.py | 9 +++------ 3 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 .mcp.json diff --git a/.gitignore b/.gitignore index b39e0f3..041a1fe 100644 --- a/.gitignore +++ b/.gitignore @@ -80,4 +80,4 @@ tmp/ *.temp # Test documents (personal/private) -ORIGINAL - The Other Side of the Bed*.docx \ No newline at end of file +ORIGINAL - The Other Side of the Bed*.docx.mcp.json diff --git a/.mcp.json b/.mcp.json deleted file mode 100644 index 0bef080..0000000 --- a/.mcp.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "mcpServers": { - "office-tools": { - "type": "stdio", - "command": "uv", - "args": ["run", "python", "-m", "mcp_office_tools.server_monolithic"] - } - } -} diff --git a/src/mcp_office_tools/server.py b/src/mcp_office_tools/server.py index b1e7ff2..d5e4a79 100644 --- a/src/mcp_office_tools/server.py +++ b/src/mcp_office_tools/server.py @@ -41,12 +41,9 @@ powerpoint_mixin.register_all(app, prefix="") def main(): """Entry point for the MCP Office Tools server.""" - import asyncio - - async def run_server(): - await app.run_stdio_async() - - asyncio.run(run_server()) + # CRITICAL: show_banner=False is required for stdio transport! + # FastMCP's banner prints ASCII art to stdout which breaks JSON-RPC protocol + app.run(show_banner=False) if __name__ == "__main__": main() \ No newline at end of file