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()).
This commit is contained in:
Ryan Malloy 2026-01-11 04:32:15 -07:00
parent 210aa99e0b
commit 8249afb763
3 changed files with 4 additions and 16 deletions

2
.gitignore vendored
View File

@ -80,4 +80,4 @@ tmp/
*.temp *.temp
# Test documents (personal/private) # Test documents (personal/private)
ORIGINAL - The Other Side of the Bed*.docx ORIGINAL - The Other Side of the Bed*.docx.mcp.json

View File

@ -1,9 +0,0 @@
{
"mcpServers": {
"office-tools": {
"type": "stdio",
"command": "uv",
"args": ["run", "python", "-m", "mcp_office_tools.server_monolithic"]
}
}
}

View File

@ -41,12 +41,9 @@ powerpoint_mixin.register_all(app, prefix="")
def main(): def main():
"""Entry point for the MCP Office Tools server.""" """Entry point for the MCP Office Tools server."""
import asyncio # CRITICAL: show_banner=False is required for stdio transport!
# FastMCP's banner prints ASCII art to stdout which breaks JSON-RPC protocol
async def run_server(): app.run(show_banner=False)
await app.run_stdio_async()
asyncio.run(run_server())
if __name__ == "__main__": if __name__ == "__main__":
main() main()