Announcing CIMD support for MCP Client registration
Learn more

Wiring Deel Into Your Agent - MCP, API, or Both?

Nityashree Yadunath
Product Marketing Manager

TL;DR

  • Deel MCP and the Deel API cover nearly the same ground, because each MCP tool maps to a Deel API operation. The differences are structural, not feature gaps: webhooks, idempotency keys, explicit version pinning, organization-token headless auth, and programmatic worker tokens live on the API, not the MCP surface.
  • Deel MCP auth centers on the authenticated user: OAuth2 (OAuth 2.1 with Dynamic Client Registration), with a personal access token as the fallback for clients that do not support OAuth. The API adds organization tokens for no-user server-to-server jobs and worker tokens for embedded worker flows.
  • Deel's OAuth2 access tokens expire after 30 days and refresh tokens rotate. Whichever path you pick, that is a token lifecycle you have to run, per user, at scale.
  • Deel's MCP server exposes hundreds of operations; Scalekit's connector surfaces 355 tools. Handing an LLM that full surface degrades tool selection and burns tokens before the agent does any work. Surface reduction is the lever.
  • Scalekit's Deel connector handles the OAuth 2.1 flow, token vault, and rotation, scopes tools per user, and logs every downstream tool call, so the MCP vs API decision does not change your auth infrastructure.

Your agent needs to hire, pay, or manage people through Deel. Deel now ships two ways to get there: an official Model Context Protocol (MCP) server at api.letsdeel.com/mcp, and the REST API that the MCP server is built on top of. They are not interchangeable. They put your agent on different auth paths, expose different operational surface area, and behave differently under a multi-tenant load. Picking the wrong one shows up later, in production, when a nightly job has no browser to complete a consent flow or a payment quietly retries twice. Here is how to choose.

What Deel MCP and Deel API actually are

Both are official and Deel-maintained. The distinction that matters for an agent is not what each can do, but how your agent authenticates and what it has to own around each one.

Deel MCP

Deel's MCP server is a vendor MCP: built and maintained by Deel, reachable at api.letsdeel.com/mcp. It communicates over HTTP using JSON-RPC 2.0 with Server-Sent Events for streaming, and each tool maps directly to a Deel API operation. Tools are grouped into three permission levels: Organization (org-wide data, org-level scopes), Worker (scoped to a single worker, worker-level auth), and Public (reference data such as countries and currencies). Authentication is OAuth2 (OAuth 2.1 with Dynamic Client Registration), with a personal access token fallback for clients that do not support OAuth. See the official Deel MCP server docs for the current tool categories.

Deel API

The Deel REST API is the full workforce platform surface, hosted at api.letsdeel.com and versioned by date, with 2026-01-01 as the current stable version. It spans platform, employer of record, contractors, global payroll, HR, embedded, and Deel IT, plus webhooks for real-time events. Authentication uses bearer tokens: three API token variants (organization, personal, and worker) plus OAuth2 for user-authorized apps. Scopes follow a {resource}:read and {resource}:write pattern. See the official Deel API docs for the endpoint reference.

Comparing them where it matters for agents

The comparison is not about which one is more capable. It is about the auth path each one forces, the surface area you inherit, and where each one quietly fails under production load. Four dimensions decide it.

What your agent can actually do

Because every MCP tool wraps an API operation, the read and write coverage overlaps heavily: contracts, time off, payroll, ATS, compensation bands, EOR cost estimates, and worker documents are all reachable from either path. The gaps appear at the structural layer, where the API exposes controls the MCP tool interface does not.

Capability
Deel MCP
Deel API
List and read contracts
Yes
Yes
Create, amend, terminate contracts
Yes
Yes
Time off requests (create, list)
Yes
Yes
Payroll, invoice adjustments, off-cycle payments
Yes
Yes
ATS: jobs, candidates, applications
Yes
Yes
Compensation bands and job architecture
Yes
Yes
EOR employment cost calculation
Yes
Yes
Worker document download and compliance checks
Yes
Yes
Reference data (countries, currencies)
Yes
Yes
Real-time change events (webhooks)
No
Yes
Idempotency-Key header for safe write retries
No
Yes
Explicit version pinning (date-based)
No
Yes
Headless organization-token auth (no user present)
Limited
Yes
Programmatic worker access tokens (Embedded)
No
Yes

The two gaps that hurt most in production are events and idempotency. If your agent needs to react when a contract is signed or a payment status changes, that requires webhooks, and the MCP surface has no event subscription. If your agent moves money, the Idempotency-Key header protects against a double payment on retry, and that header is an API-level control the MCP tool schema does not expose.

The auth path each one puts you on

Deel MCP is user-centric by design. The recommended flow is OAuth2 browser consent, after which every tool call runs as the authenticated user, constrained to the Organization, Worker, and Public scopes that user was granted. A personal access token is the documented fallback for clients that cannot run OAuth.

