PeerDB MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PeerDB MCP List my replication pipelines and their current states."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PeerDB MCP
Inspect replication pipelines, investigate sync errors, and manage CDC mirrors from your AI client.
PeerDB MCP connects your Model Context Protocol client to the PeerDB Flow REST API. Ask about pipeline status, review recent errors and batches, or request a pipeline change using 13 typed tools.
Community preview. MCP integration and API contract tests use a simulated gateway; live PeerDB compatibility is still being validated. Reports from real setups are welcome. This is an independent community project.
Quick start · Client setup · Tool reference · Troubleshooting · Contributing
What you can do
Ask your client… | PeerDB MCP provides… |
“List my replication pipelines and their states.” | Mirror names, source/destination peers, and current states. |
“Investigate the latest errors for | Status, recent errors, CDC batches, and heuristic troubleshooting suggestions. |
“Show the replication slots for | PostgreSQL slot details and lag from PeerDB. |
“Pause | A pause request and a separate status check, when writes are enabled. |
You can also validate and create CDC mirrors, resume paused pipelines, and update batch size, idle timeout, snapshot settings, or table mappings. Diagnostics return evidence and possible next steps; they do not automatically repair replication.
Related MCP server: QuestLLens
Quick start
You need a reachable PeerDB Flow REST gateway, uv
(which includes uvx), Git, and an MCP client that supports stdio. The server uses
Python 3.11+; uv can provision a compatible Python when needed.
Add this to your client's MCP configuration. It starts in read-only mode:
{
"mcpServers": {
"peerdb": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/AMohammadzadeh/peerdb-mcp.git@main",
"peerdb-mcp"
],
"env": {
"PEERDB_URL": "http://localhost:8113",
"PEERDB_READ_ONLY": "true"
}
}
}
}Restart your client, then ask:
Check the PeerDB version, then list my pipelines. Do not change anything.
The client installs and launches the server automatically. localhost refers to
the computer running the MCP process. Point the URL at the REST gateway;
PeerDB's UI and gRPC ports serve different interfaces. Port 8113 is a common
self-hosted gateway port—check your deployment.
For client-specific instructions, see Claude Desktop, Claude Code, Cursor, and Codex.
For a fixed revision, replace @main with a full commit SHA. Installation currently
uses GitHub; the package has not been published to PyPI.
Authentication
Set credentials through your client's environment or secure secret mechanism:
Gateway authentication | Variables to set |
None | Only |
Bearer token |
|
HTTP Basic | Both |
Choose one authentication method. See the configuration reference for examples and all environment variables. Use HTTPS for remote authenticated gateways. Pipeline logs and configuration are returned to your MCP client and may be sent to its model provider; review your client's data handling before use.
Enable pipeline changes
Set PEERDB_READ_ONLY to false and restart the MCP process to enable creation,
pause, resume, and updates. The quick start explicitly enables read-only mode;
the application's default when this variable is omitted is false.
Changes are asynchronous. An accepted request does not mean the operation has finished; check pipeline status afterward. See operation behavior.
Supported operations
Area | Coverage |
Monitoring | Version, peers, CDC/QRep pipeline status, errors, CDC batches, PostgreSQL slots |
Diagnostics | Per-pipeline evidence and heuristic findings, including partial results |
CDC management | Validate, create, pause, resume, and update supported settings |
QRep management | Pause/resume; creation and modification are not implemented |
Transport | Local stdio, with outbound HTTP(S) to PeerDB |
Peer creation, pipeline deletion, and automatic resync are not exposed. Managed ClickPipes compatibility has not been verified. Read the tool reference for arguments and API compatibility notes for the upstream source checked.
Verify your local setup
From a checkout on a computer that can reach PeerDB:
git clone https://github.com/AMohammadzadeh/peerdb-mcp.git
cd peerdb-mcp
uv sync --frozen
export PEERDB_URL=http://localhost:8113
uv run --frozen python -m peerdb_mcp.smoke --pipeline YOUR_EXISTING_MIRRORInject authentication variables if required. Omit --pipeline to check only MCP
startup, version, and pipeline listing. The test forces read-only mode and prints
a summary without URLs, credentials, pipeline names, or log contents. Failed or
partial checks return a nonzero exit status. Passing checks establish API access,
not replication health.
Feedback and contributions
Trying this with PeerDB? Report your results with your PeerDB version, MCP client, and a sanitized smoke-test summary. Please remove credentials and private data from anything you share.
Bug fixes, compatibility reports, documentation improvements, and focused feature requests are welcome. Start with CONTRIBUTING.md for development commands and the API contract conventions.
License
PeerDB MCP is available under the MIT License.
Available Tools
13 toolscreate_pipelineBDestructive
Validate and create a CDC pipeline using existing peers. May copy source data.
Inputs: config (required). Returns: object
diagnose_pipelineARead-onlyIdempotent
Combine status, recent errors and CDC batches with heuristic troubleshooting steps.
Reports partial results if a check fails. Never repairs or changes a pipeline.
Inputs: name (required), limit. Returns: object
get_peerdb_versionARead-onlyIdempotent
Check gateway connectivity and report the PeerDB version.
Inputs: no named parameters. Returns: object
get_peer_slotsBRead-onlyIdempotent
Inspect PostgreSQL replication slots and lag for a source peer.
Inputs: peer_name (required). Returns: object
get_pipeline_batchesBRead-onlyIdempotent
Get recent CDC batches to inspect throughput and sync progress; not for QRep.
Inputs: name (required), limit, before_id. Returns: object
get_pipeline_errorsBRead-onlyIdempotent
Read paginated pipeline logs; defaults to the 20 most recent errors.
Inputs: name (required), page, level, limit. Returns: object
get_pipeline_statusBRead-onlyIdempotent
Get pipeline state, configuration, snapshot progress and replication totals.
Inputs: name (required). Returns: object
list_peersARead-onlyIdempotent
List available source and destination peers for pipeline configuration.
Inputs: no named parameters. Returns: object
list_pipelinesARead-onlyIdempotent
List CDC and QRep pipelines, their peers and current states.
Inputs: no named parameters. Returns: object
pause_pipelineADestructive
Request pause of a running pipeline. Poll status to observe completion.
Inputs: name (required). Returns: object
resume_pipelineBDestructive
Request resume of a paused pipeline. Poll status to observe completion.
Inputs: name (required). Returns: object
update_pipelineADestructive
Modify CDC batch size, idle timeout, snapshot settings or table mappings.
Requires running or paused state. Adding tables may start snapshots; removing tables stops their replication. Requests the observed state; avoid concurrent lifecycle changes.
Inputs: name (required), update (required). Returns: object
validate_pipelineARead-onlyIdempotent
Ask PeerDB to validate a CDC configuration without creating a pipeline.
Inputs: config (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct action or resource: lifecycle (create/pause/resume/update), listing (pipelines/peers), status/diagnostics (status/errors/batches/slots/diagnose/validate), and version. Overlap is minimal; diagnose_pipeline is composite but clearly distinct from raw status by including heuristic troubleshooting.
All 13 tools use snake_case with a verb_noun pattern (e.g., get_peerdb_version, list_pipelines, create_pipeline). The convention is consistent throughout, with no deviations in style or case.
13 tools is well-scoped for a pipeline management server, covering connectivity, inventory, lifecycle, diagnostics, and validation. No tool appears redundant or superfluous.
Core pipeline lifecycle is covered (create, read, update, pause/resume), but there is no delete_pipeline operation to remove a pipeline. Peer management is read-only (list_peers), and QRep pipelines lack dedicated diagnostic tools (get_pipeline_batches explicitly excludes QRep). These gaps may force agents to work around missing operations.
Maintenance
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Connect AI agents to 580+ APIs with OAuth or API-key auth. Hosted gateway; API pricing varies.
Connect AI to store orders, products and inventory with scoped access and human approvals.
Amazon Ads, Seller Central, Vendor Central and AMC data for AI agents. Read-only by default.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to securely query VAST Data databases for schema, metadata, and sample data via read-only SQL and MCP resources.MIT
- AlicenseNot gradedqualityCmaintenanceGives AI agents read-only access to any QuestDB instance, enabling schema discovery, time-series querying, and monitoring of partitions, WAL state, symbols, and ingestion health through MCP.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to securely connect to a vybeflow tenant for multi-channel messaging operations such as reading inbox tickets, looking up contacts, checking campaign progress, and sending messages under scoped permissions.MIT
- AlicenseAqualityBmaintenanceEnables AI agents to query PostgreSQL databases securely with read-only defaults, PII masking, rate limiting, and human-approved, expiring mutation tokens.91Apache 2.0