A Native Data Connector (NDC) that bridges Hasura DDN with Model Context Protocol (MCP) servers, exposing MCP resources as collections and tools as functions/procedures.
- Dynamic Schema Generation: Automatically generates NDC schema from MCP server introspection
- Multiple Transports: Supports stdio (local processes) and HTTP (remote servers)
- Multiple Servers: Connect to multiple MCP servers simultaneously
- Resource Mapping: MCP resources → NDC collections
- Tool Execution: MCP tools → NDC functions/procedures
- Naming Convention:
{server_name}__{resource_or_tool}
pattern
-
Clone and build:
git clone https://github.com/hasura/ndc-mcp-rs.git cd ndc-mcp-rs cargo build
-
Configure servers in
configuration/configuration.json
:{ "servers": { "filesystem": { "type": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/directory"] }, "remote": { "type": "http", "url": "http://localhost:8080/mcp", "headers": { "Authorization": "Bearer your-token" }, "timeout_seconds": 30 } } }
-
Start the connector:
just serve # or: cargo run --bin mcp-connector -- serve --configuration configuration
-
Test the schema:
curl http://localhost:8080/schema | jq
The connector uses a single configuration file configuration/configuration.json
where you define your MCP servers. The connector automatically introspects the servers at startup to discover available resources and tools.
- stdio: For local MCP servers (Node.js packages, Python scripts, etc.)
- http: For remote MCP servers using streamable HTTP transport
# Build
just build
# Format code
just format
# Run clippy
just clippy
# Serve the connector
just serve
- Rust 1.85.0+ (edition 2021)
- MCP servers to connect to
MIT License - see LICENSE file for details.