MCP Server
Use Sling CLI as an MCP (Model Context Protocol) server to enable AI assistants to interact with databases, files, and APIs
Overview
The Sling CLI includes a built-in MCP (Model Context Protocol) server that enables AI assistants like Claude, ChatGPT, and GitHub Copilot to interact with your data infrastructure through a standardized interface. MCP is an open protocol that allows AI models to connect to external tools and data sources safely and efficiently.
By running sling mcp, you expose Sling's powerful data movement and transformation capabilities to AI assistants, enabling them to:
Query and explore databases across 30+ database systems
Manage files across cloud storage providers (S3, Azure, GCS, etc.)
Execute data replications and pipelines
Create and test API specifications
Discover schemas, tables, and columns
Core Capabilities
The Sling MCP server exposes six main tools that AI assistants can use:
1. Connection Tool
Manages connections to databases, file systems, and APIs.
Actions:
list- List all configured connectionsdiscover- Discover tables, files, or endpoints in a connectiontest- Test connection validityset- Create or update a connectiondocs- Fetch connection documentation
2. Database Tool
Provides database-specific operations for querying and schema exploration.
Actions:
docs- Fetch database documentationquery- Execute SQL queries (read-only by default)get_schemata- Get detailed schema information (databases, schemas, tables, columns)get_schemas- List available schemasget_columns- Get column metadata for specific tables
3. File System Tool
Manages files across local and cloud storage systems.
Actions:
list- List files and directoriescopy- Copy files between connectionsinspect- Get file metadata and statisticsdocs- Fetch file system documentation
4. API Spec Tool
Creates and manages API specifications for REST APIs.
Actions:
parse- Parse and validate API specification filestest- Test API endpoints defined in specificationsdocs- Fetch API specification documentation
5. Replication Tool
Executes data replication configurations.
Actions:
parse- Parse replication YAML filescompile- Compile and validate replicationsrun- Execute replicationsdocs- Fetch replication documentation
6. Pipeline Tool
Manages and executes data pipelines.
Actions:
parse- Parse pipeline configurationsrun- Execute pipelinesdocs- Fetch pipeline documentation
Installation
Prerequisites
Install Sling CLI: Follow the installation guide
Verify installation: Run
sling --versionSet up connections: Configure your database and storage connections using environment variables
Optional: Obtain a Sling CLI Pro license for full functionality
VSCode with GitHub Copilot
GitHub Copilot in VSCode supports MCP servers through workspace or user configuration:
Workspace Configuration
Create .vscode/mcp.json in your project root:
{
"servers": {
"sling": {
"type": "stdio",
"command": "sling",
"args": ["mcp"],
"env": {
"SLING_CLI_TOKEN": "your-token-here"
}
}
}
}User Configuration (Global)
Open Command Palette (
Cmd+Shift+PorCtrl+Shift+P)Run
MCP: Add ServerSelect "Global"
Enter configuration:
{
"name": "sling",
"type": "stdio",
"command": "sling",
"args": ["mcp"],
"env": {
"SLING_CLI_TOKEN": "your-token-here"
}
}Using with Copilot
Open Chat view (
Ctrl+Alt+IorCmd+Alt+I)Select "Agent mode" from the dropdown
Click "Tools" button to see available Sling tools
Start using Sling commands in your prompts



Claude Desktop
Claude Desktop supports MCP servers through a configuration file. Here's how to set up Sling:
Open the configuration file:
open ~/Library/Application\ Support/Claude/claude_desktop_config.jsonAdd the Sling MCP server configuration:
{
"mcpServers": {
"sling": {
"command": "sling",
"args": ["mcp"],
"env": {
"SLING_CLI_TOKEN": "your-token-here"
}
}
}
}Restart Claude Desktop
Look for the MCP indicator (🔌) in the bottom-right corner of the chat input
Open the configuration file at:
%APPDATA%\Claude\claude_desktop_config.jsonAdd the Sling MCP server configuration:
{
"mcpServers": {
"sling": {
"command": "sling",
"args": ["mcp"],
"env": {
"SLING_CLI_TOKEN": "your-token-here"
}
}
}
}Restart Claude Desktop
Look for the MCP indicator (🔌) in the bottom-right corner of the chat input



