{
  "markdown": "# FastBCP MCP Server\n\n<!-- mcp-name: io.github.arpe-io/fastbcp-mcp -->\n\n[![PyPI](https://img.shields.io/pypi/v/fastbcp-mcp)](https://pypi.org/project/fastbcp-mcp/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue)](https://registry.modelcontextprotocol.io/?q=arpe-io)\n\nA [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that exposes [FastBCP](https://fastbcp.arpe.io/docs/latest/) functionality for exporting data from databases to files (CSV, TSV, JSON, BSON, Parquet, XLSX, Binary) with optional cloud storage targets.\n\n## Overview\n\nFastBCP is a high-performance CLI tool for exporting data from databases to files. This MCP server wraps FastBCP functionality and provides:\n\n- **Safety-first approach**: Preview commands before execution with user confirmation required\n- **Password masking**: Credentials and connection strings are never displayed in logs or output\n- **Intelligent validation**: Parameter validation with database-specific compatibility checks\n- **Smart suggestions**: Automatic parallelism method recommendations\n- **Version detection**: Automatic binary version detection with capability registry\n- **Comprehensive logging**: Full execution logs with timestamps and results\n\n## MCP Tools\n\n### 1. `preview_export_command`\nBuild and preview a FastBCP export command WITHOUT executing it. Shows the exact command with passwords masked. Always use this first.\n\n### 2. `execute_export`\nExecute a previously previewed command. Requires `confirmation: true` as a safety mechanism.\n\n### 3. `validate_connection`\nValidate source database connection parameters (parameter check only, does not test actual connectivity).\n\n### 4. `list_supported_formats`\nList all supported source databases, output formats, and storage targets.\n\n### 5. `suggest_parallelism_method`\nRecommend the optimal parallelism method based on source database type and table characteristics.\n\n### 6. `get_version`\nReport the detected FastBCP binary version, supported types, and feature flags.\n\n## Installation\n\n### Prerequisites\n\n- Python 3.10 or higher\n- FastBCP binary v0.29+ (obtain from [Arpe.io](https://arpe.io))\n- Claude Code or another MCP client\n\n### Setup\n\n1. **Clone or download this repository**:\n   ```bash\n   cd /path/to/fastbcp-mcp\n   ```\n\n2. **Install Python dependencies**:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Configure environment**:\n   ```bash\n   cp .env.example .env\n   # Edit .env with your FastBCP path\n   ```\n\n4. **Add to Claude Code configuration** (`~/.claude.json`):\n   ```json\n   {\n     \"mcpServers\": {\n       \"fastbcp\": {\n         \"type\": \"stdio\",\n         \"command\": \"python\",\n         \"args\": [\"/absolute/path/to/fastbcp-mcp/src/server.py\"],\n         \"env\": {\n           \"FASTBCP_PATH\": \"/absolute/path/to/FastBCP\"\n         }\n       }\n     }\n   }\n   ```\n\n5. **Restart Claude Code** to load the MCP server.\n\n6. **Verify installation**:\n   ```\n   # In Claude Code, run:\n   /mcp\n   # You should see \"fastbcp: connected\"\n   ```\n\n## Configuration\n\n### Environment Variables\n\nEdit `.env` to configure:\n\n```bash\n# Path to FastBCP binary (required)\nFASTBCP_PATH=./fastbcp/FastBCP\n\n# Execution timeout in seconds (default: 1800 = 30 minutes)\nFASTBCP_TIMEOUT=1800\n\n# Log directory (default: ./logs)\nFASTBCP_LOG_DIR=./logs\n\n# Log level (default: INFO)\nLOG_LEVEL=INFO\n```\n\n## Connection Options\n\nThe server supports multiple ways to authenticate and connect:\n\n| Parameter | Description |\n|-----------|-------------|\n| `server` | Host:port or host\\instance (optional with `connect_string` or `dsn`) |\n| `user` / `password` | Standard credentials |\n| `trusted_auth` | Windows trusted authentication |\n| `connect_string` | Full connection string (excludes server/user/password/dsn) |\n| `dsn` | ODBC DSN name (excludes server/provider) |\n| `provider` | OleDB provider name |\n| `application_intent` | SQL Server application intent (ReadOnly/ReadWrite) |\n\n## Output Options\n\n| Option | CLI Flag | Description |\n|--------|----------|-------------|\n| `format` | `--format` | Output format: csv, tsv, json, bson, parquet, xlsx, binary |\n| `file_output` | `--fileoutput` | Output file path |\n| `directory` | `--directory` | Output directory path |\n| `storage_target` | `--storagetarget` | Storage: local, s3, s3compatible, azure_blob, azure_datalake, fabric_onelake |\n| `delimiter` | `--delimiter` | Field delimiter (CSV/TSV) |\n| `quotes` | `--quotes` | Quote character |\n| `encoding` | `--encoding` | Output encoding |\n| `no_header` | `--noheader` | Omit header row (CSV/TSV) |\n| `decimal_separator` | `--decimalseparator` | Decimal separator (. or ,) |\n| `date_format` | `--dateformat` | Date format string |\n| `bool_format` | `--boolformat` | Boolean format: TrueFalse, OneZero, YesNo |\n| `parquet_compression` | `--parquetcompression` | Parquet compression: None, Snappy, Gzip, Lz4, Lzo, Zstd |\n| `timestamped` | `--timestamped` | Add timestamp to output filename |\n| `merge` | `--merge` | Merge parallel output files |\n\n## Export Options\n\n| Option | CLI Flag | Description |\n|--------|----------|-------------|\n| `method` | `--method` | Parallelism method |\n| `distribute_key_column` | `--distributeKeyColumn` | Column for data distribution |\n| `degree` | `--degree` | Parallelism degree (default: 1) |\n| `load_mode` | `--loadmode` | Append or Truncate |\n| `batch_size` | `--batchsize` | Batch size for export operations |\n| `map_method` | `--mapmethod` | Column mapping: Position or Name |\n| `run_id` | `--runid` | Run ID for logging |\n| `data_driven_query` | `--datadrivenquery` | Custom SQL for DataDriven method |\n| `settings_file` | `--settingsfile` | Custom settings JSON file |\n| `log_level` | `--loglevel` | Override log level (Information/Debug) |\n| `no_banner` | `--nobanner` | Suppress banner output |\n| `license_path` | `--license` | License file path or URL |\n| `cloud_profile` | `--cloudprofile` | Cloud storage profile name |\n\n## Usage Examples\n\n### PostgreSQL to CSV Export\n\n```\nUser: \"Export the 'orders' table from PostgreSQL (localhost:5432, database: sales_db,\n       schema: public) to CSV file at /tmp/orders.csv. Use parallel export.\"\n\nClaude Code will:\n1. Call suggest_parallelism_method to recommend Ctid for PostgreSQL\n2. Call preview_export_command with your parameters\n3. Show the command with masked passwords\n4. Explain what will happen\n5. Ask for confirmation\n6. Execute with execute_export when you approve\n```\n\n### Export to Parquet with Compression\n\n```\nUser: \"Export the 'transactions' table from SQL Server to Parquet format\n       with Snappy compression, saved to /data/exports/.\"\n\nClaude Code will use parquet format with parquet_compression set to Snappy.\n```\n\n### Export to S3\n\n```\nUser: \"Export the 'users' table from PostgreSQL to CSV on S3 bucket\n       s3://my-bucket/exports/ using my AWS profile.\"\n\nClaude Code will use storage_target=s3 with cloud_profile.\n```\n\n### Check Version and Capabilities\n\n```\nUser: \"What version of FastBCP is installed?\"\n\nClaude Code will call get_version and display the detected version,\nsupported source types, output formats, and available features.\n```\n\n## Two-Step Safety Process\n\nThis server implements a mandatory two-step process:\n\n1. **Preview** - Always use `preview_export_command` first\n2. **Execute** - Use `execute_export` with `confirmation: true`\n\nYou cannot execute without previewing first and confirming.\n\n## Security\n\n- Passwords and connection strings are masked in all output and logs\n- Sensitive flags masked: `--sourcepassword`, `--sourceconnectstring`, `-x`, `-g`\n- Use environment variables for sensitive configuration\n- Review commands carefully before executing\n- Use minimum required database permissions\n\n## Testing\n\nRun the test suite:\n\n```bash\n# Run all tests\npython -m pytest tests/ -v\n\n# Run with coverage\npython -m pytest tests/ --cov=src --cov-report=html\n```\n\n## Project Structure\n\n```\nfastbcp-mcp/\n  src/\n    __init__.py\n    server.py          # MCP server (tool definitions, handlers)\n    fastbcp.py         # Command builder, executor, suggestions\n    validators.py      # Pydantic models, enums, validation\n    version.py         # Version detection and capabilities registry\n  tests/\n    __init__.py\n    test_command_builder.py\n    test_validators.py\n    test_version.py\n  .env.example\n  requirements.txt\n  CHANGELOG.md\n  README.md\n```\n\n## License\n\nThis MCP server wrapper is provided as-is. FastBCP itself is a separate product from Arpe.io.\n\n## Related Links\n\n- [FastBCP Documentation](https://fastbcp.arpe.io/docs/latest/)\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n",
  "bytes": 8670,
  "sha": "65cc6477d623998543f34c9261b7811d2c42c8dbc12a30d3b4154254af999988",
  "repo_slug": "arpe-io/fastbcp-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_arpe_io_fastbcp_mcp_044ac098/readme"
}