The API opens up two credential shapes the MCP path does not. Organization tokens represent the whole org, are generated in the Developer Center, do not expire, and are built for server-to-server automation with no user in the loop; they cannot sign contracts. Worker tokens represent a single EOR worker, are minted programmatically through the create-worker-access-token endpoint under the Embedded model, and only reach worker-side paths. The multi-tenant credential fallout of either path gets its own section below.

What you own in production

The MCP path manages real work for you: schemas for hundreds of operations, endpoint normalization, OAuth discovery with Dynamic Client Registration, and request routing. When Deel changes an operation, the vendor server updates the tool and your agent picks it up without a redeploy. What it does not manage is the credential layer: token storage, refresh on the 30-day expiry, revocation on disconnect, and tenant isolation.

The direct API means you own the whole stack: endpoint selection across seven product areas, request construction with Deel's nested data wrappers, error handling, rate limits, idempotency, and token lifecycle. The tradeoff is control. The MCP tool surface is server-managed and effectively unversioned; the API is date-versioned, so you pin 2026-01-01 and opt into changes deliberately.

When to use MCP, when to use the API

The choice tracks one question: is a person present when the agent runs? Interactive, conversational Deel work fits MCP. Headless, event-driven, or money-moving work fits the API.

Use Deel MCP when:

  • You are building an interactive HR or finance assistant inside Claude, Cursor, VS Code, or ChatGPT, where the person is present to complete OAuth consent once.
  • The work is conversational and read-heavy: which contracts end this quarter, who has not submitted a compliance document, or the EOR cost of a hire in Portugal.
  • You want tool discovery across Deel's large operation surface without hand-writing and maintaining schemas.
  • You are prototyping a Deel agent and want a working loop today.

Use the Deel API when:

  • The agent runs headless: a nightly payroll reconciliation, a scheduled compliance sweep, or an event-driven onboarding pipeline with no one at the keyboard. Organization tokens are built for this.
  • The agent must react to Deel events such as a contract signed or a payment status change, which needs webhooks.
  • The agent writes money movement and needs idempotent retries through the Idempotency-Key header.
  • You run embedded worker self-service and need programmatic worker access tokens, or you need to pin an API version for a deterministic pipeline.

The credential problem that exists on both paths

Whether you chose MCP or the API, every customer in a multi-tenant Deel agent holds their own credential. The MCP OAuth flow gives you a token per user; the API's Authorization Code path (RFC 6749) gives you an access token per user. Fifty customers means fifty grants, fifty token lifecycles, and fifty revocation paths to honor.

Why the token lifecycle is yours either way

Deel's OAuth2 access tokens expire after 30 days and refresh tokens rotate, so refresh handling is mandatory; waiting for a 401 to trigger it invites the retry storms that break background execution. Organization tokens never expire, which is convenient until one leaks and becomes a standing liability with a wide blast radius. In every case the credential must live somewhere encrypted at rest, isolated per tenant, and revocable on disconnect. The token type differs by path; the infrastructure required is identical.

Where Scalekit fits

Authentication has to be built into the infrastructure, not integrated per connector. Scalekit's Deel connector runs the OAuth 2.1 flow, stores credentials in a token vault so they never touch your agent runtime, and refreshes and rotates them automatically. The MCP vs API decision no longer changes what you build for auth.

Recommended reading: Token vault for AI agent workflows and when to use a Virtual MCP server.

Building a Deel agent with Scalekit

Scalekit ships Deel as a vendor-MCP connector named deelmcp. You resolve a per-user identifier from your own authenticated session, and Scalekit handles consent, token custody, scoped tool discovery, and execution. The pattern below follows the order that matters: connect, discover the authorized surface, then run the loop.

Connect the user's Deel account

The one-time connection is triggered from your app using the current user's identifier. Never accept an identifier from the client; resolve it from your session, JWT, or database.

import { ScalekitClient } from '@scalekit-sdk/node' import 'dotenv/config' const scalekit = new ScalekitClient( process.env.SCALEKIT_ENVIRONMENT_URL!, process.env.SCALEKIT_CLIENT_ID!, process.env.SCALEKIT_CLIENT_SECRET!, ) const actions = scalekit.actions const connection = 'deelmcp' const identifier = 'user_123' const { link } = await actions.getAuthorizationLink({ connectionName: connection, identifier, }) console.log('Authorize Deel:', link)

Discover the tools that user can call

Before showing any code, the key idea: the agent is not loading a flat catalog of every Deel tool. It loads the tools the current user's connected account is authorized to call. list_scoped_tools returns that identity-scoped surface in Anthropic's native format, so there are no schemas to write.