Claude Code
Claude Code supports MCP servers at three configuration scopes:
Local Scope (Project-specific)
# Add for current project only
claude mcp add sling --args "mcp" --env SLING_CLI_TOKEN=your-token-hereProject Scope (Shared with team)
Create .mcp.json in your project root:
{
"servers": {
"sling": {
"type": "stdio",
"command": "sling",
"args": ["mcp"],
"env": {
"SLING_CLI_TOKEN": "${SLING_CLI_TOKEN}"
}
}
}
}User Scope (Global)
# Add globally for all projects
claude mcp add sling --scope user --args "mcp" --env SLING_CLI_TOKEN=your-token-hereAlternatively, edit ~/.claude.json directly:
{
"mcpServers": {
"sling": {
"command": "sling",
"args": ["mcp"],
"env": {
"SLING_CLI_TOKEN": "your-token-here"
}
}
}
}ChatGPT Desktop
Note: As of 2025, OpenAI has announced plans to add native MCP support to ChatGPT Desktop, but implementation is pending. Check the OpenAI Developer Community for updates.
For now, you can use bridge solutions like the chatgpt-mcp server that enables MCP interaction through the ChatGPT macOS app:
{
"mcpServers": {
"chatgpt-sling-bridge": {
"command": "uvx",
"args": ["chatgpt-mcp"],
"env": {
"SLING_MCP_COMMAND": "sling mcp",
"SLING_CLI_TOKEN": "your-token-here"
}
}
}
}Usage Examples
Querying a Database
Simple Analysis Prompt to AI Assistant:
Use sling connection `postgres_prod` to query the sales table in my warehouse connection and show me the top 10 revenue generating products this monthThe assistant will construct and execute:
{
"action": "query",
"input": {
"connection": "postgres_prod",
"query": "SELECT product_id, SUM(revenue) as total_revenue FROM sales WHERE date >= '2025-01-01' GROUP BY product_id ORDER BY total_revenue DESC LIMIT 10"
}
}
Table Comparison Prompt to AI Assistant:
Use sling in connection `snowflake_dw` to compare the tables: dbt_dev.core_transactions (dev table) and finance.core_transactions (prod table). Compare the counts and null counts as well as distinct counts.The assistant will construct and execute multiple queries and return a summary.
Discovering Database Tables
Prompt to AI Assistant:
Using Sling, show me all tables in my `postgres_rds` connection that start with "customer_"The assistant will use:
{
"action": "discover",
"input": {
"connection": "postgres_rds",
"pattern": "*.customer_*"
}
}Copying Files Between Storage Systems
Prompt to AI Assistant:
Use sling to copy all CSV files from connection `aws_s3` folder "raw/2025/" to connection `AZURE_PROD` "processed/" folderThe assistant will execute:
{
"action": "copy",
"input": {
"source_location": "aws_s3/raw/2025/*.csv",
"target_location": "azure_prod/processed/",
"recursive": true
}
}MCP Prompts
The Sling MCP server provides specialized prompts that guide AI assistants through complex API specification workflows. These prompts are pre-built conversation templates that help with creating, extending, and debugging API integrations.
api_spec_create_spec
Creates a complete Sling API specification from scratch by analyzing API documentation and building endpoints with authentication, pagination, and data extraction configuration.
Arguments:
spec_name
Yes
Name for the API specification (used as filename)
spec_file_path
No
Full file path for the spec file
connection_name
Yes
Name for the API connection to create and test
api_docs_url
Yes
URL to the API documentation website
endpoint_names
Yes
Comma-separated list of endpoint names to include
additional_info
No
Additional instructions or requirements
Workflow:
Fetches Sling API spec documentation
Analyzes the target API documentation (using browser if available)
Creates the specification file
Creates or uses existing connection
Tests and iterates until endpoints work correctly
api_spec_add_endpoint
Adds a new endpoint to an existing Sling API specification by analyzing endpoint documentation and implementing proper configuration.
Arguments:
spec_file_path
Yes
Full file path to the existing spec file
endpoint_name
Yes
Name of the new endpoint to add
endpoint_docs_url
No
URL to the specific endpoint documentation
additional_info
No
Additional instructions for the implementation
Workflow:
Fetches Sling API spec documentation
Loads and parses the existing specification
Analyzes endpoint documentation
Implements the new endpoint following existing patterns
Tests until the endpoint returns data successfully
api_spec_debug_endpoint
Debugs and fixes issues with an existing endpoint in a Sling API specification by analyzing errors and adjusting configuration.
Arguments:
spec_file_path
Yes
Full file path to the spec file
endpoint_name
Yes
Name of the endpoint to debug and fix
additional_info
No
Additional context about the issues
Workflow:
Fetches Sling API spec documentation
Loads and examines the current specification
Analyzes API documentation for verification
Tests and diagnoses issues
Fixes configuration and iterates until successful
Common issues checked:
Authentication (token format, headers, auth type)
URL construction (base URLs, parameter encoding)
Data extraction (JMESPath expressions)
Pagination (next page logic, stop conditions)
Rate limiting (request rates, backoff strategies)
Troubleshooting
Log Locations
Claude Desktop:
~/Library/Logs/Claude/(macOS) or%APPDATA%\Claude\logs\(Windows)Claude Code: View logs with
claude mcp logs slingVSCode: Use Command Palette > "MCP: Show Logs"
Debug Output
Enable trace logging for detailed debugging:
{
"mcpServers": {
"sling": {
"command": "sling",
"args": ["mcp"],
"env": {
"SLING_CLI_TOKEN": "your-token-here",
"DEBUG": "TRACE"
}
}
}
}Resources
Pro Tip: Start with simple operations like listing connections and discovering tables before moving to complex replications and pipelines. This helps you understand how the AI assistant interacts with your data infrastructure.
Last updated
Was this helpful?