
List charts in a worksheet. Use listworksheets to find worksheets. Use cursor from pageinfo for the next page.
Add a chart to a worksheet from a data range. charttype e.g. 'ColumnClustered', 'Line', 'Pie'. sourcedata e.g. 'A1:C4'. series_by: Auto, Columns, or Rows.
Get a base64-encoded PNG image of a chart. Use list_charts to find chart names/IDs. width/height of 0 use the chart's native size.
List named items (named ranges and constants) defined in a workbook. Use listworkbooks to find itemid.
Get a single named item by name. Use listnameditems to find valid names.
Get a cell range's values, text, and formulas by address (e.g. 'A1:B2'). Use listworksheets to find worksheets. Pass sessionid for consistent reads after writes.
Get the used range of a worksheet (the smallest range covering all cells with data). Set values_only=true to ignore empty formatted cells.
Write values, formulas, or number formats to a bounded range (e.g. 'A1:B2'). Provide 2-D arrays matching the range shape; a single value fills the whole range. Whole-row/column addresses like 'A:A' are not allowed.
Clear a range's contents, formats, or both. apply_to: All (default), Contents, or Formats. Use for resetting cells.
List all tables in a workbook. Use listworkbooks to find itemid. Use cursor from page_info for the next page.
Get a table by name or ID. Use list_tables to find valid tables.
Create a table over a range, e.g. address 'Sheet1!A1:C5' with hasheaders=true. Use listworksheets to find sheet names.
Update a table's name, header/totals visibility, or style. Use list_tables to find valid tables.
Delete a table (the underlying cells remain). Use list_tables to find valid tables.
List data rows of a table. Use listtables to find tables. Use cursor from pageinfo for the next page.
Add one or more rows to a table. values is a 2-D array, e.g. [['Jan', 49, 37]]. Omit index to append. Use listtablecolumns to see column order.
Delete a table row by zero-based index. Use listtablerows to find row indexes.
List columns of a table, including their values. Use listtables to find tables. Use cursor from pageinfo for the next page.
Add a column to a table. values is a 2-D array including the header, e.g. [['Status'], ['Open'], ['Closed']]. Omit index to append.
Sort a table by one or more columns. fields is a list of {key (zero-based column index), ascending}. Use listtablecolumns to find column indexes.
Validate Microsoft Excel credentials by calling GET /me on Microsoft Graph. Returns success and the signed-in user.
List Excel (.xlsx) workbooks in the user's OneDrive/SharePoint. Optionally filter by name with query. Returns driveItem IDs to use as itemid in other tools. Use cursor from pageinfo for the next page.
Create a new, empty Excel (.xlsx) workbook in OneDrive and return its driveItem ID (use it as item_id in other tools). Optionally place it in a folder. The new workbook has one sheet named Sheet1.
Delete an Excel workbook from OneDrive/SharePoint by its driveItem ID. This permanently removes the file. Use listworkbooks to find the itemid.
Create an Excel workbook session and return a sessionid. Pass that sessionid on subsequent tools so write-then-read stays consistent. Set persistchanges=true (default) to save changes to the file. Use listworkbooks to find item_id.
Close an Excel workbook session created with createsession. Provide the sessionid to close.
List worksheets in a workbook. Use listworkbooks to find itemid. Use cursor from page_info for the next page.
Get a worksheet by name or ID. Use list_worksheets to find valid worksheets.
Add a new worksheet to a workbook. Optionally provide a name. Use listworkbooks to find itemid.
Update a worksheet's name, position, or visibility. Use list_worksheets to find valid worksheets.
Delete a worksheet by name or ID. This permanently removes the sheet and its data. Use list_worksheets to find valid worksheets.

