# Via Claude (MCP) — tell Claude:
"Store a document in the 'notes' collection:
{ title: 'My first note', body: 'Hello PolyDB', tags: ['test'] }"
# Claude will call the store_document MCP tool automatically.
Quick Start Guide
Connect Claude or any AI agent to all 15 currently-available PolyDB data models (Transaction coming soon) in under 5 minutes.
Direct tool calls
Call any of the 69 tools by name — best for agents or code that already knows which operation it needs. Examples: store_document, query_sql, search_vectors.
Agent-native code mode
Skip loading the full tool catalog into your prompt. Call search_schema to discover tools at runtime by provider or keyword, then execute_workflow to run a batched multi-step pipeline — with outputs piped between steps via $ref(). Dramatically fewer prompt tokens for autonomous agents.
Both patterns work against the same server — mix them freely.
Sign Up & Get Your API Key
Start with the Micro plan — $9.99 for 50 credits, 30 days
- Step A Go to beta.polydb.dev/signup and create your account.
- Step B From the dashboard, open API Keys and create a new key.
-
Step C
Copy your key — it looks like
polydb_mcp_...and is shown once.
Connect via MCP
Works with Claude Desktop, Claude Code, Cursor, Continue, and any MCP client
Claude Code (terminal)
$ claude mcp add polydb \
--transport http \
https://beta.polydb.dev/mcp \
--header "X-PolyDB-Token: YOUR_KEY"
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"polydb": {
"transport": "http",
"url": "https://beta.polydb.dev/mcp",
"headers": {
"X-PolyDB-Token": "YOUR_KEY"
}
}
}
}
Config location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
First Operations
Copy-paste ready examples for each data model
# Via Claude (MCP):
"Find all documents in 'notes' where tags contains 'test'"
# Via Claude (MCP):
"Set key 'session:user_123' to 'active' with a 3600 second TTL"
# Via Claude (MCP) — Claude generates the embedding automatically:
"Add this text to the 'docs' vector collection with semantic search enabled:
'PolyDB supports 16 data models including SQL and vector search.'"
# Then search:
"Search the 'docs' vector collection for content similar to
'database with multiple storage models'"
Connection Methods
Three ways to use PolyDB — choose what fits your workflow.
MCP (Recommended)
For Claude Desktop, Claude Code, Cursor, Continue. Zero setup — connect once, all 15 currently-available models (Transaction coming soon) available as natural language.
--transport http \
https://beta.polydb.dev/mcp \
--header "X-PolyDB-Token: KEY"
REST API
Direct HTTP access for languages without an MCP client — bring your own HTTP tooling, no SDK required.
-H "X-PolyDB-Token: YOUR_KEY"
Python SDK
Native Python client with async support. Until the cloud SDK ships, use the OSS polydb package locally or hit MCP / REST from any HTTP client.
Working with multiple databases
Each tenant can hold multiple named databases. All 55 dataplane tools accept an optional database parameter so a single API key can target different databases per call.
Resolution order: database argument > X-PolyDB-Database header > tenant default > "polydb".
Create and manage databases from the Databases page in the dashboard or via GET/POST/DELETE /api/databases. Then pass the name as database='analytics' on any tool call.
Cold Starts & Idle Databases
Your database sleeps when it's not working, and that's a feature.
Each tenant database runs on its own isolated compute. If a database sees no queries for about 5 minutes, it automatically suspends. There's nothing to configure and nothing to break — your data, schema, and indexes are untouched while suspended.
The next request after a suspend automatically resumes the database and completes normally. No reconnect logic is required on your side — the same API key and MCP session keep working; PolyDB re-establishes the underlying database connection transparently. That first request just takes longer: expect roughly about 1 second before the response comes back, compared to normal warm-request latency. Every request after that is fast again until the database goes idle once more.
In exchange, an idle database consumes zero compute credits. You only pay for the database while it's actually doing work — not for the hours or days between agent sessions. If your workload runs in bursts (a nightly agent job, a demo that gets used a few times a week, a side project), this is the difference between paying for 24/7 compute and paying for the minutes you actually use.
- Set a generous timeout on the first tool call in a new session — don't assume every request completes in warm-request time.
- A slow first response after idle is expected behavior, not a failure. Don't retry-storm or treat it as an error condition.
- Don't build your own keepalive/ping loop to hold the database "warm." That just recreates the always-on cost this feature removes — except now it's the credits in your account paying for it instead of PolyDB's infrastructure.
This is the same scale-to-zero model used by Neon, AWS Lambda, and Cloud Run — well-understood, standard behavior for serverless compute.
Next Steps
Complete tool reference for all 69 MCP tools. Find the right tool for every query pattern.
Deep-dive into each data model — Vector, Graph, Time-Series, Spatial, and more.
Real-world patterns: AI memory, RAG pipelines, event streams, geospatial queries.
Browse your collections, manage API keys, and monitor usage in the web dashboard.