For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

  • Validate replication and pipeline configurations

  • Create and test API specifications

  • Discover schemas, tables, and columns

Execute replications and pipelines with sling run. Execute SQL models with sling build run. MCP does not run those jobs.

For a hosted Sling Platform project, use the Platform MCP server instead. Stdio (this server) is for local env.yaml / files; HTTP Platform MCP is for the hosted project. Tool nouns are disjoint (connection here vs connections on the platform).

Sling MCP Demo

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 connections

  • discover - Discover tables, files, or endpoints in a connection

  • test - Test connection validity

  • set - Create or update a connection

  • docs - Fetch connection documentation

2. Database Tool

Provides database-specific operations for querying and schema exploration.

Actions:

  • docs - Fetch database documentation

  • query - Execute SQL queries (read-only by default)

  • query_cancel - Cancel a running query by query_id

  • get_schemata - Get detailed schema information (databases, schemas, tables, columns)

  • get_schemas - List available schemas

  • get_columns - Get column metadata for specific tables

3. File System Tool

Manages files across local and cloud storage systems.

Actions:

  • list - List files and directories

  • copy - Copy files between connections

  • inspect - Get file metadata and statistics

  • docs - Fetch file system documentation

4. API Spec Tool

Creates and manages API specifications for REST APIs.

Actions:

  • parse - Parse and validate API specification files

  • test - Test API endpoints defined in specifications

  • docs - Fetch API specification documentation

5. Replication Tool

Validates data replication configurations. Execute with sling run -r file.yaml — there is no MCP run action.

Actions:

  • docs - Fetch replication documentation

  • validate - Validate and compile a replication YAML file

6. Pipeline Tool

Validates data pipeline configurations. Execute with sling run -p file.yaml — there is no MCP run action. SQL models use sling build.

Actions:

  • docs - Fetch pipeline documentation

  • validate - Validate a pipeline YAML file

Installation

The fastest path is sling assist setup. It detects local agents and writes MCP config for each one. Use the steps below if you want to wire MCP by hand.

Prerequisites

  1. Install Sling CLI: Follow the installation guide

  2. Verify installation: Run sling --version

  3. Set up connections: Configure your database and storage connections using environment variables

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:

User Configuration (Global)

  1. Open Command Palette (Cmd+Shift+P or Ctrl+Shift+P)

  2. Run MCP: Add Server

  3. Select "Global"

  4. Enter configuration:

Using with Copilot

  1. Open Chat view (Ctrl+Alt+I or Cmd+Alt+I)

  2. Select "Agent mode" from the dropdown

  3. Click "Tools" button to see available Sling tools

  4. Start using Sling commands in your prompts

Sling MCP on VSCode
Sling MCP on VSCode
Sling MCP on VSCode

Claude Desktop

Claude Desktop supports MCP servers through a configuration file. Here's how to set up Sling:

  1. Open the configuration file:

  1. Add the Sling MCP server configuration:

  1. Restart Claude Desktop

  2. Look for the MCP indicator (🔌) in the bottom-right corner of the chat input

  1. Open the configuration file at:

  1. Add the Sling MCP server configuration:

  1. Restart Claude Desktop

  2. Look for the MCP indicator (🔌) in the bottom-right corner of the chat input

Sling MCP on Claude Desktop
Sling MCP on Claude Desktop
Sling MCP on Claude Desktop

Claude Code

Claude Code supports MCP servers at three configuration scopes:

Local Scope (Project-specific)

Project Scope (Shared with team)

Create .mcp.json in your project root:

User Scope (Global)

Alternatively, edit ~/.claude.json directly:

ChatGPT Desktop

For now, you can use bridge solutions like the chatgpt-mcp server that enables MCP interaction through the ChatGPT macOS app:

Usage Examples

Querying a Database

Simple Analysis Prompt to AI Assistant:

The assistant will construct and execute:

Long queries are supported. Interrupting the client (Ctrl+C / Escape) cancels the running query. To cancel from a concurrent tool call, pass query_id on query and call query_cancel with that id (idempotent; returns {cancelled: bool}).

Table Comparison Prompt to AI Assistant:

The assistant will construct and execute multiple queries and return a summary.

Discovering Database Tables

Prompt to AI Assistant:

The assistant will use:

Copying Files Between Storage Systems

Prompt to AI Assistant:

The assistant will execute:

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:

Argument
Required
Description

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:

  1. Fetches Sling API spec documentation

  2. Analyzes the target API documentation (using browser if available)

  3. Creates the specification file

  4. Creates or uses existing connection

  5. 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:

Argument
Required
Description

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:

  1. Fetches Sling API spec documentation

  2. Loads and parses the existing specification

  3. Analyzes endpoint documentation

  4. Implements the new endpoint following existing patterns

  5. 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:

Argument
Required
Description

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:

  1. Fetches Sling API spec documentation

  2. Loads and examines the current specification

  3. Analyzes API documentation for verification

  4. Tests and diagnoses issues

  5. 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 sling

  • VSCode: Use Command Palette > "MCP: Show Logs"

Debug Output

Enable trace logging for detailed debugging:

Resources

Last updated

Was this helpful?