DataMagik MCP API

Plug DataMagik into any AI agent that speaks the Model Context Protocol.

The DataMagik MCP server exposes the full platform — scripts, document templates, lookup tables, dashboards, automations, SQL queries, app designer entries, on-prem connectors (local databases, API bridge, FTP/filesystem), email + templates, schedules, allowed domains, credentials, website content, documentation, and the Plex database schema — to AI tools that speak MCP. If you're building an AI agent, IDE plugin, or LLM-driven workflow that needs to read or modify DataMagik resources on a user's behalf, this is the surface.

Related operations are grouped into action-dispatcher tools: instead of one tool per operation, you call a single tool (e.g. scripts) and pass an action parameter ("action":"create") to pick the operation. This keeps the whole platform under one connector's tool cap. Each family card below lists its actions.

Quick start

  1. Generate a bearer token on your user profile page under API Keys. Same token authorises both the DataMagik REST API and the MCP server — no second key to manage.
  2. Point your MCP client at the endpoint below using Authorization: Bearer <token>.
  3. Start with the initialize handshake, then tools/list, then call any tool.

Add DataMagik to Claude on the web

Claude on the web connects natively over OAuth — no API key to paste. Add it as a custom connector:

  1. In Claude, open Settings → Connectors → Add custom connector.
  2. Paste the MCP server URL below as the connector URL, then click Connect.
  3. Claude opens a DataMagik sign-in + approval screen. Sign in, review the active tenant shown, then click Approve.
  4. Done — Claude can now call your tools, and the connection stays signed in via refresh tokens.
https://mcp.data-magik.com/mcp

Working across multiple companies? Ask Claude to "list my companies" or "switch to <company>". The connection remembers the active tenant until you switch again, and DataMagik always tells Claude which tenant is active so it can confirm with you before creating, updating, or deleting anything.

Prefer a key? Use the API key flow below for self-hosted scripts, the REST API, and paste-a-key clients like Claude Desktop — use OAuth for Claude.ai and other hosted connectors.

Endpoint

POST https://mcp.data-magik.com/mcp

The server speaks MCP Streamable HTTP — JSON-RPC 2.0 in, single JSON or SSE stream out depending on the tool.

Authentication

Every request requires an Authorization: Bearer <token> header. The MCP server resolves the bearer into the issuing user's (user_id, company_id) pair and enforces ownership inside every tool: a token for Customer A cannot read or modify Customer B's resources, even if the model requests it.

Rate limit

60 requests per minute per API key, enforced as a sliding window. Every response includes:

Exceeding the limit returns 429 Too Many Requests with a Retry-After header. Need a higher rate? Contact support.

Initialize handshake

curl -X POST https://mcp.data-magik.com/mcp \
  -H 'Authorization: Bearer dm_pat_...' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2024-11-05",
      "capabilities": {},
      "clientInfo": {"name": "my-agent", "version": "1.0.0"}
    }
  }'

List available tools

curl -X POST https://mcp.data-magik.com/mcp \
  -H 'Authorization: Bearer dm_pat_...' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'

Returns 150+ tools across 16 families. Highlights below.

Tool families

Click a family to see every tool it exposes.

tenant 3 tools

Multi-tenant context. See which company you're acting as, list the companies you can access, and switch the active tenant.

tenant_current Show the active tenant (company) all actions currently affect
tenant_list List every company your account can act as
tenant_switch Switch the active tenant to another company you can access
plex 12 actions

Plex SQL schema browsing + validation (read-only)

One tool — call plex with an action parameter set to one of:

list_databaseslist_tablessearch_tablessearch_columnsget_tablefind_relationshipssearchdescribesummaryneighborhoodvalidate_sqljoin_path
plex_api 4 actions

Plex Connect REST API discovery (read-only)

One tool — call plex_api with an action parameter set to one of:

list_productssearchget_productdescribe
scripts 14 actions

Script Engine: authoring, execution, and version management

One tool — call scripts with an action parameter set to one of:

get_api_referencelistcreategetupdatedeleteexecutetest_runget_execution_statuslist_executionswait_for_executionlist_versionscreate_versionvalidate_syntax
schedules 10 actions

Script schedules: cron-based scheduling of scripts

One tool — call schedules with an action parameter set to one of:

listcreategetupdatedeletetogglehistoryvalidate_cronrun_nowcancel_queue
credentials 4 actions

Company-wide script credentials (values scrubbed/encrypted)

