Add Streamable HTTP transport support for MCP servers - #4
Conversation
…ype union Extends the CustomMcpServer.type union to include 'streamable-http' transport option alongside existing 'command' and 'http' types. This enables support for the MCP Streamable HTTP transport specification. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…cept 'streamable-http' type - Add 'streamable-http' to allowed MCP server types tuple - Update type-specific validation to handle streamable-http with same URL/headers validation as http type - Supports MCP 2025-03-26 streamable HTTP transport specification Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…McpDialog - Add 'streamable-http' radio option to server type RadioGroup - Update validation to handle streamable-http same as http (URL required) - Update header building logic for streamable-http type - Update isValid check to include streamable-http - Show HTTP-based fields when streamable-http is selected - Add translation keys for typeStreamableHttp in en/fr locales Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…er Accept header - Add checkStreamableHttpHealth() function with Accept header supporting both 'application/json' and 'text/event-stream' for MCP protocol - Add testStreamableHttpConnection() function with protocol version 2025-03-26 - Update checkMcpHealth() to handle 'streamable-http' server type - Update testMcpConnection() to handle 'streamable-http' server type Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…rt support Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||
…ndyMik90#1747) * auto-claude: subtask-1-1 - Add errorCode propagation in reactiveTokenRefresh() * auto-claude: subtask-1-2 - Return null instead of revoked token for permanent errors in ensureValidToken() * auto-claude: subtask-1-3 - Clear credential cache on invalid_grant error in refreshOAuthToken() * auto-claude: subtask-1-4 - Clear revoked credentials on persistence failure (Bug #5) When token refresh succeeds but persistence to keychain fails, the old credentials in the keychain are now revoked server-side. This commit adds defensive cache clearing in both ensureValidToken() and reactiveTokenRefresh() to prevent serving revoked tokens from cache. On app restart, Bugs #3 and #4 fixes will handle the revoked credentials properly by returning null and clearing the cache, forcing re-authentication. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * auto-claude: subtask-2-1 - Move authFailedProfiles marking before early return --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
User description
test body
PR Type
Enhancement, Tests
Description
Add Streamable HTTP transport support for MCP servers (2025-03-26 protocol)
Implement health checks and connection tests for streamable-http type
Update validation logic to accept streamable-http server configuration
Add comprehensive test coverage for HTTP and streamable-http functionality
Add UI support with radio option and i18n translations
Diagram Walkthrough
File Walkthrough
project.ts
Add streamable-http to CustomMcpServer type unionapps/frontend/src/shared/types/project.ts
CustomMcpServer.typeunion to include'streamable-http'alongside
'command'and'http'client.py
Update validation to accept streamable-http typeapps/backend/core/client.py
_validate_custom_mcp_server()to accept'streamable-http'inallowed types tuple
type
CustomMcpDialog.tsx
Add streamable-http UI support to CustomMcpDialogapps/frontend/src/renderer/components/CustomMcpDialog.tsx
'streamable-http'radio option to server type selection grouprequired)
isValidcheck to include streamable-http with URL requirementmcp-handlers.ts
Add streamable-http health checks and connection testsapps/frontend/src/main/ipc-handlers/mcp-handlers.ts
checkStreamableHttpHealth()function with Accept headersupporting both
'application/json'and'text/event-stream'testStreamableHttpConnection()function using MCP protocolversion
'2025-03-26'checkMcpHealth()to route streamable-http servers to dedicatedhealth check function
testMcpConnection()to route streamable-http servers todedicated connection test function
failures with appropriate messages
settings.json
Add English translation for streamable-httpapps/frontend/src/shared/i18n/locales/en/settings.json
'typeStreamableHttp': 'Streamable HTTP'translation key for UIdisplay
settings.json
Add French translation for streamable-httpapps/frontend/src/shared/i18n/locales/fr/settings.json
'typeStreamableHttp': 'Streamable HTTP'translation key forFrench locale
mcp-handlers.test.ts
Add comprehensive MCP handler test coverageapps/frontend/src/main/ipc-handlers/tests/mcp-handlers.test.ts
with 200, 401, 403 responses
'application/json,text/event-stream')streamable-http (protocol 2025-03-26)
timeouts, and missing URLs
dangerous flags detection
test_mcp_validation.py
Add MCP server validation test suitetests/test_mcp_validation.py
_validate_custom_mcp_server()for command, http,and streamable-http types
header types
detection
uv, uvx) are accepted