Skip to main content

Overview

Endpoint: https://us.datafold.com/mcp Use the host you log in to: us.datafold.com, eub.datafold.com, or your dedicated or customer-hosted domain. The examples on this page use us.datafold.com.

Connect with OAuth

Add the server URL to your client, then follow its sign-in prompts.
  • Claude Code: claude mcp add --transport http datafold https://us.datafold.com/mcp
  • Claude (claude.ai or Claude Desktop): add a custom connector with the URL https://us.datafold.com/mcp.
To revoke a client’s access, go to Settings > Account > Authorized OAuth apps.
OAuth sign-in needs your Datafold host to be served over HTTPS. It is not available when Datafold runs in Databricks Apps. Where OAuth is not available, use an API key.

Connect with an API key

Use an API key for MCP clients that do not support OAuth.

Prerequisites

1

Navigate to Settings

Open the Datafold app and go to Settings > Account > API keys
2

Create API Key

Click Create API Key and store it securely
If you lose your API key, you’ll need to generate a new one. See the Introduction guide for more details.

Authentication

Send your API key as a Bearer token to https://us.datafold.com/mcp/ (with the trailing slash):
The Key YOUR_API_KEY format used by the REST API is also accepted. Include this header in your MCP client configuration.

Setup by Client

Run the following command in your terminal:
Options:
  • --scope user - Makes the server available across all projects
  • --header - Adds authentication header
Cursor supports MCP servers through project-specific or global configuration.Project-Specific Setup:Create .cursor/mcp.json in your project directory:
Restart Cursor to load the configuration.
Cline is a VS Code extension that supports MCP servers.Steps:
  1. Install the Cline extension
  2. Click the MCP Servers icon in Cline’s navigation
  3. Select Configure tab → Advanced MCP Settings
  4. Add to cline_mcp_settings.json:
  1. Toggle the switch to enable the server
  2. Close and reopen VS Code
Windsurf supports environment variable interpolation for secure credential storage.Configuration File: ~/.codeium/windsurf/mcp_config.jsonBasic Configuration:
Using Environment Variables (Recommended):
Set DATAFOLD_API_KEY as an environment variable, then restart Windsurf.
Continue.dev supports MCP in agent mode through YAML configuration.Configuration Directory: .continue/mcpServers/Create datafold.yaml:
MCP can only be used in agent mode within Continue.dev.
Zed supports MCP through custom configuration in settings.Steps:
  1. Open Zed
  2. Go to Preferences > Settings (⌘, on macOS)
  3. Add a context_servers section:
  1. Check the Agent Panel - the indicator should be green when active
OpenCode supports both local and remote MCP servers.Configuration Files:
  • Global: ~/.config/opencode/opencode.json
  • Project: opencode.json in project root (overrides global)
Remote MCP Configuration:
CLI Setup: You can also use the interactive CLI to add the server:
Then follow the prompts to configure the Datafold remote MCP server.
See the OpenCode MCP documentation for advanced configuration.
Gemini CLI supports remote MCP servers.Configuration Files:
  • Global: ~/.gemini/settings.json
  • Project: .gemini/settings.json in project directory
Add via CLI (Recommended):
Manual Configuration:Edit your settings file:
See the Gemini CLI MCP documentation for advanced features.
Kiro supports both global and project-specific MCP configuration.Global Configuration:Edit ~/.kiro/settings/mcp.json:
Project-Specific Configuration:Edit .kiro/settings/mcp.json in your project directory with the same format.Using Environment Variables (Recommended):
Changes apply automatically when you save the file.
See the Kiro MCP documentation for advanced options.

Troubleshooting

Symptoms: “Unable to connect to MCP server” or “No valid session ID”Solutions:
  • If you use an API key, verify it is valid
  • Confirm the URL is your Datafold host followed by /mcp for OAuth sign-in (https://us.datafold.com/mcp) or /mcp/ with an API key (https://us.datafold.com/mcp/)
  • Check header format: Authorization: Bearer YOUR_API_KEY
  • Regenerate your API key if issues persist
Symptoms: The consent page refuses the request, or the client connects to the wrong organizationSolutions:
  • Check that MCP is enabled for your organization and that your account is active
  • Sign in with the account of the organization you want. On the consent page, click Use a different account to switch
  • To start over, revoke the app under Settings > Account > Authorized OAuth apps, then sign in again from your client
Symptoms: “401 Unauthorized” or “403 Forbidden”Solutions:
  • Generate a new API key if needed
  • Verify the header is Authorization: Bearer YOUR_API_KEY (Key YOUR_API_KEY also works)
  • Check your API key hasn’t been revoked
Symptoms: MCP server doesn’t appear or shows as inactiveSolutions:
  • Restart your MCP client completely
  • Validate JSON/YAML syntax
  • Check client logs for specific errors
  • Ensure configuration file is in the correct location

Best Practices

Secure Your Keys

Never commit API keys to version control. Use environment variables or secure secret management.

Use Environment Variables

Reference API keys through environment variables rather than hardcoding them in configuration files.

Monitor Usage

Regularly check Datafold audit logs to monitor API usage and detect anomalies.

Rotate Keys

Periodically rotate your API keys as part of security best practices.

Additional Resources

API Introduction

Learn more about Datafold’s REST API

Model Context Protocol

Official MCP specification

Data Sources API

Explore data source endpoints

Data Diffs API

Learn about data diff operations

Support

If you need assistance: