feat: multi-workspace support via X-Weeek-Token + Claude Desktop compatibility#1
Open
ainurminibaev wants to merge 4 commits intoAlekMel:mainfrom
Open
feat: multi-workspace support via X-Weeek-Token + Claude Desktop compatibility#1ainurminibaev wants to merge 4 commits intoAlekMel:mainfrom
ainurminibaev wants to merge 4 commits intoAlekMel:mainfrom
Conversation
…auth - Make WEEEK_TOKEN optional (token comes per-request via header) - Add WeeekTokenMiddleware for per-request token override using contextvars - Support query params (api_key, weeek_token) for Claude Desktop connector - Add deploy/ with docker-compose, nginx HTTPS config, and setup docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add `streamable-http` as new transport option (alongside stdio and sse) - Streamable HTTP is more reliable than SSE over reverse proxies — each tool call is a single HTTP request/response, no persistent connection - Preserve base_app lifespan for MCP session manager initialization - Config: TRANSPORT=streamable-http to enable Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
X-Weeek-Tokenheader — the server uses it per-request instead of the server-levelWEEEK_TOKENenv var (which is now optional).?api_key=...&weeek_token=...URL query parameters, since Claude Desktop's connector UI doesn't support custom headers.deploy/folder with production-ready docker-compose, nginx HTTPS reverse proxy config template, and comprehensive setup documentation for Claude Code CLI, Claude Desktop (via mcp-remote bridge), and Cursor IDE.Changes
src/config.pyWEEEK_TOKENis now optional (default empty)src/weeek_client.pyContextVarfor per-request token overridesrc/server.pyWeeekTokenMiddleware, query param support inAPIKeyAuthMiddlewaredeploy/How it works
Authorization: Bearer <MCP_API_KEY>(server access) andX-Weeek-Token: <personal_token>(Weeek API access)WeeekTokenMiddlewareextracts the token and stores it in aContextVarWeeekClient._request()picks up the per-request token and overrides theAuthorizationheader for Weeek API callsClaude Desktop integration
Claude Desktop connector UI only supports URL + OAuth — no custom headers. Workaround using
mcp-remote:{ "mcpServers": { "weeek": { "command": "npx", "args": [ "-y", "mcp-remote", "https://your-domain.com/sse", "--header", "Authorization: Bearer YOUR_MCP_API_KEY", "--header", "X-Weeek-Token: YOUR_WEEEK_TOKEN" ] } } }Test plan
?api_key=...accepted, wrong key returns 401🤖 Generated with Claude Code