In an mcp.json file, add the configuration below, and restart Cursor.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "url": "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
5 "headers": {
6 "Authorization": "Bearer yMt*****"
7 }
8 }
9 }
10}
11Open your Claude Desktop configuration file and add the server configuration below. You'll also need to restart the application for the changes to take effect.
Make sure Claude is using the Node v20+.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "mcp-remote@latest",
8 "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
9 "--header",
10 "Authorization: Bearer ${AUTH_TOKEN}"
11 ],
12 "env": {
13 "AUTH_TOKEN": "yMt*****"
14 }
15 }
16 }
17}Open your Windsurf MCP configuration file and add the server configuration below.
Click on the refresh button in the top right of the Manage MCP server page or in the top right of the chat box in the box icon.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "mcp-remote@latest",
8 "https://ah-api.merge.dev/api/v1/tool-packs/<tool-pack-id>/registered-users/<registered-user-id>/mcp",
9 "--header",
10 "Authorization: Bearer ${AUTH_TOKEN}"
11 ],
12 "env": {
13 "AUTH_TOKEN": "<ah-production-access-key>"
14 }
15 }
16 }
17 }In Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows), run "MCP: Open User Configuration".
You can then add the configuration below and press "start" right under servers. Enter the auth token when prompted.
Learn more in the official documentation ↗
1{
2 "inputs": [
3 {
4 "type": "promptString",
5 "id": "agent-handler-auth",
6 "description": "Agent Handler AUTH_TOKEN", // "yMt*****" when prompt
7 "password": true
8 }
9 ],
10 "servers": {
11 "agent-handler": {
12 "type": "stdio",
13 "command": "npx",
14 "args": [
15 "-y",
16 "mcp-remote@latest",
17 "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
18 "--header",
19 "Authorization: Bearer ${input:agent-handler-auth}"
20 ]
21 }
22 }
23}It's an MCP server that lets your agents access data and functionality from Microsoft Excel via tools. Your agents can invoke these tools to read a range of cells, write values into a worksheet, create a new table, add a chart to a workbook, and more.
Microsoft doesn't offer an MCP server purpose built for Excel, but you can use one from a third-party platform, like Merge Agent Handler.
The use cases naturally depend on the agent you've built, but here are a few common ones:
Here are some of the most commonly used tools:
get_range: reads the values, formulas, and formatting of a specified range of cells in a worksheet. Useful for agents that need to check a report's current numbers before deciding what to updateupdate_range: writes new values into a range of cells in a worksheet. Call this when an agent needs to push data from another system directly into a workbookcreate_worksheet: adds a new worksheet to an existing workbook. Good for workflows that generate a fresh tab for each reporting period rather than overwriting prior datacreate_table: converts a range of cells into a structured Excel table with headers and defined columns. Use this when an agent needs to turn raw data into something that supports sorting, filtering, or table-based formulasadd_table_row: appends a new row of data to an existing table. Helpful when an agent needs to log new records, like expenses or tasks, without disturbing existing rowsadd_chart: creates a chart on a worksheet based on a specified data range. Use this when an agent needs to turn a table of numbers into a visual for a report or dashboardThere are several reasons to use Merge Agent Handler's Microsoft Excel MCP server over building or using an alternative:
You can take the following steps:
1. Create or log into your Merge Agent Handler account.
2. Install the Merge CLI by running pipx install merge-api, then run merge configure to link the CLI to your Merge account and merge login to authenticate your session.
3. Register the Agent Handler MCP server with Claude Code by running claude mcp add --transport http agent-handler https://ah-api.merge.dev/mcp, then open Claude Code and run /mcp to confirm agent-handler appears with a connected status.
4. Select agent-handler from the MCP list. This opens a browser window where you select which integrations to authenticate. Choose Microsoft Excel and complete the auth flow. Merge stores and manages the credentials going forward.
5. Open a Claude Code session and start querying Microsoft Excel data directly. The first time you use a Microsoft Excel tool, a Magic Link may appear to complete connector authentication.
If you want to connect Merge Agent Handler's Microsoft Excel MCP with internal or customer-facing agentic products, you can follow the steps in our docs.
Yes, Merge for Workforce lets your employees connect Claude, ChatGPT, Microsoft Copilot, Cursor, Codex, and other MCP-compatible AI tools to Microsoft Excel without bypassing IT governance.
Instead of setting up direct connections with personal credentials that IT can't monitor or revoke, each employee authenticates through Merge and gets individual credentials tied to their identity. An ops employee can ask their AI to pull the latest numbers from a shared tracker, update a range of cells, or summarize a workbook's status, all within IT-defined permissions.
IT also provisions access by role or group via SCIM. A finance analyst, for example, gets Microsoft Excel access to update budget trackers, NetSuite to pull the latest actuals, and Slack to share monthly variance summaries; while an operations manager gets Microsoft Excel access to maintain a shared project tracker, Asana to sync task status, and Outlook to send stakeholder updates.
Every tool call an employee's AI makes to Microsoft Excel is also inspected against your DLP rules and logged to a searchable audit trail, giving security teams full visibility into what data was accessed and by whom.
Whether you're an engineer experimenting with agents or a product manager looking to add tools, you can get started for free now