
Get activity history for files and folders. To page, pass the nextLink from the previous response back as nextlink; when nextlink is set, item_id/top are ignored (the scope and page size are fixed by the original request).
Search OneDrive with filters: file types, content category, modified/created, date ranges, size range, modified-by-me, and folder scoping.
Get the user's default OneDrive
Get information about a specific drive by ID
List all drives available to the user
Get the root folder of a drive
Get a special folder (Documents, Photos, etc.)
Get storage usage information for a drive
Get owner information for a drive
Get a drive item by ID or path
List children of a folder. To page, pass the nextLink from the previous response back as nextlink; when nextlink is set, itemid/top/orderby/filterquery are ignored (page size, order, and filter are fixed by the original request).
Create a new folder
Upload a file to OneDrive. Provide the bytes as base64 in content, up to 4 MB, or a filereference from the file upload API (POST /api/v1/files/) for larger files, which stream into OneDrive without entering the model's context. Target the folder with parentid, or give path as the file's full destination path. Use conflict_behavior to rename, replace or fail on a name collision.
Download file content from OneDrive as base64. Set returndownloadurl=true for a short-lived download URL instead, which handles larger files.
Update item metadata
Move an item to a different folder
Copy an item to a different location
Delete an item from OneDrive
Simple free-text search for items in OneDrive by name/content. For filtering by file type, date, size, or folder, use searchitemsadvanced instead.
List permissions for an item
Get a specific permission by ID
Create a sharing link for an item
Grant permissions to recipients for an item
Update roles for a user/group permission
Remove a permission from an item
Access a shared item using sharing URL
Get sharing link information for an item
Check sharing status of an item
Get all available thumbnails for an item
Get a specific thumbnail size for an item
Generate a preview link for an item
Check if thumbnails are available for an item
Get thumbnail URLs for an item
Validate OneDrive credentials. Verifies credentials during setup.
List all versions of a file
Get details of a specific version
Restore a previous version of a file
Compare two versions of a file
List items in the recycle bin. NOTE: Microsoft Graph has no documented v1.0 endpoint for this, so this tool always returns success=False with an error explaining the limitation rather than data.
Restore an item from the recycle bin
Get download URL for a specific version of a file

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}Here are just a few popular use cases:
Here are some popular tools across resource types:
Drives
Items
Permissions
Merge Agent Handler provides platform-level capabilities that go beyond a standalone MCP server:
Yes, you can set a wide range of custom security rules. Here are just a few examples:
Here are the steps to start using Merge Agent Handler's OneDrive MCP server:
1. Sign up for Agent Handler. You can create a free Merge Agent Handler account here.
2. Create a Tool Pack (a collection of connectors your agent can access). In the dashboard, go to Tool Packs, click "Create New Tool Pack," and select the OneDrive connector from the available connectors. You can also name your Tool Pack (e.g., "OneDrive Access Pack").
3. Create a Registered User (an identity that executes actions on behalf of your agent). Navigate to the Registered Users section in the dashboard and click "Create Registered User."
You'll need to provide:
Agent Handler will return a Registered User ID that you'll use in step 4.
4. Collect your configuration details. You'll need three pieces of information:
5. Configure your IDE or AI platform. Add the MCP server configuration to your development environment (Cursor, Claude Desktop, Windsurf, VS Code, etc.) using the Tool Pack ID, Registered User ID, and API Key
6. Verify the connection. Open your AI assistant or agent interface. You should see the OneDrive tools available in the tools/context menu
7. Start using OneDrive tools. Test with prompts like "List my recent OneDrive files" or "Create a new folder in OneDrive called Project Documents."
Whether you're an engineer experimenting with agents or a product manager looking to add tools, you can get started for free now