feat: add authenticated HTTP transport for DWS MCP#20
Conversation
Add streamable HTTP MCP support alongside stdio mode for the DWS connector.\n\nThis adds bearer-authenticated remote transport, session-bound tool filtering, health checks, targeted transport tests, and GHCR publish automation for Hosted deployment.
Remove the setup-node pnpm cache configuration so GitHub Actions no longer fails before Corepack enables pnpm.
Add linux to pnpm supported architectures so CI installs Rollup's Linux native package for Vitest.
lazyoldbear
left a comment
There was a problem hiding this comment.
Wait. So it's just list of preconfigured hardcoded credentials in MCP_BEARER_TOKENS_JSON or am I missing something?
|
Very rough spec: DWS MCP Authorization Flow SpecificationContext
Current gap:
Decision SummaryUse an OAuth-style delegated model with two token types:
Do not store/reuse long-lived DWS API keys in MCP. Goals
Non-Goals
Co-work User Perspective FlowsequenceDiagram
autonumber
actor U as Co-work User
participant C as Co-work
participant A as DWS Auth
participant M as MCP Server
participant P as DWS Processor API
U->>C: Click Connect DWS
C->>A: Redirect to /oauth/authorize (PKCE)
A-->>U: Sign in or sign up and consent
A-->>C: Redirect back with auth code
C->>A: POST /oauth/token (authorization_code + verifier)
A-->>C: mcp_access_token + refresh_token
U->>C: Ask to process a document
C->>M: POST /mcp with mcp_access_token
M->>A: POST /oauth/token (token_exchange)
A-->>M: dws_runtime_token (short lived)
M->>P: Call /build or /sign with dws_runtime_token
P-->>M: Processing result
M-->>C: MCP tool result
C-->>U: Show output
Note over C,A: Co-work silently refreshes mcp_access_token when needed
U->>C: Disconnect DWS
C->>A: POST /oauth/revoke (refresh_token)
Token Model1)
|
|
Superseded by #21 |
Summary
/mcpwhile preservingstdiomodeWhy
Co-work needs a remotely deployable DWS MCP service. The existing server was
stdioonly.Validation
pnpm buildpnpm lintpnpm testcheck_creditssmoke testLinked Hosted PR
Notes
PSPDFKit/PSPDFKit