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:
parent
210aa99e0b
commit
8249afb763
2
.gitignore
vendored
2
.gitignore
vendored
@ -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
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"mcpServers": {
|
|
||||||
"office-tools": {
|
|
||||||
"type": "stdio",
|
|
||||||
"command": "uv",
|
|
||||||
"args": ["run", "python", "-m", "mcp_office_tools.server_monolithic"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -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()
|
||||||
Loading…
x
Reference in New Issue
Block a user