Skip to content

feat: implement MCP HTTP server endpoint with authentication #18670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance
Choose a base branch
from

Conversation

ThomasK33
Copy link
Member

@ThomasK33 ThomasK33 commented Jun 30, 2025

Add MCP HTTP server with streamable transport support

  • Add MCP HTTP server with streamable transport support
  • Integrate with existing toolsdk for Coder workspace operations
  • Add comprehensive E2E tests with OAuth2 bearer token support
  • Register MCP endpoint at /api/experimental/mcp/http with authentication
  • Support RFC 6750 Bearer token authentication for MCP clients

Change-Id: Ib9024569ae452729908797c42155006aa04330af
Signed-off-by: Thomas Kosiewski [email protected]

@ThomasK33 ThomasK33 changed the title feat(mcp): implement MCP HTTP server with toolsdk integration feat: add MCP HTTP transport endpoint with authentication Jun 30, 2025
@ThomasK33 ThomasK33 marked this pull request as ready for review June 30, 2025 16:44
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from 4efb07a to 8a3f7a9 Compare June 30, 2025 16:45
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch from 4d966b2 to 4ffc58e Compare June 30, 2025 16:45
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from 8a3f7a9 to e7d56c2 Compare June 30, 2025 17:08
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch from 4ffc58e to 23804bb Compare June 30, 2025 17:08
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from e7d56c2 to 10701da Compare June 30, 2025 17:56
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch from 23804bb to 06d9b57 Compare June 30, 2025 17:56
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from 10701da to a2607a8 Compare July 1, 2025 09:15
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch from 06d9b57 to cee654a Compare July 1, 2025 09:15
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from a2607a8 to 990f706 Compare July 1, 2025 09:27
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch 2 times, most recently from 8cb9d74 to 3e540ef Compare July 1, 2025 13:23
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from 990f706 to 95c0496 Compare July 1, 2025 13:23
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from 95c0496 to b17d907 Compare July 1, 2025 13:43
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch from 3e540ef to 0447dc7 Compare July 1, 2025 13:44
@@ -972,6 +972,10 @@ func New(options *Options) *API {
r.Route("/aitasks", func(r chi.Router) {
r.Get("/prompts", api.aiTasksPrompts)
})
r.Route("/mcp", func(r chi.Router) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from 968207c to dea734b Compare July 2, 2025 12:08
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch from 06236c5 to 991aeb7 Compare July 2, 2025 12:08
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch from 991aeb7 to 7a4b271 Compare July 2, 2025 12:25
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch 2 times, most recently from 54086ed to f8aa2de Compare July 2, 2025 12:44
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch from 7a4b271 to 5496826 Compare July 2, 2025 12:44
@ThomasK33 ThomasK33 changed the title feat: add MCP HTTP transport endpoint with authentication feat: add MCP HTTP server endpoint with authentication Jul 2, 2025
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from f8aa2de to 9851f81 Compare July 2, 2025 13:58
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch 2 times, most recently from 3df9b80 to e32fba8 Compare July 2, 2025 14:06
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from 9851f81 to 43ac8a0 Compare July 2, 2025 14:06
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch from e32fba8 to d74cf24 Compare July 2, 2025 14:14
@ThomasK33 ThomasK33 changed the title feat: add MCP HTTP server endpoint with authentication feat: implement MCP HTTP server endpoint with authentication Jul 2, 2025
Comment on lines +19 to +36
const (
ToolNameReportTask = "coder_report_task"
ToolNameGetWorkspace = "coder_get_workspace"
ToolNameCreateWorkspace = "coder_create_workspace"
ToolNameListWorkspaces = "coder_list_workspaces"
ToolNameListTemplates = "coder_list_templates"
ToolNameListTemplateVersionParams = "coder_template_version_parameters"
ToolNameGetAuthenticatedUser = "coder_get_authenticated_user"
ToolNameCreateWorkspaceBuild = "coder_create_workspace_build"
ToolNameCreateTemplateVersion = "coder_create_template_version"
ToolNameGetWorkspaceAgentLogs = "coder_get_workspace_agent_logs"
ToolNameGetWorkspaceBuildLogs = "coder_get_workspace_build_logs"
ToolNameGetTemplateVersionLogs = "coder_get_template_version_logs"
ToolNameUpdateTemplateActiveVersion = "coder_update_template_active_version"
ToolNameUploadTarFile = "coder_upload_tar_file"
ToolNameCreateTemplate = "coder_create_template"
ToolNameDeleteTemplate = "coder_delete_template"
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch 2 times, most recently from 152aa40 to e69fe1c Compare July 2, 2025 15:08
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from 43ac8a0 to 57a9498 Compare July 2, 2025 15:52
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch 2 times, most recently from 8672a4b to e55d907 Compare July 2, 2025 16:35
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch 2 times, most recently from 398ecea to 65635f0 Compare July 2, 2025 16:46
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch from e55d907 to 6684a17 Compare July 2, 2025 16:46
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from 65635f0 to 27135bd Compare July 2, 2025 17:00
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch from 6684a17 to 02bb2fa Compare July 2, 2025 17:01
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_oauth2_remove_unique_constraint_on_app_names_for_rfc_7591_compliance branch from 27135bd to f4cdc20 Compare July 2, 2025 17:16
- Add MCP HTTP server with streamable transport support
- Integrate with existing toolsdk for Coder workspace operations
- Add comprehensive E2E tests with OAuth2 bearer token support
- Register MCP endpoint at /api/experimental/mcp/http with authentication
- Support RFC 6750 Bearer token authentication for MCP clients

Change-Id: Ib9024569ae452729908797c42155006aa04330af
Signed-off-by: Thomas Kosiewski <[email protected]>
@ThomasK33 ThomasK33 force-pushed the thomask33/06-30-feat_mcp_implement_mcp_http_server_with_toolsdk_integration branch from 02bb2fa to 6dc9330 Compare July 2, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants