* 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
@@ -11,6 +11,9 @@ NPM_MCP_TRANSPORT=stdio # stdio or http
|
||||
# Enable destructive/write operations (create, update, delete, enable, disable)
|
||||
# NPM_MCP_ENABLE_DESTRUCTIVE_TOOLS=true
|
||||
|
||||
# Optional: Require bearer token for MCP HTTP clients
|
||||
# NPM_MCP_AUTH_TOKEN=your-secret-token-here
|
||||
|
||||
# Log Access (optional)
|
||||
# Mount NPM's /data/logs directory and set this to the mount path.
|
||||
# Enables the get_proxy_host_logs tool for reading nginx access/error logs.
|
||||
|
||||
Reference in new issue
Block a user