DEV Community

Cover image for dlt MCP Server for Popular IDEs
Pizofreude
Pizofreude

Posted on

dlt MCP Server for Popular IDEs

Overview

This demo showcases how to set up and use the dlt MCP Server for data pipeline validation and inspection. The MCP server enables interactive querying and management of dlt pipelines, including data inspection, row counts, and load validation.


Prerequisites

  • UV installed on your local machine.
  • dlt workspace installed and configured.
  • A pyproject.toml file with the necessary dependencies.

Setup

1. Configure MCP Server

VS Code

  1. Open VS Code and access Settings (Command+Shift+P).
  2. Navigate to Tools > MCP.
  3. Click Add Custom MCP to create/open the mcp.json file.
  4. Add the configuration for the dlt MCP Server to mcp.json:
   {
     "name": "dlt-mcp-server",
     "command": "dlt pipeline ...",
     "args": ["--with", "duckdb"]
   }
Enter fullscreen mode Exit fullscreen mode
  • Ensure you include the duckdb dependency if using a DuckDB destination.
    1. Save the file. The MCP server will automatically update within a few seconds.

Cursor

  1. Open Cursor and access Settings (Command+,).
  2. Navigate to Extensions > MCP.
  3. Click Add Custom MCP to create/open the mcp.json file.
  4. Add the configuration for the dlt MCP Server to mcp.json:
   {
     "name": "dlt-mcp-server",
     "command": "dlt pipeline ...",
     "args": ["--with", "duckdb"]
   }
Enter fullscreen mode Exit fullscreen mode
  1. Save the file. The MCP server will automatically update within a few seconds.

Kiro

  1. Open Kiro and access Preferences (Command+,).
  2. Navigate to Plugins > MCP.
  3. Click Add Custom MCP to create/open the mcp.json file.
  4. Add the configuration for the dlt MCP Server to mcp.json:
   {
     "name": "dlt-mcp-server",
     "command": "dlt pipeline ...",
     "args": ["--with", "duckdb"]
   }
Enter fullscreen mode Exit fullscreen mode
  1. Save the file. The MCP server will automatically update within a few seconds.

Claude Desktop

  1. Open Claude Desktop and access Settings (Command+,).
  2. Navigate to Integrations > MCP.
  3. Click Add Custom MCP to create/open the mcp.json file.
  4. Add the configuration for the dlt MCP Server to mcp.json:
   {
     "name": "dlt-mcp-server",
     "command": "dlt pipeline ...",
     "args": ["--with", "duckdb"]
   }
Enter fullscreen mode Exit fullscreen mode
  1. Save the file. The MCP server will automatically update within a few seconds.

Other IDEs (e.g., PyCharm, IntelliJ, Sublime Text)

  1. Locate the MCP configuration section in your IDE's settings.
  2. Create or open the mcp.json file.
  3. Add the configuration for the dlt MCP Server to mcp.json:
   {
     "name": "dlt-mcp-server",
     "command": "dlt pipeline ...",
     "args": ["--with", "duckdb"]
   }
Enter fullscreen mode Exit fullscreen mode
  1. Save the file. The MCP server will automatically update within a few seconds.

Usage

1. Test MCP Server

  • Open a chat in your IDE and ask:
  What pipelines are available?
Enter fullscreen mode Exit fullscreen mode
  • The MCP server should list the available pipelines (e.g., GitHub pipeline).

2. Inspect Pipeline Data

  • Ask:
  What tables are in this pipeline?
Enter fullscreen mode Exit fullscreen mode
  • The server will list tables (e.g., commits, contributors).

    • Ask:
  When was the data last loaded?
Enter fullscreen mode Exit fullscreen mode
  • The server will provide the timestamp of the last data load.

3. Validate Data

  • Ask:
  How many rows are in the commits table?
Enter fullscreen mode Exit fullscreen mode
  • If the MCP server lacks dependencies (e.g., duckdb), it will throw an error. Update the mcp.json configuration to include the missing dependency and retry.

4. Agentic Help

  • Ask:
  How many rows will be extracted in the next run in commits?
Enter fullscreen mode Exit fullscreen mode
  • The MCP server will analyze the pipeline and confirm if incremental loading is applied. If not, it will fetch all existing rows plus any new data since the last run.

Troubleshooting

  • Dependency Errors: Ensure all required dependencies (e.g., duckdb) are included in the mcp.json configuration.
  • Configuration Updates: After modifying mcp.json, wait a few seconds for the MCP server to apply changes.
  • IDE-Specific Issues: Refer to your IDE's documentation for MCP-related troubleshooting.

Conclusion

The dlt MCP Server simplifies pipeline management by enabling interactive data inspection and validation. Customize the mcp.json configuration to support your specific pipeline destinations and dependencies.

Top comments (0)