Getting Started

Quick Start Guide

Connect Claude or any AI agent to all 15 currently-available PolyDB data models (Transaction coming soon) in under 5 minutes.

Two Ways to Use PolyDB MCP

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.

01

Sign Up & Get Your API Key

Start with the Micro plan — $9.99 for 50 credits, 30 days

  1. Step A Go to beta.polydb.dev/signup and create your account.
  2. Step B From the dashboard, open API Keys and create a new key.
  3. Step C Copy your key — it looks like polydb_mcp_... and is shown once.
Note Your API key grants access to all 15 currently-available data models (Transaction coming soon) under your account's plan limits. Keep it secret — treat it like a password.
02

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)

Tip After connecting, ask Claude: "Use the search_schema tool to show me what's available in my PolyDB." This gives you a full map of all your collections and data models.
03

First Operations

Copy-paste ready examples for each data model

Store a Document
# 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.
REST data plane — coming soon. Use MCP today.
Retrieve a Document
# Via Claude (MCP):
"Find all documents in 'notes' where tags contains 'test'"
REST data plane — coming soon. Use MCP today.
Store a Key-Value Pair
# Via Claude (MCP):
"Set key 'session:user_123' to 'active' with a 3600 second TTL"
REST data plane — coming soon. Use MCP today.
Store & Search Vectors
# 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.

Method 01

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.

claude mcp add polydb \
  --transport http \
  https://beta.polydb.dev/mcp \
  --header "X-PolyDB-Token: KEY"
69 tools available
Method 02

REST API

Direct HTTP access for languages without an MCP client — bring your own HTTP tooling, no SDK required.

curl https://beta.polydb.dev/api/... \
  -H "X-PolyDB-Token: YOUR_KEY"
Coming soon — MCP is the data plane today
Method 03

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.

# Python SDK details coming soon
Coming soon

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.

Building an agent against PolyDB?
  • 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