Skip to main content
Glama
arpe-io

io.github.arpe-io/fastbcp-mcp

Official
by arpe-io

FastBCP MCP Server

PyPI License: MIT MCP Registry

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

  1. Clone or download this repository:

    cd /path/to/fastbcp-mcp
  2. Install Python dependencies:

    pip install -r requirements.txt
  3. Configure environment:

    cp .env.example .env
    # Edit .env with your FastBCP path
  4. Add 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"
          }
        }
      }
    }
  5. Restart Claude Code to load the MCP server.

  6. 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=INFO

Connection Options

The server supports multiple ways to authenticate and connect:

Parameter

Description

server

Host:port or host\instance (optional with connect_string or dsn)

user / password

Standard credentials

trusted_auth

Windows trusted authentication

connect_string

Full connection string (excludes server/user/password/dsn)

dsn

ODBC DSN name (excludes server/provider)

provider

OleDB provider name

application_intent

SQL Server application intent (ReadOnly/ReadWrite)

Output Options

Option

CLI Flag

Description

format

--format

Output format: csv, tsv, json, bson, parquet, xlsx, binary

file_output

--fileoutput

Output file path

directory

--directory

Output directory path

storage_target

--storagetarget

Storage: local, s3, s3compatible, azure_blob, azure_datalake, fabric_onelake

delimiter

--delimiter

Field delimiter (CSV/TSV)

quotes

--quotes

Quote character

encoding

--encoding

Output encoding

no_header

--noheader

Omit header row (CSV/TSV)

decimal_separator

--decimalseparator

Decimal separator (. or ,)

date_format

--dateformat

Date format string

bool_format

--boolformat

Boolean format: TrueFalse, OneZero, YesNo

parquet_compression

--parquetcompression

Parquet compression: None, Snappy, Gzip, Lz4, Lzo, Zstd

timestamped

--timestamped

Add timestamp to output filename

merge

--merge

Merge parallel output files

Export Options

Option

CLI Flag

Description

method

--method

Parallelism method

distribute_key_column

--distributeKeyColumn

Column for data distribution

degree

--degree

Parallelism degree (default: 1)

load_mode

--loadmode

Append or Truncate

batch_size

--batchsize

Batch size for export operations

map_method

--mapmethod

Column mapping: Position or Name

run_id

--runid

Run ID for logging

data_driven_query

--datadrivenquery

Custom SQL for DataDriven method

settings_file

--settingsfile

Custom settings JSON file

log_level

--loglevel

Override log level (Information/Debug)

no_banner

--nobanner

Suppress banner output

license_path

--license

License file path or URL

cloud_profile

--cloudprofile

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 approve

Export 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:

  1. Preview - Always use preview_export_command first

  2. Execute - Use execute_export with confirmation: 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, -g

  • Use 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=html

Project 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.md

License

This MCP server wrapper is provided as-is. FastBCP itself is a separate product from Arpe.io.

Available Tools

6 tools
execute_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
commandYesThe exact command from preview_export_command (including actual passwords)
confirmationYesMust be true to execute. This confirms the user has reviewed the command.

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceYes
outputYes
optionsNo
config_fileNoPath to a YAML configuration file (--config parameter, requires FastBCP 0.30+)
os_typeNoTarget operating system for command formattinglinux

TDQS

A4.4/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
source_typeYesSource database type (e.g., 'pgsql', 'oraodp', 'mssql')
has_numeric_keyYesWhether the table has a numeric key column
has_identity_columnNoWhether the table has an identity/auto-increment column
table_size_estimateYesEstimated table size

TDQS

B3.2/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYes
sideYesConnection side

TDQS

A4/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

  1. 6 tool updatesv0.1.5
    • First observedexecute_export
    • First observedget_version
    • First observedlist_supported_formats
    • First observedpreview_export_command
    • First observedsuggest_parallelism_method
    • First observedvalidate_connection

TDQS

A4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: version info, format listing, connection validation (parameter check), command preview, execution, and parallelism suggestion. No overlap.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with underscores, e.g., execute_export, get_version, list_supported_formats. No mixing of conventions.

Tool Count5/5

6 tools is well-scoped for a specialized export tool. Each tool covers a necessary step in the workflow without being excessive.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A versatile tool that enables querying and exporting data from multiple relational databases (MySQL, PostgreSQL, Oracle, SQLite, etc.) in read-only mode for data safety.
    12
    Apache 2.0
  • A
    license
    B
    quality
    A
    maintenance
    Enables 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.
    16
    898
    6
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables 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.
    18
    Apache 2.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Executes SQL queries via ConnectorX and streams results to CSV or Parquet files, supporting multiple databases and optional token counting for CSV output.
    1
    MIT

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