chore: deprecate injected MCP approach in AI Bridge (#23031)

_Disclaimer: implemented by a Coder Agent using Claude Opus 4.6._

Marks the injected MCP approach in AI Bridge as deprecated across the
codebase.

## Changes

- **`codersdk/deployment.go`**: Deprecated `ExternalAuthConfig.MCPURL`,
`.MCPToolAllowRegex`, `.MCPToolDenyRegex` fields; deprecated and hid the
`--aibridge-inject-coder-mcp-tools` server flag; deprecated
`AIBridgeConfig.InjectCoderMCPTools`.
- **`coderd/externalauth/externalauth.go`**: Deprecated `Config.MCPURL`,
`.MCPToolAllowRegex`, `.MCPToolDenyRegex`.
- **`enterprise/aibridgedserver/aibridgedserver.go`**: Added runtime
deprecation warning when `CODER_AIBRIDGE_INJECT_CODER_MCP_TOOLS` is
enabled; deprecated `getCoderMCPServerConfig`.
- **`enterprise/aibridged/mcp.go`**: Deprecated `MCPProxyBuilder`
interface and `MCPProxyFactory` struct.
- **`docs/ai-coder/ai-bridge/mcp.md`**: Added deprecation warning
banner.
This commit is contained in:
Danny Kopping
2026-03-13 16:15:33 +02:00
committed by GitHub
parent df2360f56a
commit 870583224d
13 changed files with 61 additions and 42 deletions
+4
View File
@@ -12448,6 +12448,7 @@ const docTemplate = `{
"type": "boolean"
},
"inject_coder_mcp_tools": {
"description": "Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.",
"type": "boolean"
},
"max_concurrency": {
@@ -15336,12 +15337,15 @@ const docTemplate = `{
"type": "string"
},
"mcp_tool_allow_regex": {
"description": "Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.",
"type": "string"
},
"mcp_tool_deny_regex": {
"description": "Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.",
"type": "string"
},
"mcp_url": {
"description": "Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.",
"type": "string"
},
"no_refresh": {
+4
View File
@@ -11058,6 +11058,7 @@
"type": "boolean"
},
"inject_coder_mcp_tools": {
"description": "Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.",
"type": "boolean"
},
"max_concurrency": {
@@ -13858,12 +13859,15 @@
"type": "string"
},
"mcp_tool_allow_regex": {
"description": "Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.",
"type": "string"
},
"mcp_tool_deny_regex": {
"description": "Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.",
"type": "string"
},
"mcp_url": {
"description": "Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.",
"type": "string"
},
"no_refresh": {
+6
View File
@@ -95,14 +95,20 @@ type Config struct {
// AppInstallationsURL is an API endpoint that returns a list of
// installations for the user. This is used for GitHub Apps.
AppInstallationsURL string
// Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.
//
// MCPURL is the endpoint that clients must use to communicate with the associated
// MCP server.
MCPURL string
// Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.
//
// MCPToolAllowRegex is a [regexp.Regexp] to match tools which are explicitly allowed to be
// injected into Coder AI Bridge upstream requests.
// In the case of conflicts, [MCPToolDenylistPattern] overrides items evaluated by this list.
// This field can be nil if unspecified in the config.
MCPToolAllowRegex *regexp.Regexp
// Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.
//
// MCPToolDenyRegex is a [regexp.Regexp] to match tools which are explicitly NOT allowed to be
// injected into Coder AI Bridge upstream requests.
// In the case of conflicts, items evaluated by this list override [MCPToolAllowRegex].