coalesce-transform-mcp
v0.3.0
Published
MCP server for the Coalesce Transform API; run tools support Snowflake Key Pair auth only
Maintainers
Readme
coalesce-transform-mcp
MCP server for the Coalesce Transform API. Connect AI assistants like Claude, Cursor, or Windsurf to your Coalesce workspace to manage nodes, pipelines, environments, jobs, runs, and more.
Quick Start
1. Set your access token in ~/.zshrc or ~/.bashrc:
export COALESCE_ACCESS_TOKEN="your-token-here"Generate a token from the Deploy tab in your Coalesce workspace (docs).
2. Add to your MCP client config:
| Client | Config file |
| ------ | ----------- |
| Claude Code | .mcp.json in project root (or ~/.claude.json for global) |
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Cursor | .cursor/mcp.json in project root |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
Claude Code (.mcp.json):
{
"coalesce-transform": {
"command": "npx",
"args": ["coalesce-transform-mcp"],
"env": {
"COALESCE_ACCESS_TOKEN": "${COALESCE_ACCESS_TOKEN}"
}
}
}Claude Desktop, Cursor, Windsurf — same thing, wrapped in "mcpServers":
{
"mcpServers": {
"coalesce-transform": {
"command": "npx",
"args": ["coalesce-transform-mcp"],
"env": {
"COALESCE_ACCESS_TOKEN": "${COALESCE_ACCESS_TOKEN}"
}
}
}
}The server defaults to the US region. See Environment Variables if you need to change the region, enable run tools, or configure repo-backed features.
Never hardcode credentials in config files tracked by git. The
${VAR}syntax pulls values from your shell environment.
Requirements
- Node.js >= 22.0.0
- A Coalesce account with a workspace and access token
- An MCP-compatible AI client
- For run tools only: Snowflake key pair authentication (see below)
Environment Variables
Only COALESCE_ACCESS_TOKEN is required. Everything else is optional.
| Variable | Description | Default |
| -------- | -------- | -------- |
| COALESCE_ACCESS_TOKEN | Required. Bearer token from the Coalesce Deploy tab. | — |
| COALESCE_BASE_URL | Region-specific base URL. | https://app.coalescesoftware.io (US) |
| COALESCE_ORG_ID | Fallback org ID for cancel-run. | — |
| COALESCE_REPO_PATH | Local repo root for repo-backed tools and pipeline planning. | — |
| COALESCE_MCP_AUTO_CACHE_MAX_BYTES | JSON size threshold before auto-caching to disk. | 32768 |
| COALESCE_MCP_MAX_REQUEST_BODY_BYTES | Max outbound API request body size. | 524288 |
Snowflake (for run tools only)
Required for start_run, retry_run, run_and_wait, and retry_and_wait. The server starts without them — they're validated when you first use a run tool.
| Variable | Required | Description |
| -------- | -------- | -------- |
| SNOWFLAKE_USERNAME | Yes | Snowflake account username |
| SNOWFLAKE_KEY_PAIR_KEY | Yes | Path to PEM-encoded private key |
| SNOWFLAKE_KEY_PAIR_PASS | No | Passphrase for encrypted keys |
| SNOWFLAKE_WAREHOUSE | Yes | Snowflake compute warehouse |
| SNOWFLAKE_ROLE | Yes | Snowflake user role |
To use optional variables, add them to your shell profile and pass them through in your MCP config. Here's a full example with everything enabled:
~/.zshrc:
export COALESCE_ACCESS_TOKEN="your-token-here"
export COALESCE_BASE_URL="https://app.eu.coalescesoftware.io"
export COALESCE_REPO_PATH="/path/to/local/coalesce-repo"
export SNOWFLAKE_USERNAME="your-username"
export SNOWFLAKE_KEY_PAIR_KEY="/path/to/snowflake_key.pem"
export SNOWFLAKE_KEY_PAIR_PASS="your-passphrase"
export SNOWFLAKE_WAREHOUSE="your-warehouse"
export SNOWFLAKE_ROLE="your-role".mcp.json:
{
"coalesce-transform": {
"command": "npx",
"args": ["coalesce-transform-mcp"],
"env": {
"COALESCE_ACCESS_TOKEN": "${COALESCE_ACCESS_TOKEN}",
"COALESCE_BASE_URL": "${COALESCE_BASE_URL}",
"COALESCE_REPO_PATH": "${COALESCE_REPO_PATH}",
"SNOWFLAKE_USERNAME": "${SNOWFLAKE_USERNAME}",
"SNOWFLAKE_KEY_PAIR_KEY": "${SNOWFLAKE_KEY_PAIR_KEY}",
"SNOWFLAKE_KEY_PAIR_PASS": "${SNOWFLAKE_KEY_PAIR_PASS}",
"SNOWFLAKE_WAREHOUSE": "${SNOWFLAKE_WAREHOUSE}",
"SNOWFLAKE_ROLE": "${SNOWFLAKE_ROLE}"
}
}
}Only include the variables you need — the Quick Start config with just COALESCE_ACCESS_TOKEN is enough to get started.
Tool Reference
⚠️ = Destructive operation
API Tools
Coalesce Platform Tools: manage workspaces, environments, projects, runs, and other platform resources.
Environments
list_environments- List all available environmentsget_environment- Get details of a specific environmentcreate_environment- Create a new environment within a projectupdate_environment- Update an existing environmentdelete_environment- Delete an environment ⚠️
Workspaces
list_workspaces- List all workspacesget_workspace- Get details of a specific workspace
Nodes
list_environment_nodes- List nodes in an environmentlist_workspace_nodes- List nodes in a workspaceget_environment_node- Get a specific environment nodeget_workspace_node- Get a specific workspace nodeset_workspace_node- Replace a workspace node with a full bodyupdate_workspace_node- Safely update selected fields of a workspace nodedelete_workspace_node- Delete a node from a workspace ⚠️
Jobs
list_environment_jobs- List all jobs for an environmentlist_workspace_jobs- List all jobs for a workspacecreate_workspace_job- Create a job in a workspace with node include/exclude selectorsget_environment_job- Get details of a specific job (via environment)update_workspace_job- Update a job's name and node selectorsdelete_workspace_job- Delete a job ⚠️
Subgraphs
list_workspace_subgraphs- List subgraphs in a workspaceget_workspace_subgraph- Get details of a specific subgraphcreate_workspace_subgraph- Create a subgraph to group nodes visuallyupdate_workspace_subgraph- Update a subgraph's name and node membershipdelete_workspace_subgraph- Delete a subgraph (nodes are NOT deleted) ⚠️
Runs
diagnose_run_failure- Diagnose a failed run with error classification, root-cause analysis, and actionable fix suggestionslist_runs- List runs with optional filtersget_run- Get details of a specific runget_run_results- Get results of a completed runstart_run- Start a new run; requires Snowflake Key Pair auth (credentials from env vars)run_status- Check status of a running jobretry_run- Retry a failed run; requires Snowflake Key Pair auth (credentials from env vars)cancel_run- Cancel a running job (requiresrunIDandenvironmentID;orgIDmay come fromCOALESCE_ORG_ID) ⚠️
Projects
list_projects- List all projectsget_project- Get project detailscreate_project- Create a new projectupdate_project- Update a projectdelete_project- Delete a project ⚠️
Git Accounts
list_git_accounts- List all git accountsget_git_account- Get git account detailscreate_git_account- Create a new git accountupdate_git_account- Update a git accountdelete_git_account- Delete a git account ⚠️
Users
list_org_users- List all organization usersget_user_roles- Get roles for a specific userlist_user_roles- List all user rolesset_org_role- Set organization role for a userset_project_role- Set project role for a userdelete_project_role- Remove project role from a user ⚠️set_env_role- Set environment role for a userdelete_env_role- Remove environment role from a user ⚠️
Intelligent Tools
Custom logic built on top of the API: pipeline planning, config completion, join analysis, workspace analysis, and more.
Node Creation and Configuration
create_workspace_node_from_scratch- Create a workspace node with no predecessors, apply fields to the requested completion level, and run automatic config completioncreate_workspace_node_from_predecessor- Create a node from predecessor nodes, verify column coverage, suggest join columns, and run automatic config completionreplace_workspace_node_columns- Replacemetadata.columnswholesale and optionally apply additional changes for complex column rewritesconvert_join_to_aggregation- Convert a join-style node into an aggregated fact-style node with generated JOIN/GROUP BY analysisapply_join_condition- Auto-generate and write a FROM/JOIN/ON clause for a multi-predecessor nodecreate_node_from_external_schema- Create a workspace node whose columns match an existing warehouse table or external schemacomplete_node_configuration- Intelligently complete a node's configuration by analyzing context and applying best-practice ruleslist_workspace_node_types- List distinct node types observed in current workspace nodesanalyze_workspace_patterns- Analyze workspace nodes to detect package adoption, pipeline layers, methodology, and generate recommendations
Pipeline Planning and Execution
plan_pipeline- Plan a pipeline from SQL or a natural-language goal without mutating the workspace; ranks best-fit node types from the local repocreate_pipeline_from_plan- Execute an approved pipeline plan using predecessor-based creationcreate_pipeline_from_sql- Plan and create a pipeline directly from SQLbuild_pipeline_from_intent- Build a pipeline from a natural language goal with automatic entity resolution and node type selectionreview_pipeline- Analyze an existing pipeline for redundant nodes, missing joins, layer violations, naming issues, and optimization opportunities
Pipeline Workshop
pipeline_workshop_open- Open an iterative pipeline builder session with workspace context pre-loadedpipeline_workshop_instruct- Send a natural language instruction to modify the current workshop planpipeline_workshop_status- Get the current state of a workshop sessionpipeline_workshop_close- Close a workshop session and release resources
Repo-Backed Node Types and Templates
list_repo_packages- Inspect a committed local Coalesce repo and list package aliases plus enabled node-type coverage frompackages/*.ymllist_repo_node_types- List exact resolvable committed node-type identifiers fromnodeTypes/, optionally scoped to one package alias or currently in-use typesget_repo_node_type_definition- Resolve one exact committed node type from a local repo and return its outer definition plus raw and parsedmetadata.nodeMetadataSpecgenerate_set_workspace_node_template- Generate a YAML-friendlyset_workspace_nodebody template from either a raw definition object or an exact committed repo definition resolved byrepoPathorCOALESCE_REPO_PATH
Node Type Corpus
search_node_type_variants- Search the committed node-type corpus snapshot by normalized family, package, primitive, or support statusget_node_type_variant- Load one exact node-type corpus variant by variant keygenerate_set_workspace_node_template_from_variant- Generate aset_workspace_nodebody template from a committed corpus variant without needing the original external source repo at runtime; partial variants are rejected unlessallowPartial=true
Cache and Snapshots
cache_workspace_nodes- Fetch every page of workspace nodes, write the full snapshot tocoalesce_transform_mcp_data_cache/nodes/, and return only cache metadatacache_environment_nodes- Fetch every page of environment nodes, write the full snapshot tocoalesce_transform_mcp_data_cache/nodes/, and return only cache metadatacache_runs- Fetch every page of run results, write the full snapshot tocoalesce_transform_mcp_data_cache/runs/, and return only cache metadatacache_org_users- Fetch every page of organization users, write the full snapshot tocoalesce_transform_mcp_data_cache/users/, and return only cache metadataclear_data_cache- Delete all cached snapshots, auto-cached responses, and plan summaries undercoalesce_transform_mcp_data_cache/⚠️
Workflows
run_and_wait- Start a run and poll until completion; requires Snowflake Key Pair authretry_and_wait- Retry a failed run and poll until completion; requires Snowflake Key Pair authget_run_details- Get run metadata and results in one callget_environment_overview- Get environment details with full node list
Snowflake Exploration via Cortex Code
This server manages node definitions, not live warehouse data. For Snowflake data questions (tables, schemas, row counts, sample data, permissions), add Cortex Code as a companion MCP server. The agent will automatically route Snowflake questions to cortex tools.
Setup:
Install Cortex Code and configure a Snowflake connection:
curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh cortex connections # interactive connection setupAdd cortex as an MCP server in your
.mcp.json:{ "cortex": { "command": "cortex", "args": ["--mcp-server"] } }
The agent will see both servers' tools and route Snowflake data questions to cortex and node/pipeline questions to Coalesce tools.
Notes
- Caching: Large responses are auto-cached to disk. Use
cache_workspace_nodesand similar tools when you want a reusable snapshot. Configure the threshold withCOALESCE_MCP_AUTO_CACHE_MAX_BYTES. - Repo-backed tools: Set
COALESCE_REPO_PATHto your local Coalesce repo root (containingnodeTypes/,nodes/,packages/) or passrepoPathon individual tool calls. The server does not clone repos or install packages. - SQL override is disallowed. Nodes are built via YAML/config (columns, transforms, join conditions), not raw SQL. Template generation strips
overrideSQLToggle, and write helpers rejectoverrideSQLfields.
Links
License
MIT
