Metadata-Version: 2.4
Name: mcp-databend
Version: 0.1.4
Summary: An MCP server for Databend.
Author-email: Databend Labs <z@databend.com>
Maintainer-email: Databend Labs <z@databend.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/databendlabs/mcp-databend
Project-URL: Repository, https://github.com/databendlabs/mcp-databend
Project-URL: Documentation, https://github.com/databendlabs/mcp-databend#readme
Project-URL: Issues, https://github.com/databendlabs/mcp-databend/issues
Keywords: mcp,databend,database,sql,ai
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: databend-driver>=0.27.3
Requires-Dist: mcp>=1.9.0
Requires-Dist: python-dotenv>=1.1.0
Dynamic: license-file

# MCP Server for Databend

[![PyPI - Version](https://img.shields.io/pypi/v/mcp-databend)](https://pypi.org/project/mcp-databend)

An MCP server for Databend database interactions.

## What You Can Do

- **execute_sql** - Execute SQL queries with timeout protection
- **show_databases** - List all databases
- **show_tables** - List tables in a database (with optional filter)
- **describe_table** - Get table schema information

## How to Use

### Step 1: Get Databend Connection

**Recommended**: Sign up for [Databend Cloud](https://app.databend.com) (free tier available)

Get your connection string from [Databend documentation](https://docs.databend.com/developer/drivers/#connection-string-dsn).

| Deployment | Connection String Example |
|------------|---------------------------|
| **Databend Cloud** | `databend://cloudapp:pass@host:443/database?warehouse=wh` |
| **Self-hosted** | `databend://user:pass@localhost:8000/database?sslmode=disable` |

### Step 2: Install

```bash
uv tool install mcp-databend
```

### Step 3: Configure Your MCP Client

#### MCP Configuration

Add to your MCP client configuration (e.g., Claude Desktop, Windsurf):

```json
{
  "mcpServers": {
    "mcp-databend": {
      "command": "uv",
      "args": ["tool", "run", "mcp-databend"],
      "env": {
        "DATABEND_DSN": "your-connection-string-here"
      }
    }
  }
}
```

#### Supported Clients

- **Windsurf** / **Claude Desktop** / **Continue.dev** / **Cursor IDE**

### Step 4: Start Using

Once configured, you can ask your AI assistant to:
- "Show me all databases"
- "List tables in the sales database"
- "Describe the users table structure"
- "Run this SQL query: SELECT * FROM products LIMIT 10"

## Development

```bash
# Clone and setup
git clone https://github.com/databendlabs/mcp-databend
cd mcp-databend
uv sync

# Run locally
uv run python -m mcp_databend.main
```
