Operating MCP Servers
Datafuse acts as a high-performance hosting middleware for Model Context Protocol (MCP) servers. You can deploy both local and remote MCP servers, routing their tools and resources securely through the Datafuse vault.
Architecture of Hosted MCP
When you host an MCP server inside Datafuse, the platform wraps the server process, handles the JSON-RPC over Stdio or SSE (Server-Sent Events) communication channel, and exposes it as a secure integration.
1. Registering an MCP Server
You can register a custom MCP server inside Datafuse by adding it to your workspace via the developer console or writing an integration YAML mapping.
Here is an example definition for an MCP server that runs local shell tools (apify_mcp.yaml):
key: apify_mcp
title: Apify MCP Server
description: Run scrapers and extract data from any website using Apify Actors.
category: Data & Analytics
runtime_type: mcp
metadata:
command: npx
args:
- -y
- "@apify/mcp-server"
env:
APIFY_TOKEN: "your_apify_api_token_here"
2. Managing Server Processes
Datafuse includes an active process supervisor designed to ensure high availability for your MCP runtime engines:
- Auto-Healing Processes: If an underlying node or python stdio process crashes, Datafuse instantly recycles the container worker.
- Dynamic Variable Injection: Inject secured environment variables (such as database credentials or API keys) directly from the credentials vault without displaying them in configuration files.
- Transport Switching: Expose standard command-line stdio processes as secure Server-Sent Events (SSE) endpoints over authenticated HTTPS connections.
3. Connecting MCP Clients
Once registered, you can bridge your Datafuse-hosted MCP servers directly into tools like Cursor or Claude Desktop.
Claude Desktop Integration
To connect your Claude Desktop application directly to your Datafuse secure bridge, update your local claude_desktop_config.json:
{
"mcpServers": {
"datafuse-bridge": {
"command": "npx",
"args": [
"-y",
"@datafuse/mcp-bridge",
"--api-key",
"df_live_your_secret_key_here",
"--server",
"apify_mcp"
]
}
}
}
This bridge command runs our lightweight bridge client which routes Claude's tool requests securely through the Datafuse gateway.
!IMPORTANT By using the
@datafuse/mcp-bridgewrapper, Claude Desktop can invoke Apify actors and scrape pages without storing your raw API tokens locally on your laptop, ensuring complete endpoint protection.