MCP Server Setup
Configure Weavori's MCP server for AI-assisted synthetic data generation in Claude Desktop, Cursor, VS Code, and Qoder.
Last updated August 14, 2026
Weavori ships a built-in Model Context Protocol (MCP) server that exposes its data generation tools to AI assistants. This enables Claude, Cursor, and other MCP-compatible clients to introspect schemas, estimate generation costs, and produce synthetic data, all through natural language.
Available Tools
| Tool | Description | Read-only |
|---|---|---|
introspect | Inspect a PostgreSQL schema and return its structure (tables, columns, FK relationships) | ✅ |
estimate | Estimate generation time and row counts before running | ✅ |
generate | Generate synthetic data into a target database | ❌ |
doctor | Run comprehensive diagnostics on your Weavori environment | ✅ |
sync | Copy data between PostgreSQL databases | ❌ |
Tool Parameters
The mutating tools (generate and sync) accept the same options as their CLI equivalents. Full semantics live in the generate and sync references; the tables below list the parameter names your AI assistant passes. Knob keys use the unqualified table.column form, and distribution, null-rate, since, and until also load from weavori.yaml.
generate
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | env fallback | Source PostgreSQL DSN (falls back to WEAVORI_DATABASE_URL) |
target | string | required | Target DSN to write synthetic data into |
rows | integer | 1000 | Rows to generate per table |
fast | boolean | false | Sample 1% of source rows for faster generation |
no-sampling | boolean | false | Disable distribution sampling (pure random output) |
sample-rows | integer | 0 | Draw N random rows for sampling on huge tables |
create-tables | boolean | true | Create schemas and tables on the target first |
formulas | string (JSON) | none | Computed columns, e.g. {"full_name":"concat(first_name, ' ', last_name)"} |
seed | integer | 0 | Reproducible output: same seed produces byte-identical rows; 0 draws a fresh seed |
distribution | string (JSON) | none | Per-column value models, e.g. {"users.age":"normal:mean=35,stddev=10","orders.customer_id":"zipf"} |
null-rate | string (JSON) | none | Per-column null probability, e.g. {"users.middle_name":0.3}; a bare number sets the global default |
since | string | none | Lower bound for every generated timestamp (RFC 3339 or YYYY-MM-DD) |
until | string | none | Upper bound for every generated timestamp (inclusive) |
sync
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | env fallback | Source PostgreSQL DSN |
target | string | required | Target DSN to write into |
schema | string | none | Only sync tables matching this schema name |
table | string | none | Only sync tables matching this table name |
create-tables | boolean | true | Create schemas and tables on the target first |
subset | string | none | Copy a subset: N rows or N% per table |
anonymize | boolean | false | Scrub PII columns deterministically (same fake per original) |
seed | integer | 0 | Reproducible anonymization: same seed and same rows produce the same fakes; 0 draws a fresh seed |
Prerequisites
- Option A: Weavori installed (
weavorion your PATH) - Option B: Node.js >= 20 (the MCP server runs via
npx @weavori/cli, no manual install needed) - A valid
WEAVORI_API_KEY(create one in the dashboard → API Keys); alternatively, log in once withweavori loginon the same machine and the cached subscription is used - A PostgreSQL database connection string
Environment Variables
The MCP server reads configuration from environment variables. Set these in your MCP client's configuration:
| Variable | Required | Description |
|---|---|---|
WEAVORI_DATABASE_URL | No (fallback) | Default PostgreSQL DSN when tools don't provide one |
WEAVORI_API_KEY | No (recommended) | API key for authentication; without it, Weavori falls back to a cached subscription from weavori login, then to the free tier |
The database URL can also be passed directly to each tool as the url argument, which takes precedence over the environment variable.
Connection Methods
You can connect Weavori's MCP server using one of two methods:
Local binary: Requires pre-installing Weavori:
"command": "weavori",
"args": ["mcp"]npx launcher: Zero-install, fetches the binary on demand (requires Node.js >= 20):
"command": "npx",
"args": ["-y", "@weavori/cli", "mcp"]Both are equivalent. The examples below show the local binary method; substitute with npx if you prefer zero-install.
Claude Desktop
Edit claude_desktop_config.json (Claude → Settings → Developer → Edit Config):
{
"mcpServers": {
"weavori": {
"command": "weavori",
"args": ["mcp"],
"env": {
"WEAVORI_DATABASE_URL": "postgres://user:password@host:5432/dbname",
"WEAVORI_API_KEY": "your-api-key"
}
}
}
}Or use the npx launcher (no manual install):
{
"mcpServers": {
"weavori": {
"command": "npx",
"args": ["-y", "@weavori/cli", "mcp"],
"env": {
"WEAVORI_DATABASE_URL": "postgres://user:password@host:5432/dbname",
"WEAVORI_API_KEY": "your-api-key"
}
}
}
}Restart Claude Desktop. You should see the hammer icon with five Weavori tools available. Try asking:
"Introspect the database at postgres://user:pass@localhost:5432/mydb"
"Estimate how long it would take to generate data for my database"
"Generate 500 rows of synthetic data for each table into the target database"
Cursor
In Cursor, go to Settings → Features → MCP Servers → Add New MCP Server:
Type: command
Name: weavori
Command: weavori mcp
Environment variables:
WEAVORI_DATABASE_URL postgres://user:password@host:5432/dbname
WEAVORI_API_KEY your-api-key
Alternatively, add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"weavori": {
"command": "weavori",
"args": ["mcp"],
"env": {
"WEAVORI_DATABASE_URL": "postgres://user:password@host:5432/dbname",
"WEAVORI_API_KEY": "your-api-key"
}
}
}
}Or use npx:
{
"mcpServers": {
"weavori": {
"command": "npx",
"args": ["-y", "@weavori/cli", "mcp"],
"env": {
"WEAVORI_DATABASE_URL": "postgres://user:password@host:5432/dbname",
"WEAVORI_API_KEY": "your-api-key"
}
}
}
}After adding, the tools appear in Cursor's Composer (Cmd+K / Ctrl+K). Ask Cursor to generate data using natural language.
"Run doctor diagnostics on my database"
"Sync the public schema tables to my test database"
VS Code (Continue Extension)
Install the Continue extension, then edit ~/.continue/config.json:
{
"mcpServers": {
"weavori": {
"command": "weavori",
"args": ["mcp"],
"env": {
"WEAVORI_DATABASE_URL": "postgres://user:password@host:5432/dbname",
"WEAVORI_API_KEY": "your-api-key"
}
}
}
}Or use the npx launcher:
{
"mcpServers": {
"weavori": {
"command": "npx",
"args": ["-y", "@weavori/cli", "mcp"],
"env": {
"WEAVORI_DATABASE_URL": "postgres://user:password@host:5432/dbname",
"WEAVORI_API_KEY": "your-api-key"
}
}
}
}After saving, reload the Continue extension (Ctrl+Shift+P → "Continue: Reload"). The tools are available in Continue's chat panel.
Qoder
Qoder uses an mcp.json config file located at ~/.qoder/mcp.json. Add the Weavori MCP server entry:
Local binary:
{
"mcpServers": {
"weavori": {
"command": "/path/to/weavori",
"args": ["mcp"],
"env": {
"WEAVORI_DATABASE_URL": "postgres://user:password@host:5432/dbname",
"WEAVORI_API_KEY": "your-api-key"
}
}
}
}On Windows, use the full path to the executable with escaped backslashes, e.g. "command": "C:\\\\Tools\\\\weavori.exe".
npx launcher (zero-install):
{
"mcpServers": {
"weavori": {
"command": "npx",
"args": ["-y", "@weavori/cli", "mcp"],
"env": {
"WEAVORI_DATABASE_URL": "postgres://user:password@host:5432/dbname",
"WEAVORI_API_KEY": "your-api-key"
}
}
}
}No Windows path escaping needed, npx handles the binary discovery.
After saving, restart Qoder or reload the MCP connection. The Weavori tools become available whenever you ask Qoder to introspect, generate, or diagnose databases.
Troubleshooting
"weavori: command not found"
If using the local binary, ensure it's on your PATH. Run which weavori (or where weavori on Windows). Reinstall if needed.
If using the npx launcher, ensure Node.js >= 20 is installed and npx is on your PATH.
"Not connected" or tool calls fail silently
Check that WEAVORI_API_KEY is set correctly. Run weavori doctor from the terminal to verify your setup independently.
Connection timeouts
Ensure your PostgreSQL server accepts connections from the machine running the MCP server. Check network policies, firewall rules, and pg_hba.conf.
Long-running operations time out
Generation and sync operations can take minutes for large schemas. Increase the request timeout in your MCP client's settings:
- Claude Desktop: Increase the request timeout in Claude's MCP server settings
- Cursor: Adjust Settings → Features → MCP → Tool timeout
- Continue: Set
"timeout": 600000in the MCP server config
Stderr logging
The MCP server writes log messages to stderr, which most clients capture and surface in their developer tools. Check client-specific logs for diagnostic information.