feat: wire Server B and add multi-project tests and documentation#662
Draft
DevonFulcher wants to merge 44 commits intomainfrom
Draft
feat: wire Server B and add multi-project tests and documentation#662DevonFulcher wants to merge 44 commits intomainfrom
DevonFulcher wants to merge 44 commits intomainfrom
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This will be introduced in the first phase where it has non-empty content. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove get_config_for_project() from all config providers. Each multiproject semantic layer tool now calls _resolve_sl_config_for_project() which fetches credentials, builds the platform URL/headers, calls get_environments_for_project() directly, and returns the config via DefaultSemanticLayerConfigProvider._build_config(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add multi_project_only_toolsets set to toolsets.py and update generate_docs.py to skip those toolsets when generating README and diagram documentation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
diagram.d2 is already correct (multi-project toolset excluded). Restoring d2.png to match the unchanged diagram source. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ools Multi-project server cannot run alongside single-project server, so tools share the same names (list_metrics, not list_metrics_for_project) and are controlled by the same env vars (DISABLE_SEMANTIC_LAYER). Remove MULTI_PROJECT_SEMANTIC_LAYER toolset, multi_project_only_toolsets, and multi_project_tools variables. Remove disable/enable_multi_project_semantic_layer settings fields. Remove multi_project_only_toolsets filtering from generate_docs.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5936e5e to
c0eb426
Compare
…erConfigProvider Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c95b01d to
bb5b68c
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nticLayerFetcher Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add config_override parameter to all discovery client methods (MetadataAPIClient, PaginatedResourceFetcher, ModelsFetcher, ExposuresFetcher, SourcesFetcher, MacrosFetcher, ResourceDetailsFetcher, LineageFetcher, ModelPerformanceFetcher) to support per-call config overrides for multi-project mode. Create tools_multiproject.py with all 18 discovery tools mirroring Server A, each taking project_id as a required first parameter. Add get_config_for_project() to ConfigProvider ABC for multi-project config resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add config_override parameter to all discovery client methods (MetadataAPIClient, PaginatedResourceFetcher, ModelsFetcher, ExposuresFetcher, SourcesFetcher, MacrosFetcher, ResourceDetailsFetcher, LineageFetcher, ModelPerformanceFetcher) to support per-call config overrides for multi-project mode. Create tools_multiproject.py with all 18 discovery tools mirroring Server A, each taking project_id as a required first parameter. Add get_config_for_project() to ConfigProvider ABC for multi-project config resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… tools Multi-project server cannot run alongside single-project server, so tools share the same names (text_to_sql, not text_to_sql_for_project) and are controlled by the same env vars (DISABLE_SQL, DISABLE_ADMIN_API). Remove _FOR_PROJECT ToolName entries, remove from toolsets dict. Rename multi-project tool functions and MCP names to match single-project. Separate MULTIPROJECT_ADMIN_API_TOOLS from ADMIN_TOOLS. Add register_multiproject_admin_api_tools function. Remove unused _for_project prompt files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add config_override parameter to all discovery client methods (MetadataAPIClient, PaginatedResourceFetcher, ModelsFetcher, ExposuresFetcher, SourcesFetcher, MacrosFetcher, ResourceDetailsFetcher, LineageFetcher, ModelPerformanceFetcher) to support per-call config overrides for multi-project mode. Create tools_multiproject.py with all 18 discovery tools mirroring Server A, each taking project_id as a required first parameter. Add get_config_for_project() to ConfigProvider ABC for multi-project config resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Register all multi-project tools in create_dbt_mcp_multiproject(): list_projects_and_environments, 18 discovery tools, 6 semantic layer tools, text_to_sql_for_project, execute_sql_for_project, list_jobs_for_project, list_jobs_runs_for_project - Add discovery/tools_multiproject.py with 18 discovery tools that accept project_id and use per-call config_override for environment resolution - Update tool_names.py and toolsets.py with SQL and admin multi-project tool entries and multiproject_only_tools set - Add unit tests for Server B in tests/unit/mcp/test_server_multiproject.py - Add unit tests for resolve_environments() in tests/unit/project/ - Add multi-project mode documentation to README.md - Add DBT_MCP_MULTI_PROJECT_ENABLED to .env.example Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…s on Server B Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add `multi_project_only_toolsets` to toolsets.py containing all Server-B-only toolsets and filter them out during README and diagram generation so they don't appear in public-facing docs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…uffix) Multi-project tools reuse the same MCP tool names as single-project tools (e.g., "list_metrics" not "list_metrics_for_project") — they just add a project_id parameter. The multi-project server cannot run alongside the single-project server, so there is no name collision. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add _resolve_project_environments and ProjectSemanticLayerConfigProvider to config_providers (lost during conflict resolution) - Add get_config_for_project to DefaultProxiedToolConfigProvider - Map _for_project tools to toolsets - Fix server_multiproject imports and call signatures - Update tests for renamed tool names - Fix missing await on get_environments_for_project Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bb5b68c to
531c4ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Multi-project mode (Server B) needs to register all tool categories so that
DBT_MCP_MULTI_PROJECT_ENABLED=trueprovides a fully functional MCP server. The previous phases (1-6) added the individual tool categories; this PR combines them and wires everything together with tests and documentation.What
server_multiproject.pynow registers all multi-project tools:_for_projectvariants)config_override)text_to_sql_for_project,execute_sql_for_project)list_jobs_for_project,list_jobs_runs_for_project) includinglist_projectsfor project discoverymain.pycallscreate_dbt_mcp_multiproject()whenDBT_MCP_MULTI_PROJECT_ENABLED=trueresolve_environments()helpermultiproject_only_toolsset intoolsets.pytracks all Server B-exclusive tools for validationNotes
list_projectstool from the admin API (register_admin_api_tools), rather than a separatelist_projects_and_environmentsdiscovery tool. TheToolset.PROJECTandlist_projects_and_environmentstool have been removed entirely.list_jobs_for_project,list_jobs_runs_for_project) are registered on both Server A and Server B since they use the sharedregister_admin_api_tools()pathDrafted by Claude Sonnet 4.6 under the direction of @DevonFulcher