BDK MCP Client Configuration¶
Overview¶
This page documents how to configure common MCP clients. For day-to-day usage, prompts, runtime selection and troubleshooting, see DevKit MCP.
Challenges¶
MCP clients use different repository configuration files and JSON shapes. DevKit contributors must launch the CLI from the current source tree, while consuming applications should launch the version pinned in their local .NET tool manifest. User-specific IDE state should remain outside source control.
Solution¶
Use a source-controlled STDIO server definition where the client supports one. Point DevKit repository configurations at src/Presentation.Cli/Presentation.Cli.csproj; point consuming repositories at dotnet tool run bdk mcp. Keep the application host separate because the MCP process discovers an already-running Development host.
Key Features¶
- Repository-level configuration for VS Code and GitHub Copilot through a workspace-root
.mcp.json. - Visual Studio configuration through
.vs/mcp.json. - A documented Rider server definition without committing
.ideauser state. - Separate source-run and packaged-tool command shapes.
- Diagnostics, operations and admin toolsets enabled in every documented client configuration, with a diagnostics-only fallback.
Architecture¶
flowchart LR
Config[Repository or IDE MCP configuration] --> Client[MCP client]
Client -->|starts STDIO process| Dotnet[dotnet]
Dotnet --> CLI[bdk mcp]
CLI -->|documentation and guidance| Sources[Embedded docs and guidance]
CLI -->|workspace discovery and local IPC| Host[Running DevKit web host]
The MCP client owns process startup and communicates with bdk mcp over STDIO. Documentation and API lookup read embedded assembly resources without online fallback. The CLI resolves the workspace and forwards runtime tools to a separately running host.
Use Cases¶
- Let Visual Studio or VS Code discover a DevKit MCP server from source control.
- Configure Rider without committing its user-specific project settings.
- Test current CLI source while contributing to bITdevKit.
- Pin the packaged CLI version in a consuming application's tool manifest.
- Enable operations or admin tools only for repositories that need them.
Basic Usage¶
In a consuming repository, create a local tool manifest if one does not exist, install the CLI and verify the command before configuring the MCP client:
if (-not (Test-Path '.config/dotnet-tools.json')) {
dotnet new tool-manifest
if ($LASTEXITCODE -ne 0) {
throw "Could not create the local tool manifest."
}
}
$localTools = dotnet tool list --local
if ($localTools -match 'bridgingit\.devkit\.cli') {
dotnet tool restore
} else {
dotnet tool install BridgingIT.DevKit.Cli
}
if ($LASTEXITCODE -ne 0) {
throw "Could not install or restore repository tools."
}
dotnet tool run bdk version --output json
if ($LASTEXITCODE -ne 0) {
throw "The bdk tool did not start successfully."
}
Add this server definition to the client-specific file described below. VS Code and Copilot read the portable mcpServers shape from a workspace-root .mcp.json:
{
"mcpServers": {
"bdk": {
"command": "dotnet",
"args": [
"tool",
"run",
"bdk",
"mcp",
"--toolset",
"diagnostics,operations,admin"
]
}
}
}
Visual Studio (.vs/mcp.json) uses a top-level servers object with an explicit type:
{
"servers": {
"bdk": {
"type": "stdio",
"command": "dotnet",
"args": [
"tool",
"run",
"bdk",
"mcp",
"--toolset",
"diagnostics,operations,admin"
]
}
}
}
Reload the MCP client and call bdk_mcp_status. Treat available: false as a handled unavailable result and use its code, reason and suggested next calls. An available response shows the resolved workspace and server status.
Embedded documentation¶
The local MCP tool contains the public DevKit Markdown and generated API metadata in its assembly. No documentation download, repository checkout, or running application is required. The server ignores tool/application version differences and reports source embedded through bdk_mcp_status.
After reinstalling the local tool, restart or reload its MCP connection to use the new embedded content. Changing a source document does not update an already-running or installed tool.
Source Debug builds embed Markdown automatically and skip API generation. API lookup can return documentation_unavailable until generated metadata is available. Release builds and packaging generate that metadata. See Documentation and API tools for the authoring flow, build commands, index-only completeness marker, and document continuation.
Repository configurations¶
This repository is the bdk CLI source repository. The checked-in workspace-root .mcp.json offers both bdk_local (source) and bdk (the packaged local tool):
{
"mcpServers": {
"bdk_local": {
"command": "dotnet",
"args": [
"run",
"--project",
"src/Presentation.Cli/Presentation.Cli.csproj",
"--",
"mcp",
"--toolset",
"diagnostics,operations,admin"
]
},
"bdk": {
"command": "dotnet",
"args": [
"tool",
"run",
"bdk",
"mcp",
"--toolset",
"diagnostics,operations,admin"
]
}
}
}
Visual Studio (.vs/mcp.json) running the CLI from source:
{
"servers": {
"bdk": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"src/Presentation.Cli/Presentation.Cli.csproj",
"--",
"mcp",
"--toolset",
"diagnostics,operations,admin"
]
}
}
}
The relative project path requires the MCP process to start with the repository root as its working directory.
For applications that consume the packaged CLI as a local .NET tool, use this command after creating or locating a tool manifest:
dotnet tool install BridgingIT.DevKit.Cli
{
"mcpServers": {
"bdk": {
"command": "dotnet",
"args": [
"tool",
"run",
"bdk",
"mcp",
"--toolset",
"diagnostics,operations,admin"
]
}
}
}
Full toolset¶
Every configuration on this page passes --toolset diagnostics,operations,admin, which enables the operations and admin tools in addition to diagnostics. Admin tools still require operation-specific confirmation arguments.
To restrict a client to diagnostics only, remove "--toolset" and its value from args. Rider uses the same arguments as the other clients:
["tool", "run", "bdk", "mcp", "--toolset", "diagnostics,operations,admin"]
Visual Studio discovers .vs/mcp.json with a top-level servers object (the servers shape shown above, with "type": "stdio").
VS Code¶
VS Code and GitHub Copilot read a workspace-root .mcp.json with a top-level mcpServers object. A plain command and args entry is enough; type and tools are not required. For a personal configuration shared across workspaces, use $COPILOT_HOME/mcp-config.json (~/.copilot/mcp-config.json) with the same format.
Portable files support environment variable references as ${NAME} or ${NAME:-default}, but not VS Code input variables or envFile. The bdk servers need none of these.
To make VS Code pick up the workspace-root .mcp.json:
-
Enable the experimental setting, then run Developer: Reload Window:
"chat.mcp.workspaceRootConfig.enabled": true -
Open Chat: Open Customizations and select MCP Servers under the Copilot harness.
bdkappears there and may ask for trust or start approval.
The default (Local) Configure Tools picker in the chat input does not list servers from the workspace-root .mcp.json; use the Copilot harness view instead. You can also start, stop and restart the server with the actions shown above its entry in the .mcp.json editor.
Rider¶
Rider stores MCP server definitions through JetBrains AI Assistant settings rather than a documented source-controlled project file. Add this server in Rider's MCP settings:
{
"mcpServers": {
"bdk": {
"command": "dotnet",
"args": [
"run",
"--project",
"src/Presentation.Cli/Presentation.Cli.csproj",
"--",
"mcp",
"--toolset",
"diagnostics,operations,admin"
]
}
}
}
For consuming applications, replace the Rider args with:
["tool", "run", "bdk", "mcp", "--toolset", "diagnostics,operations,admin"]
Verification¶
After reloading the client:
- Confirm that the expected
bdkorbdk_localserver is connected. - Call
bdk_mcp_status; this does not require a selected runtime. - Start a DevKit web host in Development for runtime tools.
- Call
bdk_runtimes_listand select a runtime when more than one is ready. - Call
bdk_mcp_self_testto check embedded documentation, IPC, protocol, and capability discovery. Documentation results remain available when no runtime is selected.
All configurations enable diagnostics, operations and admin so the full catalog is available. Admin tools still require operation-specific confirmation arguments. Remove the --toolset argument for a diagnostics-only server; see Full toolset.