Skip to main content

MCP Guide

The Daspire MCP Gateway lets AI assistants inspect connector specs, prepare pipeline and Reverse ETL changes, run syncs, and review approvals through the Daspire Control API.

Example local configuration:

{
"mcpServers": {
"daspire": {
"command": "node",
"args": ["/path/to/daspire-mcp/bin/daspire-mcp.js"],
"env": {
"DASPIRE_API_BASE_URL": "https://api.daspire.com/daspire/api/control/v1",
"DASPIRE_TOKEN": "<user-session-token>"
}
}
}
}

Tools

  • daspire_list_workspaces
  • daspire_list_connectors
  • daspire_list_sources
  • daspire_update_source
  • daspire_set_odbc_sql_streams
  • daspire_rename_source
  • daspire_delete_source
  • daspire_list_pipelines
  • daspire_list_connections
  • daspire_delete_connection
  • daspire_get_connector_spec
  • daspire_get_source_oauth_consent_url
  • daspire_complete_source_oauth
  • daspire_prepare_pipeline
  • daspire_apply_pipeline
  • daspire_list_reverse_etl_models
  • daspire_apply_reverse_etl_model
  • daspire_delete_reverse_etl_model
  • daspire_list_reverse_etl_destinations
  • daspire_apply_reverse_etl_destination
  • daspire_delete_reverse_etl_destination
  • daspire_list_reverse_etl_activations
  • daspire_prepare_reverse_etl_activation
  • daspire_apply_reverse_etl_activation
  • daspire_delete_reverse_etl_activation
  • daspire_run_reverse_etl_activation
  • daspire_get_reverse_etl_run
  • daspire_run_sync
  • daspire_get_job
  • daspire_list_approvals
  • daspire_list_approval_policies
  • daspire_approve_change
  • daspire_reject_change

MCP write tools create approval proposals by default. Workspace administrators can turn approval on or off per MCP action category in Workspace Settings > Approval. Pass execution_mode: "proposal" when you explicitly want a proposal even for a category that allows direct execution.

Use daspire_rename_source for source display-name changes. The Control API preserves the existing source connectionConfiguration before applying the rename so a name-only patch does not clear connector configuration. For Amazon Ads regional rename work, include source_identifier to update connectionConfiguration.source_name at the same time:

{
"source_id": "source_123",
"name": "Ads CLEVAST Amazon EU",
"source_identifier": "CLEVAST Amazon EU",
"execution_mode": "proposal"
}

Delete connections before deleting their source. daspire_delete_source rejects sources that still have associated connections and returns a post-delete verification result after execution. Delete requests follow the workspace approval policy for the relevant MCP category.

ODBC Custom SQL Streams

Use daspire_set_odbc_sql_streams to switch an existing ODBC source into Custom SQL mode and replace its SQL stream definitions. The tool writes source_mode: "custom_sql" and sql_streams into the source configuration while preserving the rest of the source configuration through the Control API partial-update path.

Each stream requires a name and a read-only SELECT or WITH query. namespace is optional. primary_key may be a single column string or an array of column strings; the MCP gateway normalizes it to the array format used by the ODBC connector.

{
"source_id": "source_123",
"streams": [
{
"name": "netsuite_may_transactions",
"namespace": "NetSuite2",
"query": "SELECT id, tranid, trandate FROM transaction WHERE trandate >= '2026-05-01' AND trandate < '2026-06-01'",
"primary_key": "id"
}
],
"execution_mode": "proposal"
}

The gateway rejects empty stream lists, duplicate namespace.name keys, multi-statement SQL, and common write/DDL verbs before sending the proposal. The ODBC connector runtime still performs the final SQL validation when the source is discovered or synced.

Connector OAuth

Use daspire_get_connector_spec first to inspect whether a source requires OAuth. For source connectors such as PayPal and QuickBooks, daspire_get_source_oauth_consent_url returns the provider authorization URL through the Daspire Control API. After the provider redirects back to Daspire, pass the callback payload to daspire_complete_source_oauth.

The completion tool returns a Daspire credential_handle; provider tokens are stored by Daspire and are not returned to the MCP client. Use that handle when creating or updating the source configuration.

MCP only exposes OAuth flows that are available through the Daspire Control API. Legacy runtime OAuth endpoints are internal compatibility details and are not part of the public MCP surface.

Example consent request:

{
"payload": {
"workspaceId": "workspace_uuid",
"sourceDefinitionId": "source_definition_uuid",
"redirectUrl": "https://app.daspire.com/auth_flow",
"oAuthInputConfiguration": {}
}
}

Example completion request:

{
"payload": {
"workspaceId": "workspace_uuid",
"sourceDefinitionId": "source_definition_uuid",
"queryParams": {
"code": "provider_code",
"state": "provider_state"
},
"redirectUrl": "https://app.daspire.com/auth_flow"
}
}

Example source credential reference after completion:

{
"connector_id": "source_definition_uuid",
"name": "PayPal transactions",
"credential_handle": "cred_source_oauth_abc123",
"configuration": {
"start_date": "2026-01-01"
}
}

Reverse ETL Configuration

Reverse ETL configuration is split into three resources:

  • Models select a source table or view and define the fields, primary key, and optional cursor.
  • Destinations define the operational target such as http or clickup.
  • Activations connect a model to a destination, define field mappings, schedule behavior, and compile the underlying sync connection.

Create or update a model with daspire_apply_reverse_etl_model:

{
"payload": {
"name": "Warehouse customers",
"source_id": "source_123",
"stream_namespace": "analytics",
"stream_name": "customers",
"selected_fields": ["id", "email", "company"],
"primary_key": "id",
"cursor_field": "updated_at"
}
}

Create or update a destination with daspire_apply_reverse_etl_destination. Do not send provider secrets through MCP; use Daspire secure credential entry or OAuth and reference the resulting credential_handle.

{
"payload": {
"name": "ClickUp customer list",
"type": "clickup",
"credential_handle": "cred_123",
"configuration": {
"workspace_id": "901",
"list_id": "456"
}
}
}

Create or update an activation with daspire_apply_reverse_etl_activation:

{
"payload": {
"name": "Customer updates to ClickUp",
"model_id": "revmdl_123",
"destination_id": "revdst_123",
"external_key_field": "email",
"field_mappings": {
"name": "company",
"email": "email"
},
"schedule_type": "manual",
"status": "active"
}
}

Include model_id, destination_id, or activation_id in the payload to update an existing resource. Use daspire_prepare_reverse_etl_activation to preview the compiled activation payload before creating an approval, daspire_run_reverse_etl_activation to trigger a manual run, and daspire_get_reverse_etl_run to inspect run status.