-
Notifications
You must be signed in to change notification settings - Fork 0
Description
- Univer MCP Server:
https://mcp.univer.ai - Client: Custom backend integration (reproducible through independent Python scripts)
- Frontend: Univer MCP Start Kit (running locally on 'localhost')
Problem Description :
Hello, Univer team
We are attempting to integrate Univer MCP into our backend application. Our front-end instance (Session ID: 'my-test-flow-001') has been able to start successfully and connect to Univer's WebSocket server.
(I tried to connect using the http method, but the server side reported error 406: HTTP error fetching tools from Univer MCP: 406 - {" jsonrpc ":" 2.0 ", "id" : "server - error", "error" : {" code ": - 32600, the" message ":" Not Acceptable: Client must accept text/event-stream"}})
However, when our back-end client try through official SSE endpoint (https://mcp.univer.ai/mcp/) to obtain a list of available tools, had a problem. The server accepts our connection request and regularly sends a 'ping' heartbeat message without sending any 'data:' events, which contain a list of tools. This results in our customers being unable to obtain the tools and also unable to carry out the next operation.
We have stably reproduced this issue through a completely independent Python diagnostic script, proving that the problem is likely to occur on the server side rather than in our integrated environment.
Steps to Reproduce :
- Prepare the front end: start a standard univer front end instance (for example, using 'univer-mcp-start-kit') and ensure that its' sessionId 'is set to a known value, such as' my-test-flow-001'. Confirm that the front-end page displays "MCP Connected".
- Prepare and run the following standalone Python script: (Please ensure that 'httpx' via 'pip install httpx' is installed)
import asyncio
import httpx
Configuration
Please replace YOUR_API_KEY with a valid Univer API Key
API_KEY = "YOUR_API_KEY"
SESSION_ID = "my-test-flow-001" # must be consistent with the running front-end instance
SERVER_URL = "https://mcp.univer.ai/mcp/"
async def main():
url = f"{SERVER_URL}? univer_session_id={SESSION_ID}"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Accept": "text/event-stream",
"User-Agent": "Standalone-Univer-Test-Client/1.0"
}
print(f" is connecting: {url}")
try:
async with httpx.AsyncClient(timeout=60.0) as client:
async with client.stream("GET", url, headers=headers) as response:
response.raise_for_status()
print(" Connection successful, waiting for data...") )
async for line in response.aiter_lines():
print(f" received line: {line}")
if line.startswith("data:"):
print(" Data received successfully!" )
except Exception as e:
print(f" Error occurred: {e}")
if name == "main":
asyncio.run(main())
- Observe the output of the script.
Expected Behavior
In the script output "Connection successful, waiting for data..." After that, we expect to receive at least one line starting with 'data:' soon, which contains the JSON data of the tool list. For example:data: {" tools ": [{" name" : "set_range_data,"...}]}
Actual Behavior :
The script successfully connected, but only received the periodic 'ping' heartbeat message sent by the server. During the waiting time of more than one minute, no 'data:' message was received. Output as follows:
Is connect: https://mcp.univer.ai/mcp/? univer_session_id=my-test-flow-001
Connection successful. Waiting for data...
Received line: ping -2025-10-17 06:26:03.856480+00:00
Received line:
Received line: ping -2025-10-17 06:26:18.857572+00:00
Received line:
... (Continuously receiving ping messages
Conclusion :
This issue seems to indicate that the Univer MCP server failed to push the tool list data correctly after receiving a legitimate SSE connection request with a corresponding front-end instance.