import os import anthropic import scalekit.client from dotenv import find_dotenv, load_dotenv from google.protobuf.json_format import MessageToDict load_dotenv(find_dotenv()) scalekit_client = scalekit.client.ScalekitClient( client_id=os.getenv("SCALEKIT_CLIENT_ID"), client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"), env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"), ) actions = scalekit_client.actions client = anthropic.Anthropic(api_key=os.getenv("ANTHROPIC_API_KEY")) CONNECTION = "deelmcp" # must match the connection name in your Scalekit dashboard, case-sensitive IDENTIFIER = "user_123" # your system's user id, resolved from your authenticated session scoped_response, _ = actions.tools.list_scoped_tools( identifier=IDENTIFIER, filter={"connection_names": [CONNECTION]}, page_size=100, ) llm_tools = [ { "name": MessageToDict(t.tool).get("definition", {}).get("name"), "description": MessageToDict(t.tool).get("definition", {}).get("description", ""), "input_schema": MessageToDict(t.tool).get("definition", {}).get("input_schema", {}), } for t in scoped_response.tools ]

Run the agent loop

This is the standard Anthropic tool-use loop. Claude decides what to call; your code executes each call through execute_tool with the user's identifier, so Scalekit reaches Deel as that user. The token never enters your code.

messages = [ {"role": "user", "content": "List our active contracts and flag any ending in the next 30 days."} ] while True: response = client.messages.create( model="claude-sonnet-4-6", max_tokens=1024, tools=llm_tools, messages=messages, ) if response.stop_reason == "end_turn": print(response.content[0].text) break tool_results = [] for block in response.content: if block.type == "tool_use": print(f" -> {block.name}") try: result = actions.execute_tool( tool_name=block.name, identifier=IDENTIFIER, tool_input=block.input, ) content = str(result.data) except Exception as e: content = f"Error: {e}" tool_results.append({ "type": "tool_result", "tool_use_id": block.id, "content": content, }) messages.append({"role": "assistant", "content": response.content}) messages.append({"role": "user", "content": tool_results})

For that prompt, Claude resolves to deelmcp_contract_list and reasons over the result. The same connected-account pattern plugs into other frameworks; the Scalekit LangChain example exposes the same scoped tools through actions.langchain.get_tools, which calls list_scoped_tools under the hood.

Scope the 355-tool surface with a Virtual MCP server

Identity scoping is necessary but not sufficient. Deel's connector surfaces 355 tools, and a broad OAuth grant can leave most of them authorized. Handing an LLM that full surface is both an accuracy and a cost problem: at roughly 200 tokens per definition, 355 tools burn about 71,000 tokens before the agent does any work, and tool selection degrades when the decision space is that large.

A Virtual MCP server fixes this with explicit allow-listing: one server per agent role, exposing only the tools that role needs, such as deelmcp_contract_list and deelmcp_contract_termination_create for an offboarding agent. The agent sees only the tools you allow. One definition serves every user, and a short-lived session token is minted per run, so there is no server to deploy or maintain.

See every tool call in the auth logs

A Deel agent moves contracts, payments, and worker data, so observability is not optional. Scalekit's auth logs record every downstream tool call: which identity acted, which tool ran, and the result. That gives you the audit trail a security review will ask for, and the trace you need when a run misbehaves at 3am. What the user cannot do, the agent cannot do, and every action it does take is queryable after the fact.

Which one to build against

The answer follows the shape of your agent, and most production Deel agents end up running both modes in the same product.

If a person is in the loop

Interactive, user-present assistants belong on the MCP path. Tool discovery is handled, consent happens once, and you are operational quickly. This is the right foundation for conversational HR and finance agents where a human is there to authorize and review.

If the agent runs on its own

Headless, event-driven, money-moving, or version-pinned pipelines belong on the API. Organization tokens remove the user from the loop, webhooks give you events, the Idempotency-Key header protects writes, and date-based versioning keeps the pipeline deterministic. Either way, the credential problem is identical, and that is what needs production-grade infrastructure rather than another custom integration.

Build your Deel agent on Scalekit

Whichever path fits, Scalekit is the auth and tool-calling layer underneath it. Start from the connector, then wire in the HR agent patterns you actually plan to ship.

Docs and connector

Browse the Scalekit Deel connector docs and the Deel connector page, or see the full connector catalog. For starting points, look at the new hire provisioning agent, the offer letter routing agent, the PTO leave request agent, and the performance review collector agent. Pricing is on the pricing page.

Community and support

Join other Deel agent builders in the Scalekit Slack community, or use the Talk to us page for immediate help wiring up per-user Deel auth.

No items found.
Agent
Auth Quickstart
On this page
Share this article
Agent
Auth Quickstart

Acquire enterprise customers with
zero upfront cost.

Every feature unlocked. No hidden fees.