One tool — call credentials with an action parameter set to one of:

listcreateupdatedelete
allowed_domains 3 actions

Script HTTP domain whitelist

One tool — call allowed_domains with an action parameter set to one of:

listaddremove
sql 8 actions

SQL/ODBC query editor

One tool — call sql with an action parameter set to one of:

list_queriescreate_queryget_queryupdate_querydelete_queryexecutetest_runget_execution_status
local_db 8 actions

Local SQL databases (PostgreSQL/MySQL/SQL Server on the customer's network via the connector agent)

One tool — call local_db with an action parameter set to one of:

list_connectionslist_tablesdescribe_tablequerycreateupdatedeletetest
bridge 7 actions

API bridge: registered local HTTP resources reachable through the connector agent. Each resource is a base_url allowlist root with allowed methods

One tool — call bridge with an action parameter set to one of:

listgetcreateupdatedeletetestcall
ftp_connectors 7 actions

FTP/SFTP/FTPS connectors reached through the connector agent

One tool — call ftp_connectors with an action parameter set to one of:

listgetcreateupdatedeletetesttoggle
filesystem_connectors 6 actions

Filesystem connectors (a base path on the connector host / a mounted share)

One tool — call filesystem_connectors with an action parameter set to one of:

listgetcreateupdatedeletetoggle
connector_agents 8 actions

Connector agents and sites

One tool — call connector_agents with an action parameter set to one of:

liststatussites_listsite_createsite_deletegenerate_tokendeleteupdate_site
lookup_tables 6 actions

Lookup table definitions + runtime lookups

One tool — call lookup_tables with an action parameter set to one of:

listcreategetupdatedeleteby_key
lookup_entries 4 actions

Lookup table entries: add, bulk_add, update, delete

One tool — call lookup_entries with an action parameter set to one of:

addbulk_addupdatedelete
documentation 5 actions

Documentation pages: list, get, create, update, delete

One tool — call documentation with an action parameter set to one of:

listgetcreateupdatedelete
doc_templates 14 actions

Document templates: core lifecycle + discovery

One tool — call doc_templates with an action parameter set to one of:

listgetget_editorcreateduplicatedeleteupdate_typegeneration_optionslist_generatedzpl_list_serieszpl_series_examplezpl_list_lookup_tableszpl_lookup_datazpl_lookup_by_key
doc_templates_authoring 7 actions

Author a document template's content

One tool — call doc_templates_authoring with an action parameter set to one of:

authorpatchcommitdraft_listdraft_getdraft_deletedraft_save
doc_templates_versions 14 actions

Template version lifecycle, branches, and history

One tool — call doc_templates_versions with an action parameter set to one of:

listgetactivateinactivatereactivatedeleterollbacklist_branchesbranch_createbranch_mergebranch_deletechangelogcompareaudit
doc_templates_settings 10 actions

Document-template settings + company defaults + categories

One tool — call doc_templates_settings with an action parameter set to one of:

get_settingsupdate_settingsset_header_footerget_company_defaultsupdate_company_defaultslist_header_footerget_company_header_footerupdate_company_header_footerlist_categoriescreate_category
doc_templates_export 9 actions

Custom-export (CSV/Excel/XML/JSON/fixed-width) config + simple-text

One tool — call doc_templates_export with an action parameter set to one of:

get_configupdate_configpreviewdiscover_fieldsget_draftget_versionlist_branchesupdate_simple_text_configpreview_simple_text
doc_templates_generate 6 actions

Render + deliver generated documents

One tool — call doc_templates_generate with an action parameter set to one of:

generatepreviewpreview_chromedpstatusgenerated_getpublic_get
doc_templates_approval 5 actions

Approval workflow to promote a template version from 'dev' to production 'main' (works for HTML documents AND custom-export configs)

One tool — call doc_templates_approval with an action parameter set to one of:

requestlistapproverejectwithdraw
apps 16 actions

App Designer: app lifecycle, authoring, and discovery

One tool — call apps with an action parameter set to one of:

listcreategetupdatedeleteget_componentlist_data_flowspatchauthorlist_templatesget_templatelist_examplesinstall_exampleget_menu_treelist_user_appsby_screen_context
apps_versions 8 actions

App Designer version lifecycle

One tool — call apps_versions with an action parameter set to one of:

listgetsave_versioncomparechangelogrollback_versionpublish_spaspa_manifest
apps_approvals 5 actions

App Designer approval workflow (draft → approve → publish)

One tool — call apps_approvals with an action parameter set to one of:

requestapproverejectwithdrawlist
apps_execution 7 actions

App Designer runtime: headless runs, execution logs, permissions

One tool — call apps_execution with an action parameter set to one of:

run_componentpreview_runtime_valueslist_logsget_loglog_statsverify_permissionlist_permissions
apps_data 4 actions

App Designer grid data writes + capture references

One tool — call apps_data with an action parameter set to one of:

import_rowssave_table_rowcapture_readcapture_write
apps_reports 9 actions

App Designer non-email report outputs + serial/print bridge

One tool — call apps_reports with an action parameter set to one of:

rendergrid_pdfexport_excelserial_previewserial_generateserial_generate_batchprint_submitprint_statusprint_list_printers
apps_menu_links 8 actions

App Designer menu folders + app↔automation-action links

One tool — call apps_menu_links with an action parameter set to one of:

folder_listfolder_createfolder_updatefolder_deletelink_listlink_createlink_updatelink_delete
automations 10 actions

Automations: parent lifecycle, screens, execution, and picker/table lookups

One tool — call automations with an action parameter set to one of:

listcreategetdeleteadd_screenlist_screensexecuteget_execution_statusaction_tablespickers
automations_actions 5 actions

Automation

One tool — call automations_actions with an action parameter set to one of:

creategetupdatedeletelist
automations_questions 5 actions

Automation questions: prompts shown to users before execution

One tool — call automations_questions with an action parameter set to one of:

listcreateupdatedeletechoices
dashboards 10 actions

Dashboards: lifecycle, settings, versioning, and discovery

One tool — call dashboards with an action parameter set to one of:

listcreategetupdatedeleteupdate_settingstoggleget_versionexportby_screen_context
dashboards_data 4 actions

Dashboard data: execute data sources and author webhook sources

One tool — call dashboards_data with an action parameter set to one of:

get_dataget_element_datatest_webhooklist_credentials
dashboard_links 4 actions

Dashboard ↔ automation-action links (screen-context launch)

One tool — call dashboard_links with an action parameter set to one of:

listcreateupdatedelete
product_pages 5 actions

Marketing-site product pages (Admin only)

One tool — call product_pages with an action parameter set to one of:

listgetcreateupdatedelete
blogs 5 actions

Marketing-site blog posts (Admin only)

One tool — call blogs with an action parameter set to one of:

listgetcreateupdatedelete
contacts 6 actions

Inbound contact submissions (Admin only)

One tool — call contacts with an action parameter set to one of:

listgetmark_readmark_spamset_statusdelete
pricing_leads 4 actions

Inbound pricing/demo leads (Admin only)

One tool — call pricing_leads with an action parameter set to one of:

listgetmark_converteddelete
website_content 7 actions

Rich authoring loop for marketing-site content — product pages, blog posts, docs (Admin only)

One tool — call website_content with an action parameter set to one of:

product_patchblog_patchdocs_patchproduct_authorblog_authordocs_authordesign_system
email 5 actions

Email sending + delivery for the ACTIVE tenant

One tool — call email with an action parameter set to one of:

send_with_templatesendsend_statushistoryprofiles_list
email_templates 7 actions

Manage reusable, managed email templates for the ACTIVE tenant

One tool — call email_templates with an action parameter set to one of:

listgetcreateupdatedeleteduplicatesend_test
usage 3 tools

Usage reporting: current-period usage and metrics over time.

usage_current Current billing-period usage for the active tenant
usage_metrics Usage metrics over a time range
usage_dashboard_data Aggregated data for the usage dashboard

Write-tool approval flow

Tools that mutate state (anything with verbs like _create / _update / _delete) are recorded to the ai_audit_log table with the calling user_id, company_id, tool name, arguments, and outcome. Tools called from the in-product chat additionally require the user to click Approve on a preview card before they execute. External MCP clients do not get the preview UI — the audit log is the authoritative record.

Discovery

A discovery document is published at /.well-known/mcp:

curl https://mcp.data-magik.com/.well-known/mcp

Returns the endpoint URL, transport name, auth scheme, and a pointer to this docs page. MCP-aware clients can use this for auto-configuration.

Compatibility

Need help?

The companion in-product AI assistant uses this same MCP server. If you can't get a tool call working, ask the in-product chat — it has access to the same tools and can debug alongside you.