* feat(#9): add bearer token auth for HTTP transport Adds NPM_MCP_AUTH_TOKEN env var. When set, HTTP transport requires Authorization: Bearer <token> on all requests except /health. Uses timing-safe comparison via hmac.compare_digest. Closes #9 * fix(auth): fix lifespan context and 401 status/headers spec compliance --------- Co-authored-by: b3nw <189466+b3nw@users.noreply.github.com>
This commit is contained in:
1 parent
2278c97d9d
commit
21bce2ad91
7 files changed
+135
-3
No files matched your search
@@ -18,6 +18,8 @@ services:
|
||||
- NPM_MCP_PORT=8000
|
||||
# Optional: Enable write/destructive operations (default: disabled)
|
||||
# - NPM_MCP_ENABLE_DESTRUCTIVE_TOOLS=true
|
||||
# Optional: Require bearer token for MCP HTTP clients
|
||||
# - NPM_MCP_AUTH_TOKEN=your-secret-token-here
|
||||
# Optional: Log access (requires volume mount below)
|
||||
# - NPM_LOG_DIR=/data/npm-logs
|
||||
# volumes:
|
||||
|
||||
Reference in new issue
Block a user