File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1717"""Entry point for the Google Analytics MCP server."""
1818
1919import asyncio
20- import coordinator
20+ import analytics_mcp . coordinator as coordinator
2121from mcp .server .lowlevel import NotificationOptions
2222from mcp .server .models import InitializationOptions
2323import mcp .server .stdio
2424import mcp .server
2525import traceback
2626
2727
28- async def run_mcp_stdio_server ():
28+ async def run_server_async ():
2929 """Runs the MCP server over standard I/O."""
3030 print ("Starting MCP Stdio Server:" , coordinator .app .name )
3131 async with mcp .server .stdio .stdio_server () as (read_stream , write_stream ):
@@ -44,9 +44,14 @@ async def run_mcp_stdio_server():
4444 )
4545
4646
47+ def run_server ():
48+ """Synchronous wrapper to run the async MCP server."""
49+ asyncio .run (run_server_async ())
50+
51+
4752if __name__ == "__main__" :
4853 try :
49- asyncio .run (run_mcp_stdio_server ())
54+ asyncio .run (run_server ())
5055 except KeyboardInterrupt :
5156 print ("\n MCP Server (stdio) stopped by user." )
5257 except Exception :
Original file line number Diff line number Diff line change @@ -49,5 +49,5 @@ google-analytics-mcp = "analytics_mcp.server:run_server"
4949dev = [" black" , " nox >=2026.2.9, <2027" ]
5050
5151[build-system ]
52- requires = [" setuptools>=69 .0.0" , " wheel" ]
52+ requires = [" setuptools>=82 .0.0" , " wheel" ]
5353build-backend = " setuptools.build_meta"
You can’t perform that action at this time.
0 commit comments