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
Related MCP server: Warp SQL Server MCP
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
Available Tools
6 toolsexecute_exportA
Execute a FastBCP export command that was previously previewed. IMPORTANT: You must set confirmation=true to execute. This is a safety mechanism to prevent accidental execution.
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The exact command from preview_export_command (including actual passwords) | |
| confirmation | Yes | Must be true to execute. This confirms the user has reviewed the command. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must carry full burden. It reveals the confirmation safety mechanism and mentions passwords in the command, but does not describe return values, side effects, or what happens on execution.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no wasted words. Purpose is front-loaded, important detail about confirmation is emphasized with ALL CAPS.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, so description should hint at return value, but it doesn't. However, the tool is low complexity with only 2 params, and the combination of purpose and parameter semantics gives adequate context for an agent to use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, baseline 3. Description adds context beyond schema: it specifies the command must be the exact output from preview_export_command and includes passwords, and explains the confirmation flag is a safety mechanism.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'execute' and the resource 'export command', and distinguishes it from sibling tools like preview_export_command which only previews.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions the required confirmation flag and safety mechanism, but does not explicitly state when to use or not use this tool versus alternatives. It implies usage after preview, but no exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_versionA
Get the detected FastBCP binary version, capabilities, and supported source types, output formats, and storage targets.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description adequately indicates a read-only operation returning multiple pieces of information. It does not disclose potential network dependencies or caching behavior, but is sufficient for a simple info retrieval.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that lists the returned items without redundancy. Every word is essential.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and zero parameters, the description covers the main aspects of what the tool returns. It could be improved by hinting at the output format (e.g., JSON), but is otherwise complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, and schema coverage is 100% trivially. The description adds no parameter details, but none are needed. Baseline score of 4 applies for zero-parameter tools.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns the FastBCP binary version, capabilities, and supported source types, output formats, and storage targets. This is specific and distinct from sibling tools like list_supported_formats, which likely focuses only on formats.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for checking capabilities and version, but provides no explicit guidance on when to use this vs. siblings like list_supported_formats or validate_connection. No exclusions or alternatives are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_supported_formatsA
List all supported source databases, output formats, and storage targets.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must carry full burden. It only states the tool lists items, without mentioning side effects, permissions, rate limits, or return format. This is minimal disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no unnecessary words. It is front-loaded and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the main purpose but lacks details about the output format or any behavioral context. Without an output schema, the agent might not know what to expect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, and schema coverage is 100%. The description does not need to add parameter details, so baseline 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists supported source databases, output formats, and storage targets. It uses a specific verb 'list' and resource, distinguishing it from sibling tools like execute_export or validate_connection.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use or alternatives. The purpose is simple enough that usage is implied, but no exclusions or context are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
preview_export_commandA
Build and preview a FastBCP export command WITHOUT executing it. This shows the exact command that will be run, with passwords masked. Use this FIRST before executing any export.
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| output | Yes | ||
| options | No | ||
| config_file | No | Path to a YAML configuration file (--config parameter, requires FastBCP 0.30+) | |
| os_type | No | Target operating system for command formatting | linux |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses key behaviors: no execution and password masking. However, it does not mention potential validation steps or output format, which is acceptable for a preview tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, front-loaded, and to the point. Every sentence adds value, and there is no wasted text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (many parameters, nested objects, no output schema), the description adequately sets expectations: it shows the command with masked passwords. It mentions the relationship to export execution. A mention of the return format would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description does not add parameter-level detail beyond the schema. Given the low schema description coverage (40%), the description should compensate but does not. However, the schema itself has descriptions for many parameters, and the preview context helps interpret them.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool builds and previews a FastBCP export command without executing it. It distinguishes itself from sibling tools like 'execute_export' by emphasizing the preview nature.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly instructs 'Use this FIRST before executing any export,' providing clear guidance on when to use this tool over others. It implies that for actual execution, one should use the sibling tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
suggest_parallelism_methodB
Suggest the optimal parallelism method based on source database type and table characteristics. Provides recommendations for best performance.
| Name | Required | Description | Default |
|---|---|---|---|
| source_type | Yes | Source database type (e.g., 'pgsql', 'oraodp', 'mssql') | |
| has_numeric_key | Yes | Whether the table has a numeric key column | |
| has_identity_column | No | Whether the table has an identity/auto-increment column | |
| table_size_estimate | Yes | Estimated table size |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavioral traits. It mentions 'recommendations' but does not clarify whether the tool is read-only or has side effects, leaving uncertainty about its actions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with two sentences, no filler, and directly states the purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Missing output schema and no description of return value. For a suggestion tool, agents need to know what format or type the recommendation takes. The description is incomplete in this regard.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents parameters well. The description adds the overall context of 'source database type and table characteristics' but does not provide additional meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool suggests an optimal parallelism method based on source database type and table characteristics, with a focus on best performance. It is distinct from sibling tools like 'execute_export' which performs exports, showing clear differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives. The description only implies use for optimization but does not provide when-not-to-use or compare with sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
validate_connectionA
Validate source database connection parameters. This checks that all required parameters are provided but does NOT actually test connectivity (would require database access).
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes | ||
| side | Yes | Connection side |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses the critical behavior that connectivity is not tested, which is essential for correct use. It does not detail return values or error handling, but the limitation disclosure is strong.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with only two sentences. The first sentence states the purpose, and the second clarifies a key limitation. Every word is meaningful; no fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has a nested parameter object and no output schema, the description is adequate but not complete. It does not explain what the tool returns (e.g., boolean, error list) or how errors are reported. The limitation is well covered, but return behavior is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no meaning beyond the input schema. Schema description coverage is moderate (properties have descriptions), but the tool's description does not elaborate on parameters or their relationships. The agent gains no additional semantic insight from the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool validates source database connection parameters, and explicitly clarifies it does NOT test connectivity. This is a specific action with a well-defined scope, distinguishing it from sibling tools like execute_export or get_version.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on what the tool does and its limitation (no connectivity test). However, it lacks explicit when-to-use or when-not-to-use guidance compared to alternatives, though the limitation serves as an implicit caution.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
v0.1.5- First observed
execute_export - First observed
get_version - First observed
list_supported_formats - First observed
preview_export_command - First observed
suggest_parallelism_method - First observed
validate_connection
TDQS
Each tool has a clearly distinct purpose: version info, format listing, connection validation (parameter check), command preview, execution, and parallelism suggestion. No overlap.
All tool names follow a consistent verb_noun pattern with underscores, e.g., execute_export, get_version, list_supported_formats. No mixing of conventions.
6 tools is well-scoped for a specialized export tool. Each tool covers a necessary step in the workflow without being excessive.
Covers the main export workflow (preview, execute) along with auxiliary functions (version, formats, parallelism). Minor gap: no actual connectivity test, but parameter validation is present.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Move a database between providers, or convert MySQL to PostgreSQL, with integrity verified.
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Turn analyzed data into an Excel-like spreadsheet at a shareable URL: formulas, styles, filters.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA versatile tool that enables querying and exporting data from multiple relational databases (MySQL, PostgreSQL, Oracle, SQLite, etc.) in read-only mode for data safety.12Apache 2.0
- AlicenseBqualityAmaintenanceEnables secure database operations on SQL Server instances through a three-tier safety system, supporting schema exploration, query execution, performance analysis, and data export with configurable security levels from read-only to full development access.168986MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to interact with Microsoft SQL Server databases through query execution, schema discovery, CRUD operations, stored procedures, and data export with built-in safety controls.18Apache 2.0
- AlicenseNot gradedqualityCmaintenanceExecutes SQL queries via ConnectorX and streams results to CSV or Parquet files, supporting multiple databases and optional token counting for CSV output.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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