# ๐ฏ MCP Data Visualization Server - Pip Package
Transform natural language into beautiful data visualizations using Claude Desktop and DuckDB with one-command installation!
## โจ Key Features
- **๐ One-Command Installation**: `pip install mcp-visualization-duckdb`
- **๐ง Automatic Configuration**: Automatically configures Claude Desktop
- **๐ฌ Natural Language Interface**: Chat with Claude to create visualizations
- **๐ Interactive Charts**: Plotly-powered HTML widgets
- **๐๏ธ DuckDB Integration**: Fast analytical database
- **โก No External Dependencies**: Works entirely offline with Claude Desktop
## ๐ Quick Installation
### Method 1: Pip Install (Recommended)
```bash
# Install the package
pip install mcp-visualization-duckdb
# Configure Claude Desktop automatically
mcp-viz configure
# Restart Claude Desktop and start chatting!
```
### Method 2: Interactive Setup
```bash
pip install mcp-visualization-duckdb
mcp-viz configure
# Follow the interactive prompts to customize your setup
```
### Method 3: Automatic Setup
```bash
pip install mcp-visualization-duckdb
mcp-viz configure --auto
# Uses default settings without prompts
```
## ๐ง CLI Commands
Once installed, you have access to the `mcp-viz` command:
```bash
# Configuration
mcp-viz configure # Interactive setup
mcp-viz configure --auto # Automatic setup with defaults
mcp-viz configure --force # Update existing configuration
# Management
mcp-viz status # Check configuration status
mcp-viz test # Test server functionality
mcp-viz list-servers # List configured MCP servers
mcp-viz remove # Remove server from Claude Desktop
# Database
mcp-viz create-db # Create sample database
mcp-viz create-db --path ./my-data.duckdb # Create at specific path
```
## ๐ฎ Usage with Claude Desktop
After installation and configuration, simply chat with Claude:
### Data Analysis
- **"What tables are available?"** - List database tables
- **"Analyze the sales table"** - Get table information
- **"Show me the top 10 products by revenue"** - Query data
### Creating Visualizations
- **"Create a bar chart of sales by region"** - Generate charts
- **"Show me the correlation between price and quantity"** - Scatter plots
- **"Make a pie chart of customer segments"** - Category breakdowns
- **"Visualize sales trends over time"** - Time series analysis
## ๐ What the Installation Does
The `mcp-viz configure` command automatically:
1. **๐ Detects Your Platform**: Finds Claude Desktop config on Windows/Mac/Linux
2. **๐ Creates Directories**: Sets up database and config directories
3. **โ๏ธ Configures Claude Desktop**: Adds MCP server to your config
4. **๐๏ธ Sets Up Database**: Creates default database with sample data
5. **โ
Validates Setup**: Tests that everything works correctly
## ๐ฅ๏ธ Cross-Platform Configuration
The package automatically detects and configures the correct Claude Desktop config file:
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
- **Mac**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Linux**: `~/.config/claude/claude_desktop_config.json`
## ๐ Configuration Example
After running `mcp-viz configure`, your Claude Desktop config will include:
```json
{
"mcpServers": {
"data-viz-server": {
"command": "/path/to/your/python",
"args": ["-m", "mcp_visualization.server"],
"cwd": "/path/to/package",
"env": {
"DUCKDB_DATABASE_PATH": "/home/user/.mcp-visualization/data.duckdb"
}
}
}
}
```
## ๐ Troubleshooting
### "Server not found" in Claude Desktop
```bash
# Check configuration status
mcp-viz status
# Test server functionality
mcp-viz test
# Reconfigure if needed
mcp-viz configure --force
```
### "Unknown tool" errors
```bash
# Verify server is properly configured
mcp-viz status
# Check if Claude Desktop config is valid
cat ~/.config/claude/claude_desktop_config.json # Linux
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json # Mac
```
### Permission issues
```bash
# On Linux/Mac, ensure config directory exists
mkdir -p ~/.config/claude # Linux
mkdir -p ~/Library/Application\ Support/Claude # Mac
# Re-run configuration
mcp-viz configure
```
## ๐ฏ Example Installation Session
```bash
$ pip install mcp-visualization-duckdb
Successfully installed mcp-visualization-duckdb-0.1.0
$ mcp-viz configure
๐ฏ MCP Data Visualization Server
๐ง Setting up Claude Desktop integration...
๐ Current Configuration Status:
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Setting โ Value โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Platform โ Linux โ
โ Config Path โ /home/user/.config/claude/... โ
โ Config Exists โ โ
Yes โ
โ Config Valid โ โ
Yes โ
โ Existing Servers โ None โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Configuration Options:
Database path [/home/user/.mcp-visualization/data.duckdb]:
Python executable [/home/user/.venv/bin/python]:
๐ Configuration Preview:
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Setting โ Value โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Server Name โ data-viz-server โ
โ Database โ /home/user/.mcp-visualization/data.duckdbโ
โ Python Path โ /home/user/.venv/bin/python โ
โ Config File โ /home/user/.config/claude/... โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Proceed with configuration? [Y/n]: Y
๐ Applying configuration...
โ
Successfully configured 'data-viz-server' for Claude Desktop
๐ Next steps:
1. Restart Claude Desktop completely
2. Open a new conversation
3. Try: 'What MCP servers are available?'
4. Try: 'List available tables'
โน๏ธ Your MCP Data Visualization Server is ready! ๐
```
## ๐ ๏ธ Development Installation
For development or contributing:
```bash
# Clone repository
git clone https://github.com/your-username/mcp-visualization-duckdb.git
cd mcp-visualization-duckdb
# Install in development mode
pip install -e .
# Install development dependencies
pip install -e .[dev]
# Run tests
pytest
# Configure for development
mcp-viz configure --python-path $(which python)
```
## ๐ฆ PyPI Package Information
- **Package Name**: `mcp-visualization-duckdb`
- **PyPI URL**: `https://pypi.org/project/mcp-visualization-duckdb/`
- **Source Code**: `https://github.com/your-username/mcp-visualization-duckdb`
- **Documentation**: Available in README and package docstrings
## ๐ค Contributing
We welcome contributions! The package is structured for easy development:
```
mcp-visualization-duckdb/
โโโ mcp_visualization/ # Main package
โ โโโ cli.py # Command-line interface
โ โโโ claude_config.py # Claude Desktop integration
โ โโโ server.py # MCP server entry point
โ โโโ mcp_server/ # MCP protocol implementation
โ โโโ database/ # Database management
โ โโโ visualization/ # Chart generation
โ โโโ config/ # Configuration management
โโโ pyproject.toml # Package configuration
โโโ README.md # Documentation
```
---
**Ready to transform your data analysis with Claude Desktop?**
```bash
pip install mcp-visualization-duckdb && mcp-viz configure
```
๐ **That's it!** Start chatting with Claude about your data!