{"_id":"@antogyn/mcp-auth","name":"@antogyn/mcp-auth","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"@antogyn/mcp-auth","version":"0.1.1","author":{"name":"Silverhand Inc.","email":"contact@silverhand.io"},"description":"Plug and play auth for Model Context Protocol (MCP) servers","keywords":["modelcontextprotocol","mcp","oauth","openid","connect","oidc"],"type":"module","main":"./lib/index.js","module":"./lib/index.js","types":"./lib/index.d.ts","exports":{".":{"svelte":"./lib/index.js","types":"./lib/index.d.ts","import":"./lib/index.js","require":"./lib/index.js","default":"./lib/index.js"},"./*":{"svelte":"./lib/*","import":"./lib/*","require":"./lib/*","default":"./lib/*"}},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/mcp-auth/js.git","directory":"packages/mcp-auth"},"scripts":{"build":"rm -rf lib/ && tsc -p tsconfig.build.json","prepack":"pnpm run build","dev":"tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental","test":"vitest","lint":"eslint src"},"engines":{"node":"^20.19.0 || ^22.0.0 || ^23.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@modelcontextprotocol/sdk":"^1.11.0","@silverhand/eslint-config":"^6.0.1","@silverhand/ts-config":"^6.0.0","@types/cors":"^2.8.17","@types/express":"^5.0.1","@types/express-serve-static-core":"^5.0.6","@types/node":"^20.17.0","@types/supertest":"^6.0.3","@vitest/coverage-v8":"3.1.1","eslint":"^8.57.0","express":"5.0.1","nock":"^14.0.4","node-mocks-http":"^1.16.2","prettier":"^3.5.3","supertest":"^7.1.0","typescript":"^5.8.3","vitest":"^3.1.1"},"dependencies":{"@silverhand/essentials":"^2.9.2","camelcase-keys":"^9.1.3","cors":"^2.8.5","jose":"^6.0.10","snakecase-keys":"^8.0.1","zod":"^3.24.3"},"peerDependencies":{"express":"^5.0.1"},"eslintConfig":{"extends":"@silverhand"},"prettier":"@silverhand/eslint-config/.prettierrc","_id":"@antogyn/mcp-auth@0.1.1","gitHead":"5f01c42a8c1b3ec1a4b43c804bc525aa523bd3a5","bugs":{"url":"https://github.com/mcp-auth/js/issues"},"homepage":"https://github.com/mcp-auth/js#readme","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-ek+ZT6L3uQYulyCatPUiK2k/aNJKN+8wAnpA9tz2jTG2N4Wbxeb5AtcIOIjXCXIl5U2BhfIPlGCt9IGurfqqNQ==","shasum":"9dc8cbf578039fb8e6bb3836bda7e41d04e55c35","tarball":"https://registry.npmjs.org/@antogyn/mcp-auth/-/mcp-auth-0.1.1.tgz","fileCount":42,"unpackedSize":124914,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICc5JvYYjtkUAdnYlDN2Bq3WHIZzwlCoUX1UpHPj/TghAiAHkX7GaYaLR8+BbwqDvNDvFC4+hJfCr2GkgpIZpisivw=="}]},"_npmUser":{"name":"antogyn","email":"antogyn@gmail.com","actor":{"name":"antogyn","email":"antogyn@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"antogyn","email":"antogyn@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-auth_0.1.1_1752056134294_0.49125551781816323"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-09T10:15:34.236Z","0.1.1":"2025-07-09T10:15:34.489Z","modified":"2025-07-09T10:15:34.699Z"},"maintainers":[{"name":"antogyn","email":"antogyn@gmail.com"}],"description":"Plug and play auth for Model Context Protocol (MCP) servers","homepage":"https://github.com/mcp-auth/js#readme","keywords":["modelcontextprotocol","mcp","oauth","openid","connect","oidc"],"repository":{"type":"git","url":"git+https://github.com/mcp-auth/js.git","directory":"packages/mcp-auth"},"author":{"name":"Silverhand Inc.","email":"contact@silverhand.io"},"bugs":{"url":"https://github.com/mcp-auth/js/issues"},"license":"MIT","readme":"# MCP Auth Node.js SDK\n\nThe MCP specification [requires OAuth 2.1 and other RFCs](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization) for authorization. Instead of implementing all the OAuth 2.1 and OpenID Connect standards yourself, a **production-ready provider** and a set of **libraries and tutorials** can save you a lot of time and effort.\n\nThat's where MCP Auth comes in. It includes:\n\n1. An updated OAuth 2.1 and OpenID Connect provider list that meets the MCP requirements.\n2. A set of provider-agnostic libraries and tools to help you integrate your MCP server with any compliant provider.\n3. Practical tutorials and examples to get you started quickly.\n\nAnd yes, it can be as simple as a few lines of code:\n\n```ts\nconst server = new McpServer(/* ... */);\nconst mcpAuth = new MCPAuth({\n  server: await fetchServerConfig('<auth-server-url>', { type: 'oidc' }),\n});\nconst app = express();\n\napp.use(mcpAuth.bearerAuth('jwt', { requiredScopes: ['read', 'write'] }));\nserver.tool('whoami', ({ authInfo }) => {\n  // Use `authInfo` to access the auth information carried from `req.auth`\n});\n```\n\nSee [the documentation](https://mcp-auth.dev) for the full guide.\n","readmeFilename":"README.md","_rev":"1-83fc41b26273b369082b331da218052a"}