Overview
Datafold provides a public HTTP MCP (Model Context Protocol) server that enables AI assistants to interact with your Datafold data sources, run queries, and manage data diffs. Endpoint:https://app.datafold.com/mcp/v1
Prerequisites
Before setting up the MCP server, you need a Datafold API key.If you lose your API key, you’ll need to generate a new one. See the Introduction guide for more details.
Authentication
The MCP server uses Bearer token authentication with your Datafold API key:Setup by Client
Claude Desktop
Claude Desktop
Claude Desktop supports remote MCP servers through its Connectors feature.Steps:
- Open Claude Desktop
- Go to Settings > Connectors
- Click Add Connector or New Remote Server
- Configure the connector:
- Name: Datafold
- URL:
https://app.datafold.com/mcp/v1 - Headers:
- Save and restart Claude Desktop
Claude Desktop will not connect to remote servers configured via
claude_desktop_config.json. Use the Connectors interface.Claude Code
Claude Code
Claude Code supports MCP through a simple CLI command.Quick Setup:Run the following command in your terminal:Options:The Datafold MCP server will now be available in all your Claude Code sessions.
--scope user- Makes the server available across all projects--header- Adds authentication header
See the Claude Code MCP documentation for more configuration options.
Cursor
Cursor
Cursor supports MCP servers through project-specific or global configuration.Project-Specific Setup:Create Restart Cursor to load the configuration.
.cursor/mcp.json in your project directory:VS Code with Cline
VS Code with Cline
Cline is a VS Code extension that supports MCP servers.Steps:
- Install the Cline extension
- Click the MCP Servers icon in Cline’s navigation
- Select Configure tab → Advanced MCP Settings
- Add to
cline_mcp_settings.json:
- Toggle the switch to enable the server
- Close and reopen VS Code
Windsurf
Windsurf
Windsurf supports environment variable interpolation for secure credential storage.Configuration File: Using Environment Variables (Recommended):Set
~/.codeium/windsurf/mcp_config.jsonBasic Configuration:DATAFOLD_API_KEY as an environment variable, then restart Windsurf.Continue.dev
Continue.dev
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
Zed
Zed supports MCP through custom configuration in settings.Steps:
- Open Zed
- Go to Preferences > Settings (
⌘,on macOS) - Add a
context_serverssection:
- Check the Agent Panel - the indicator should be green when active
OpenCode
OpenCode
OpenCode supports both local and remote MCP servers with automatic OAuth handling.Configuration Files:CLI Setup:
You can also use the interactive CLI to add the server:Then follow the prompts to configure the Datafold remote MCP server.
- Global:
~/.config/opencode/opencode.json - Project:
opencode.jsonin project root (overrides global)
See the OpenCode MCP documentation for advanced configuration.
Gemini CLI
Gemini CLI
Gemini CLI supports MCP servers with built-in OAuth 2.0 authentication.Configuration Files:Manual Configuration:Edit your settings file:
- Global:
~/.gemini/settings.json - Project:
.gemini/settings.jsonin project directory
See the Gemini CLI MCP documentation for OAuth and advanced features.
Kiro
Kiro
Kiro supports both global and project-specific MCP configuration.Global Configuration:Edit Project-Specific Configuration:Edit Changes apply automatically when you save the file.
~/.kiro/settings/mcp.json:.kiro/settings/mcp.json in your project directory with the same format.Using Environment Variables (Recommended):See the Kiro MCP documentation for advanced options.
Verification
After configuring your MCP client, verify the connection:- Check that the server status shows as “active” or “connected”
- Test with a simple query:
- “List my Datafold data sources”
- “Run a query against [data source name]”
Troubleshooting
Connection Errors
Connection Errors
Symptoms: “Unable to connect to MCP server” or “No valid session ID”Solutions:
- Verify your API key is valid
- Confirm the URL is exactly
https://app.datafold.com/mcp/v1 - Check header format:
Authorization: Key YOUR_API_KEY - Regenerate your API key if issues persist
Authentication Errors
Authentication Errors
Symptoms: “401 Unauthorized” or “403 Forbidden”Solutions:
- Generate a new API key if needed
- Verify the header uses
Keyprefix (notBearer) - Check your API key hasn’t been revoked
Server Not Loading
Server Not Loading
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:- Check the Datafold documentation
- Review your MCP client’s documentation
- Contact support via Slack, in-app chat, or [email protected]
