io.github.arpe-io/fastbcp-mcp
OfficialExports data from PostgreSQL databases to various file formats (CSV, TSV, JSON, Parquet, etc.) and storage targets (local, S3, Azure Blob, etc.) using FastBCP.
Click on "Install 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., "@io.github.arpe-io/fastbcp-mcppreview export from PostgreSQL table 'customers' to CSV"
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.
FastBCP MCP Server
A Model Context Protocol (MCP) server that exposes FastBCP functionality for exporting data from databases to files (CSV, TSV, JSON, BSON, Parquet, XLSX, Binary) with optional cloud storage targets.
Overview
FastBCP is a high-performance CLI tool for exporting data from databases to files. This MCP server wraps FastBCP functionality and provides:
Safety-first approach: Preview commands before execution with user confirmation required
Password masking: Credentials and connection strings are never displayed in logs or output
Intelligent validation: Parameter validation with database-specific compatibility checks
Smart suggestions: Automatic parallelism method recommendations
Version detection: Automatic binary version detection with capability registry
Comprehensive logging: Full execution logs with timestamps and results
MCP Tools
1. preview_export_command
Build and preview a FastBCP export command WITHOUT executing it. Shows the exact command with passwords masked. Always use this first.
2. execute_export
Execute a previously previewed command. Requires confirmation: true as a safety mechanism.
3. validate_connection
Validate source database connection parameters (parameter check only, does not test actual connectivity).
4. list_supported_formats
List all supported source databases, output formats, and storage targets.
5. suggest_parallelism_method
Recommend the optimal parallelism method based on source database type and table characteristics.
6. get_version
Report the detected FastBCP binary version, supported types, and feature flags.
Installation
Prerequisites
Python 3.10 or higher
FastBCP binary v0.29+ (obtain from Arpe.io)
Claude Code or another MCP client
Setup
Clone or download this repository:
cd /path/to/fastbcp-mcpInstall Python dependencies:
pip install -r requirements.txtConfigure environment:
cp .env.example .env # Edit .env with your FastBCP pathAdd to Claude Code configuration (
~/.claude.json):{ "mcpServers": { "fastbcp": { "type": "stdio", "command": "python", "args": ["/absolute/path/to/fastbcp-mcp/src/server.py"], "env": { "FASTBCP_PATH": "/absolute/path/to/FastBCP" } } } }Restart Claude Code to load the MCP server.
Verify installation:
# In Claude Code, run: /mcp # You should see "fastbcp: connected"
Configuration
Environment Variables
Edit .env to configure:
# Path to FastBCP binary (required)
FASTBCP_PATH=./fastbcp/FastBCP
# Execution timeout in seconds (default: 1800 = 30 minutes)
FASTBCP_TIMEOUT=1800
# Log directory (default: ./logs)
FASTBCP_LOG_DIR=./logs
# Log level (default: INFO)
LOG_LEVEL=INFOConnection Options
The server supports multiple ways to authenticate and connect:
Parameter | Description |
| Host:port or host\instance (optional with |
| Standard credentials |
| Windows trusted authentication |
| Full connection string (excludes server/user/password/dsn) |
| ODBC DSN name (excludes server/provider) |
| OleDB provider name |
| SQL Server application intent (ReadOnly/ReadWrite) |
Output Options
Option | CLI Flag | Description |
|
| Output format: csv, tsv, json, bson, parquet, xlsx, binary |
|
| Output file path |
|
| Output directory path |
|
| Storage: local, s3, s3compatible, azure_blob, azure_datalake, fabric_onelake |
|
| Field delimiter (CSV/TSV) |
|
| Quote character |
|
| Output encoding |
|
| Omit header row (CSV/TSV) |
|
| Decimal separator (. or ,) |
|
| Date format string |
|
| Boolean format: TrueFalse, OneZero, YesNo |
|
| Parquet compression: None, Snappy, Gzip, Lz4, Lzo, Zstd |
|
| Add timestamp to output filename |
|
| Merge parallel output files |
Export Options
Option | CLI Flag | Description |
|
| Parallelism method |
|
| Column for data distribution |
|
| Parallelism degree (default: 1) |
|
| Append or Truncate |
|
| Batch size for export operations |
|
| Column mapping: Position or Name |
|
| Run ID for logging |
|
| Custom SQL for DataDriven method |
|
| Custom settings JSON file |
|
| Override log level (Information/Debug) |
|
| Suppress banner output |
|
| License file path or URL |
|
| Cloud storage profile name |
Usage Examples
PostgreSQL to CSV Export
User: "Export the 'orders' table from PostgreSQL (localhost:5432, database: sales_db,
schema: public) to CSV file at /tmp/orders.csv. Use parallel export."
Claude Code will:
1. Call suggest_parallelism_method to recommend Ctid for PostgreSQL
2. Call preview_export_command with your parameters
3. Show the command with masked passwords
4. Explain what will happen
5. Ask for confirmation
6. Execute with execute_export when you approveExport to Parquet with Compression
User: "Export the 'transactions' table from SQL Server to Parquet format
with Snappy compression, saved to /data/exports/."
Claude Code will use parquet format with parquet_compression set to Snappy.Export to S3
User: "Export the 'users' table from PostgreSQL to CSV on S3 bucket
s3://my-bucket/exports/ using my AWS profile."
Claude Code will use storage_target=s3 with cloud_profile.Check Version and Capabilities
User: "What version of FastBCP is installed?"
Claude Code will call get_version and display the detected version,
supported source types, output formats, and available features.Two-Step Safety Process
This server implements a mandatory two-step process:
Preview - Always use
preview_export_commandfirstExecute - Use
execute_exportwithconfirmation: true
You cannot execute without previewing first and confirming.
Security
Passwords and connection strings are masked in all output and logs
Sensitive flags masked:
--sourcepassword,--sourceconnectstring,-x,-gUse environment variables for sensitive configuration
Review commands carefully before executing
Use minimum required database permissions
Testing
Run the test suite:
# Run all tests
python -m pytest tests/ -v
# Run with coverage
python -m pytest tests/ --cov=src --cov-report=htmlProject Structure
fastbcp-mcp/
src/
__init__.py
server.py # MCP server (tool definitions, handlers)
fastbcp.py # Command builder, executor, suggestions
validators.py # Pydantic models, enums, validation
version.py # Version detection and capabilities registry
tests/
__init__.py
test_command_builder.py
test_validators.py
test_version.py
.env.example
requirements.txt
CHANGELOG.md
README.mdLicense
This MCP server wrapper is provided as-is. FastBCP itself is a separate product from Arpe.io.
Related Links
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/arpe-io/fastbcp-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server