Skip to content

[Feature]: Improve Local Development with Python Debugger Support #361

@dsprahul-tyson

Description

@dsprahul-tyson

Is your feature request related to a problem?

Currently, the dev task in the Taskfile.yml starts the dbt-mcp server with the default STDIO transport. While this is functional for use with the MCP Inspector, it poses a significant challenge for debugging Python code interactively with a debugger. It's not possible to have two clients connected to the same server simultaneously with this transport. This means a developer cannot attach a Python debugger (like debugpy) and also have a separate client to trigger tool calls, which is essential for hitting breakpoints and inspecting code.

This limitation makes the development and debugging workflow for new contributors less intuitive and more difficult than it needs to be.

Describe the solution you'd like

  1. Update the Documentation: Add a section to the development documentation that explains how to run the dbt-mcp server in a way that supports a debugger. This would involve running the server with the streamable-http transport option, which starts an HTTP server.

  2. Update the Default dev Task: As a more direct improvement, consider changing the default dev task in Taskfile.yml to use transport="streamable-http" by default. This would provide a better out-of-the-box experience for all developers and make debugging seamless without requiring them to discover this configuration on their own.

Describe alternatives you've considered

There are no clear alternatives to enabling a multi-client connection for a seamless debugging experience. The current approach of using STDIO transport simply does not support this common development pattern.

Additional context

When the dbt-mcp server is initiated with the transport="streamable-http" option, it starts as an HTTP server on a default host and port. This allows a debugger to attach to the process while also allowing other clients to make HTTP requests to trigger tool calls. When a tool is triggered, any breakpoints set in the code will be hit, and the developer can step through the code as expected.

This is a very common and effective pattern for developing and debugging server applications, and making it a documented or default part of the dbt-mcp development process would be a great enhancement for the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    devexImprovements to the development experience, including testing, releasing, and versioning.enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions