Skip to main content

Connect your AI agent (MCP)

mtdt.io runs a remote MCP server. Claude Code, Cursor, OpenAI Codex, OpenCode and other MCP clients can use it to find orgs, create and edit deployments, browse metadata, run pre-deploy checks, validate with tests, deploy, compare orgs, back up metadata and move Work Items between environments.

The server address is the same for every client:

https://mcp.mtdt.io

The server uses Streamable HTTP and OAuth 2.0 (authorization code with PKCE and Dynamic Client Registration). On the first connection your agent opens a browser, you sign in to mtdt and approve the requested access. You don't need an API key.

Requirements

  • An mtdt.io account with at least one connected Salesforce org.
  • If your account or your team requires multi-factor authentication, enter the one-time code during sign-in. A session signed in without it is refused.

Claude Code​

The plugin adds the MCP connection and two skills, mtdt-deploy and mtdt-troubleshoot:

/plugin marketplace add mtdt-io/mcp
/plugin install mtdt@mtdt

To add only the MCP server, without the skills:

claude mcp add --transport http mtdt https://mcp.mtdt.io

or in .mcp.json:

{
"mcpServers": {
"mtdt": {
"type": "http",
"url": "https://mcp.mtdt.io"
}
}
}

Claude Code needs the "type": "http" field and skips an entry that has only url, with a warning. To sign in, run /mcp in a session and choose Authenticate, or run claude mcp login mtdt.

Cursor​

Add mtdt to Cursor

Or add it to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):

{
"mcpServers": {
"mtdt": {
"url": "https://mcp.mtdt.io"
}
}
}

Cursor detects the remote server from url, so leave out the type field. The OAuth sign-in opens on the first connection; you can check the connection under Cursor Settings → MCP.

OpenAI Codex​

codex mcp add mtdt --url https://mcp.mtdt.io
codex mcp login mtdt

or in ~/.codex/config.toml:

[mcp_servers.mtdt]
url = "https://mcp.mtdt.io"

Codex uses OAuth when no bearer token is configured.

OpenCode​

In opencode.json (project) or the global config:

{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mtdt": {
"type": "remote",
"url": "https://mcp.mtdt.io",
"enabled": true
}
}
}

OpenCode needs the mcp key and "type": "remote". It starts the OAuth sign-in on the first connection; to start it by hand, run opencode mcp auth mtdt.

Config format by client​

Each client expects its own config key and type value, so a snippet copied from one client may not work in another:

ClientConfig keytype field
Claude CodemcpServersrequired, "http"
CursormcpServersomit
Codex[mcp_servers.*]none (inferred from url)
OpenCodemcprequired, "remote"

What your agent can do​

The server has 23 tools in four groups.

GroupTools
Deploymentsget_workflow_deployment_recipe (the recommended deployment workflow and its guardrails), list_deployments, create_deployment, get_deployment, update_deployment (components, Apex test level, caption, description, Work Item links), browse_metadata, check_deployment (the checks the Deploy dialog runs: destructive impact, profiles and permissions, record-backup recommendations, scheduled Apex, business hours, folder sharing, components that cannot be deployed from source, static analysis, plus missing dependencies, target conflicts and Apex test recommendations)
Runsvalidate_deployment, execute_deployment, execute_quick_deployment, get_deployment_run
Work Itemslist_projects, list_work_items, get_work_item, create_work_item, update_work_item, promote_work_item
Sources and servicelist_orgs, list_sources (git repos, metadata backups, uploaded archives), compare_orgs, run_metadata_backup, request_archive_upload, register_archive

Reading needs the mtdt:read scope. Tools that change data or start work in an org (creating and editing deployments and Work Items, browsing metadata, comparing orgs, validating, deploying, backups and archive uploads) need the mtdt:deploy scope.

Deploying​

validate_deployment, execute_deployment and execute_quick_deployment accept dry_run: true, which returns the plan without starting anything.

  • execute_deployment runs a full deploy of the saved deployment with its current settings, including saved post-deploy actions.
  • execute_quick_deployment takes deployment_id and validation_run_id (the run ID returned by the validation, not a task ID or a Salesforce ID). It deploys exactly that validation's package without re-running Apex tests; later edits to the deployment and newer validations don't change it. If the validation can't be quick-deployed, the call is refused and no full deploy starts. A quick deploy doesn't run post-deploy Apex, Git push, record backups or scheduled-job pauses. It can be scheduled for a later time while the validation is still valid.

Both follow the same permission, approval and important-org confirmation rules as the web app. Track the run with get_deployment_run.

Refusals and error messages​

  • A backup without a stored archive can't be used as a deploy source. list_sources hides unfinished backups and backups without an archive by default.
  • If a retrieval fails on the Salesforce side, browse_metadata reports the failure and its reason.
  • If the deployment has no Apex, the test recommendation says so.
  • A real deploy to an org marked important waits for your confirmation, as in the web app. If your role can't deploy to that org directly, mtdt requests approval.
  • A second run can't start while a run of the same deployment is still in progress.

Opening a deployment through the MCP server counts as activity for metadata retention.

Built-in guidance​

When an agent connects, the server sends it the deployment playbook in the MCP instructions field: the standard flow (find the target, create or resume a deployment, browse and pick components, run the checks, validate with tests, deploy) and the guardrails (confirm production targets, the 75% Apex coverage rule, how to wait for long operations). Every MCP client receives it.

The same playbooks are available as MCP prompts, mtdt-deploy and mtdt-troubleshoot, in clients with a prompt picker (Claude Desktop, Cursor, Zed). The Claude Code plugin ships them as skills.

FAQ​

Does the agent bypass my team's permissions?​

No. Every MCP call runs as your mtdt user with your team role. Targets that need approval still need it, and tools that change data refuse to run without the mtdt:deploy scope.

Which AI agents work with mtdt?​

Any client that supports remote MCP servers over Streamable HTTP with OAuth, for example Claude Code, Cursor, OpenAI Codex, OpenCode and Claude Desktop (as a custom connector). This page has setup steps for the first four; for other clients, use https://mcp.mtdt.io as the server address.

Do I get the deployment playbook outside Claude Code?​

Yes. Every client receives it with the connection as MCP instructions, and clients that list server prompts also offer mtdt-deploy and mtdt-troubleshoot. In Claude Code, the plugin adds the same content as skills.

Do I need an API key?​

No. The connection uses OAuth: the agent opens a browser, you sign in to mtdt and approve access.

Why does sign-in fail for my account?​

If your account has MFA enrolled or your team requires MFA, sign-in must include the one-time code. A session without it is refused with a message that says so. Sign in again and enter the code when asked. If sign-in never asks for the code, contact your mtdt administrator.

Does a long agent run lose the connection?​

No. The server refreshes the session automatically, so runs longer than an hour keep working.