Outbound MCP data sources are a Builder beta feature. Free workspaces can read this page, but connector creation, connection tests, refreshes, and tool discovery return
PRO_REQUIRED.Add an MCP data source
1
Go to the wizard
/settings/data-sources/new/mcp.2
Pick a label and the server URL
The URL must be HTTPS. Same SSRF rules as Postgres — scheme allowlist, hostname blocklist (
localhost, *.local), literal-IP private-range matcher (including the ::ffff:hex IPv6 form).3
Optionally paste a bearer token
Most third-party MCP servers require authentication. Paste the token; it’s stored in the encrypted credential blob.
4
Click Test Connection
The wizard runs a one-off connect +
tools/list against the URL. On success, you see the discovered tools, so you can verify the surface before binding any blocks. The connection is closed immediately after.5
Pick a cadence and save
Same cadence options as the other connectors:
5, 15, 60, 360, or 1440 minutes.Connection model
The connector uses the official@modelcontextprotocol/sdk — the same SDK we use for inbound MCP. Transport is StreamableHTTPClientTransport with an optional bearer header.
Each refresh creates a fresh client per request. Convex actions are short-lived; a long-lived MCP client would die between invocations.
Refresh runs in a "use node" Convex action because the SSRF check imports node:dns/promises.
SSRF and DNS rebinding
Same two-layer defense as Postgres:- Sync check at add time and every refresh — HTTPS-only, hostname blocklist, literal-IP private-range matcher.
- Async DNS re-resolve before every connect —
dns.promises.lookup({ all: true })rejects if any A/AAAA record falls in a private range. Defeats DNS rebinding.
Discover the tool surface
Two paths to see what’s available:- Test Connection in the wizard
- dataSources.listMcpTools MCP read tool
The wizard’s Test Connection button returns the full tool list with descriptions. Useful before saving so you can copy a tool name into a binding.
Bind a block
The query type ismcp.tool. The params carry the tool name, its arguments, and which field of the result to project from.
projectionField tells the connector which field of the tool’s return object to hand off to the projection mapping. If the tool returns { issues: [...], cursor: "..." }, set projectionField: "issues".
Credential storage
The credential blob is JSON:{ serverUrl, authToken? }. Encrypted via the workspace DEK (envelope encryption). Every decryption is audit-logged with the calling actor — same pattern as the other connectors.
What’s next
BYOK keys
Bring your own LLM key — used by scheduled runs that drive the agent loop.
Scheduled runs
Drive periodic agent loops over MCP — connect outbound MCPs and let your agent compose results.