MCP

GitHubEdit on GitHub

MCP (Model Context Protocol) integration enables large language models to securely operate Univer spreadsheets through standardized protocols, supporting various AI clients like Cursor, Claude, and more.

With MCP protocol, you can directly manipulate spreadsheets using natural language instructions, such as "populate sales data in cells A1 to C10", and AI will automatically execute the corresponding operations.

How It Works

LLM calls your MCP Server through MCP protocol → MCP Server executes commands → pushes instructions to specific user's Univer instance via WebSocket.

The entire pipeline involves three core components:

  • MCP Agent (LLM Client)
    • Initiates tool calls
    • Such as Cursor, Claude, LangChain Agent
  • MCP Server
    • Provides tool definitions
    • Routes and relays instructions
    • Official cloud service: mcp.univer.ai; supports self-hosting
  • Univer Instance
    • Receives and executes commands
    • Runs in user's browser, requires MCP plugin registration
    • Tool set is automatically provided by UniverSheetMCPPlugin, no manual definition needed

Key mechanism: Multi-user instruction isolation through univer-session-id.

Simply put: You tell AI "write Hello in cell A1", AI tells Univer to execute this operation through MCP protocol, and you can see the result in the spreadsheet.

Learn More

If you want to learn more about MCP, you can refer to the following resources:

How is this guide?

Table of Contents

Capalyze