{"_id":"@djmima/pubmed-mcp","_rev":"9-a871d462b95f8e77549d33403110cd8c","name":"@djmima/pubmed-mcp","dist-tags":{"latest":"1.2.3"},"versions":{"0.0.0-stage":{"name":"@djmima/pubmed-mcp","version":"0.0.0-stage","_id":"@djmima/pubmed-mcp@0.0.0-stage","stub":true,"maintainers":[{"name":"djmima","email":"kat.atsushi@gmail.com"}],"dist":{"shasum":"1f0d846acc8cf99b7dc798f2f1f64700a8dd39bd","tarball":"https://registry.npmjs.org/@djmima/pubmed-mcp/-/pubmed-mcp-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-la8qDAiRSjWQHN7MB4PGPUn+6+jGOUHHfjGLFT5ZIMm1/3g8nTBac9jXd35ua6qn30PiY48pQfM1KwhRm05B/w==","signatures":[{"sig":"MEUCIQDQITuOdVrx9CFJkmGQxykNXxBq4fcCehV6E5Lw2LPoIQIgCDgUMRNG9eo/iv7iQQIlf4xvjVuBe9m+xmjDlyD21sE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":340},"_npmUser":{"name":"djmima","email":"kat.atsushi@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"1.0.0":{"name":"@djmima/pubmed-mcp","version":"1.0.0","keywords":["mcp","model-context-protocol","pubmed","pmc","ncbi","e-utilities","literature-search","cli"],"author":{"name":"DJ MIMA"},"license":"MIT","_id":"@djmima/pubmed-mcp@1.0.0","maintainers":[{"name":"djmima","email":"kat.atsushi@gmail.com"}],"homepage":"https://github.com/DJMIMA/PubMed_MCP#readme","bugs":{"url":"https://github.com/DJMIMA/PubMed_MCP/issues"},"bin":{"pubmed":"dist/cli.js","pubmed-mcp":"dist/index.js"},"dist":{"shasum":"591d57467b10bf77e592f1eed81af239905f0111","tarball":"https://registry.npmjs.org/@djmima/pubmed-mcp/-/pubmed-mcp-1.0.0.tgz","fileCount":68,"integrity":"sha512-KivoWDwFpTKgi4mD8YYaoNIZw8Tr4ZABiJUtqyO9G8PHiheaMd7eabwssTvjUt7S6fNW1u+XnQvwYBpoYoNXyg==","signatures":[{"sig":"MEQCIFYrYhnH4NTRnE+NCz8oaioXlJm9Dnwx0xtzryuj7iThAiAKjfWJ5xkYii/BMLEOqQjPe4Wopu6SHkGRCrX7aNXb1w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIDDvJathlKV6Lr16ydsrUP639RzoshCdx5RgZ5d+OmgHAiEA7Yc6PY/y6I0PwyNVfrJ4ZaLtc5BCbr3GdXCSr4Bt2Ho=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":275197},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"gitHead":"2f5de40d8d816098135729ab96fb6659f4ec0e97","scripts":{"cli":"tsx src/cli.ts","dev":"tsx src/index.ts","lint":"eslint src","test":"vitest run","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run typecheck && npm run lint && npm test && npm run build"},"_npmUser":{"name":"djmima","email":"kat.atsushi@gmail.com"},"repository":{"url":"git+https://github.com/DJMIMA/PubMed_MCP.git","type":"git"},"_npmVersion":"12.2.1","description":"MCP server providing access to PubMed biomedical literature and citations","directories":{},"_nodeVersion":"26.12.1","allowScripts":{"esbuild@0.27.2":true},"dependencies":{"zod":"^4.6.7","jose":"^5.10.0","axios":"^1.7.9","dotenv":"^17.3.1","express":"^4.21.0","fast-xml-parser":"^5.11.2","@modelcontextprotocol/sdk":"^1.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.17.0","vitest":"^4.1.11","typescript":"^5.7.2","@types/node":"^22.10.0","@types/express":"^5.0.0","@typescript-eslint/parser":"^8.18.0","@typescript-eslint/eslint-plugin":"^8.18.0"},"_npmOperationalInternal":{"tmp":"tmp/pubmed-mcp_1.0.0_1793248281730_0.31130566383415903","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@djmima/pubmed-mcp","version":"1.0.1","keywords":["mcp","model-context-protocol","pubmed","pmc","ncbi","e-utilities","literature-search","cli"],"author":{"name":"DJ MIMA"},"license":"MIT","_id":"@djmima/pubmed-mcp@1.0.1","maintainers":[{"name":"djmima","email":"kat.atsushi@gmail.com"}],"homepage":"https://github.com/DJMIMA/PubMed_MCP#readme","bugs":{"url":"https://github.com/DJMIMA/PubMed_MCP/issues"},"bin":{"pubmed":"dist/cli.js","pubmed-mcp":"dist/index.js"},"dist":{"shasum":"39bbcb6e9eb7bcccae75dfe4bcc92708d873be08","tarball":"https://registry.npmjs.org/@djmima/pubmed-mcp/-/pubmed-mcp-1.0.1.tgz","fileCount":69,"integrity":"sha512-e1vmx8DL4le26Kj27k62jqrmEqxNp1nqsgPkA+JQLbQO6W7fZKQ/qOAo4Na1bhghz076afAaO14k66+7fHmcBg==","signatures":[{"sig":"MEUCIQCwXugqOVZmgNQi7w6DbTp67cikFvgaoQaSLSHw/TB8qgIgWd5hiceIsDA0M78bd9f/T611NV7MvAjyGrz110pvvZs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@djmima%2fpubmed-mcp@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":278060},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"gitHead":"a23bf9b0a74aa3442cfa90388f5296e21b0ebe7d","scripts":{"cli":"tsx src/cli.ts","dev":"tsx src/index.ts","lint":"eslint src","test":"vitest run","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run typecheck && npm run lint && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"djmima","email":"kat.atsushi@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"271e38b7-c022-4182-9c05-b766cd4c3178"}},"repository":{"url":"git+https://github.com/DJMIMA/PubMed_MCP.git","type":"git"},"_npmVersion":"11.21.1","description":"MCP server providing access to PubMed biomedical literature and citations","directories":{},"_nodeVersion":"24.22.1","allowScripts":{"esbuild@0.27.2":true},"dependencies":{"zod":"^4.6.7","jose":"^5.10.0","axios":"^1.7.9","dotenv":"^17.3.1","express":"^4.21.0","fast-xml-parser":"^5.11.2","@modelcontextprotocol/sdk":"^1.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.17.0","vitest":"^4.1.11","typescript":"^5.7.2","@types/node":"^22.10.0","@types/express":"^5.0.0","@typescript-eslint/parser":"^8.18.0","@typescript-eslint/eslint-plugin":"^8.18.0"},"_npmOperationalInternal":{"tmp":"tmp/pubmed-mcp_1.0.1_1793536266675_0.9022373901436349","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@djmima/pubmed-mcp","version":"1.0.2","keywords":["mcp","model-context-protocol","pubmed","pmc","ncbi","e-utilities","literature-search","cli"],"author":{"name":"DJ MIMA"},"license":"MIT","_id":"@djmima/pubmed-mcp@1.0.2","maintainers":[{"name":"djmima","email":"kat.atsushi@gmail.com"}],"homepage":"https://github.com/DJMIMA/PubMed_MCP#readme","bugs":{"url":"https://github.com/DJMIMA/PubMed_MCP/issues"},"bin":{"pubmed":"dist/cli.js","pubmed-mcp":"dist/index.js"},"dist":{"shasum":"af4f11fef6312056e9a23b3fb279c5db9b238cee","tarball":"https://registry.npmjs.org/@djmima/pubmed-mcp/-/pubmed-mcp-1.0.2.tgz","fileCount":69,"integrity":"sha512-LrX8Rnir89PfG6FwSTDdYJDgd3bCRcmb9GksfS7XtK3RijM9uawtKwT84d6LCx6C3tojZyC4bjrROi84zpMBnQ==","signatures":[{"sig":"MEYCIQCYre7bvn/aSjxeKYPxviySaU7pfbVborrkPBeJFvrBegIhAP65LB/EwUm5qq/5gjJNpYUpkqKS+puYeoF2ft1qOrPX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@djmima%2fpubmed-mcp@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":272374},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"gitHead":"70b63de4731028a03a1c0845d51901a1dd9f77c4","scripts":{"cli":"tsx src/cli.ts","dev":"tsx src/index.ts","lint":"eslint src","test":"vitest run","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run typecheck && npm run lint && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"djmima","email":"kat.atsushi@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"271e38b7-c022-4182-9c05-b766cd4c3178"}},"repository":{"url":"git+https://github.com/DJMIMA/PubMed_MCP.git","type":"git"},"_npmVersion":"11.21.1","description":"MCP server providing access to PubMed biomedical literature and citations","directories":{},"_nodeVersion":"24.22.1","allowScripts":{"esbuild@0.27.2":true},"dependencies":{"zod":"^4.6.7","jose":"^5.10.0","axios":"^1.7.9","dotenv":"^17.3.1","express":"^4.21.0","fast-xml-parser":"^5.11.2","@modelcontextprotocol/sdk":"^1.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.17.0","vitest":"^4.1.11","typescript":"^5.7.2","@types/node":"^22.10.0","@types/express":"^5.0.0","@typescript-eslint/parser":"^8.18.0","@typescript-eslint/eslint-plugin":"^8.18.0"},"_npmOperationalInternal":{"tmp":"tmp/pubmed-mcp_1.0.2_1793689040941_0.48087012386264316","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@djmima/pubmed-mcp","version":"1.1.0","keywords":["mcp","model-context-protocol","pubmed","pmc","ncbi","e-utilities","literature-search","cli"],"author":{"name":"DJ MIMA"},"license":"MIT","_id":"@djmima/pubmed-mcp@1.1.0","maintainers":[{"name":"djmima","email":"kat.atsushi@gmail.com"}],"homepage":"https://github.com/DJMIMA/PubMed_MCP#readme","bugs":{"url":"https://github.com/DJMIMA/PubMed_MCP/issues"},"bin":{"pubmed":"dist/cli.js","pubmed-mcp":"dist/index.js"},"dist":{"shasum":"108dd850cb3bfa6c969572d025d1188fbd8e0432","tarball":"https://registry.npmjs.org/@djmima/pubmed-mcp/-/pubmed-mcp-1.1.0.tgz","fileCount":77,"integrity":"sha512-j91XwGsRIkn/m9gP0oJkqhA2dMwaI+4A4OFs0CXyYO20qBU1fOUzRI2QJ+yvRHjS9WhEoU6Sc/bW93FGqndORg==","signatures":[{"sig":"MEUCIQCbq4GcJQjzqoneF8iMZv4dUL887mms38tsiTdW/EII2gIgUcMB2xMrd/fpsPASbAEndXpFLVXBkCLwCfUEtK1bf50=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@djmima%2fpubmed-mcp@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":287831},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"gitHead":"536c18811896ac553c4d65449d919ffd16797f41","scripts":{"cli":"tsx src/cli.ts","dev":"tsx src/index.ts","lint":"eslint src","test":"vitest run","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run typecheck && npm run lint && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"djmima","email":"kat.atsushi@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"271e38b7-c022-4182-9c05-b766cd4c3178"}},"repository":{"url":"git+https://github.com/DJMIMA/PubMed_MCP.git","type":"git"},"_npmVersion":"11.21.1","description":"MCP server providing access to PubMed biomedical literature and citations","directories":{},"_nodeVersion":"24.22.2","allowScripts":{"esbuild@0.27.2":true},"dependencies":{"zod":"^4.6.7","jose":"^5.10.0","axios":"^1.20.0","dotenv":"^17.3.1","express":"^4.22.3","fast-xml-parser":"^5.11.2","@modelcontextprotocol/sdk":"^1.32.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.17.0","vitest":"^4.1.11","typescript":"^5.7.2","@types/node":"^22.10.0","@types/express":"^5.0.0","@typescript-eslint/parser":"^8.18.0","@typescript-eslint/eslint-plugin":"^8.18.0"},"_npmOperationalInternal":{"tmp":"tmp/pubmed-mcp_1.1.0_1793775454118_0.8927517284256623","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@djmima/pubmed-mcp","version":"1.2.0","keywords":["mcp","model-context-protocol","pubmed","pmc","ncbi","e-utilities","literature-search","cli"],"author":{"name":"DJ MIMA"},"license":"MIT","_id":"@djmima/pubmed-mcp@1.2.0","maintainers":[{"name":"djmima","email":"kat.atsushi@gmail.com"}],"homepage":"https://github.com/DJMIMA/PubMed_MCP#readme","bugs":{"url":"https://github.com/DJMIMA/PubMed_MCP/issues"},"bin":{"pubmed":"dist/cli.js","pubmed-mcp":"dist/index.js"},"dist":{"shasum":"8a1e2fc792b276b683c9b41448f8f6dc90008f40","tarball":"https://registry.npmjs.org/@djmima/pubmed-mcp/-/pubmed-mcp-1.2.0.tgz","fileCount":81,"integrity":"sha512-rTIbu6DoOrvRo4AscQNkqFDURgHaEVB35zc2rHzRRyQC8J48stQhV8FWUgSHsNz8kWZk1wHBmflmgJGSenNoNw==","signatures":[{"sig":"MEQCIDNVwDV6qQMyTfJQ1XCP5ugQOBU/fbcG3C613DFQ9ycgAiAbKeLHtHipfLrI9bBUTOWW8KOfMkPBC7RAMVDrtmYJKQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@djmima%2fpubmed-mcp@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":291243},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"gitHead":"7dc278d06b0e325bef81e48e7d6227f678e60c6e","scripts":{"cli":"tsx src/cli.ts","dev":"tsx src/index.ts","lint":"eslint src","test":"vitest run","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run typecheck && npm run lint && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"djmima","email":"kat.atsushi@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"271e38b7-c022-4182-9c05-b766cd4c3178"}},"repository":{"url":"git+https://github.com/DJMIMA/PubMed_MCP.git","type":"git"},"_npmVersion":"11.21.1","description":"MCP server providing access to PubMed biomedical literature and citations","directories":{},"_nodeVersion":"24.22.1","allowScripts":{"esbuild@0.27.2":true},"dependencies":{"zod":"^4.6.7","jose":"^5.10.0","axios":"^1.20.0","dotenv":"^17.3.1","express":"^4.22.3","fast-xml-parser":"^5.11.2","@modelcontextprotocol/sdk":"^1.32.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.17.0","vitest":"^4.1.11","typescript":"^5.7.2","@types/node":"^22.10.0","@types/express":"^5.0.0","@typescript-eslint/parser":"^8.18.0","@typescript-eslint/eslint-plugin":"^8.18.0"},"_npmOperationalInternal":{"tmp":"tmp/pubmed-mcp_1.2.0_1793779412664_0.443632423847673","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@djmima/pubmed-mcp","version":"1.2.1","keywords":["mcp","model-context-protocol","pubmed","pmc","ncbi","e-utilities","literature-search","cli"],"author":{"name":"DJ MIMA"},"license":"MIT","_id":"@djmima/pubmed-mcp@1.2.1","maintainers":[{"name":"djmima","email":"kat.atsushi@gmail.com"}],"homepage":"https://github.com/DJMIMA/PubMed_MCP#readme","bugs":{"url":"https://github.com/DJMIMA/PubMed_MCP/issues"},"bin":{"pubmed":"dist/cli.js","pubmed-mcp":"dist/index.js"},"dist":{"shasum":"c733edcb225a216ecbc5e75b6d78d06120b1826e","tarball":"https://registry.npmjs.org/@djmima/pubmed-mcp/-/pubmed-mcp-1.2.1.tgz","fileCount":81,"integrity":"sha512-9nRVKCeMYADTvk1bLUe/xX+0MY6PbA5yTsrYv0fn+t5xBvgDVtGOlyMd50rsPHLEYusNrvhJUzhFcEV5IYzmhA==","signatures":[{"sig":"MEUCIF2QMVL4eD8b+oKjz1Fxu7p8nHb6c4e1Ko+WKgKAVmadAiEAkiOJRtDm1RTHysGif+2jgST3rTfveRGD7oMi49TBZ2E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@djmima%2fpubmed-mcp@1.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":293005},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"gitHead":"1ac527f4bd213d1fa7fa606d211331071f3a833f","scripts":{"cli":"tsx src/cli.ts","dev":"tsx src/index.ts","lint":"eslint src","test":"vitest run","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run typecheck && npm run lint && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"djmima","email":"kat.atsushi@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"271e38b7-c022-4182-9c05-b766cd4c3178"}},"repository":{"url":"git+https://github.com/DJMIMA/PubMed_MCP.git","type":"git"},"_npmVersion":"11.21.2","description":"MCP server providing access to PubMed biomedical literature and citations","directories":{},"_nodeVersion":"24.22.2","allowScripts":{"esbuild@0.27.2":true},"dependencies":{"zod":"^4.6.7","jose":"^5.10.0","axios":"^1.20.0","dotenv":"^17.3.1","express":"^4.22.3","fast-xml-parser":"^5.11.2","@modelcontextprotocol/sdk":"^1.32.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.17.0","vitest":"^4.1.11","typescript":"^5.7.2","@types/node":"^22.10.0","@types/express":"^5.0.0","@typescript-eslint/parser":"^8.18.0","@typescript-eslint/eslint-plugin":"^8.18.0"},"_npmOperationalInternal":{"tmp":"tmp/pubmed-mcp_1.2.1_1793894010140_0.006032806421515713","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@djmima/pubmed-mcp","version":"1.2.2","keywords":["mcp","model-context-protocol","pubmed","pmc","ncbi","e-utilities","literature-search","cli"],"author":{"name":"DJ MIMA"},"license":"MIT","_id":"@djmima/pubmed-mcp@1.2.2","maintainers":[{"name":"djmima","email":"kat.atsushi@gmail.com"}],"homepage":"https://github.com/DJMIMA/PubMed_MCP#readme","bugs":{"url":"https://github.com/DJMIMA/PubMed_MCP/issues"},"bin":{"pubmed":"dist/cli.js","pubmed-mcp":"dist/index.js"},"dist":{"shasum":"7713436da07331c281a9c6ded56403d8b90ab13f","tarball":"https://registry.npmjs.org/@djmima/pubmed-mcp/-/pubmed-mcp-1.2.2.tgz","fileCount":81,"integrity":"sha512-68Vukw9wmmXrXO3onxuKptiI5p7WxbPpLjG+5Em0IZxyG1ThOfwoON/UY+8gM85VDnXkppB8glPczGOFckUfAg==","signatures":[{"sig":"MEQCIDgz3s4DR5omnOpn/GRyzxO1yBkgvPnlL751SEw7m3JkAiBR6IulG1ZvZYwdnFejjyPPye8vSHYfdigKj5eZS4kIMw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@djmima%2fpubmed-mcp@1.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":293214},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"gitHead":"9a6a1edcecb1a35373bdd7efc65001198ea3b569","scripts":{"cli":"tsx src/cli.ts","dev":"tsx src/index.ts","lint":"eslint src","test":"vitest run","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run typecheck && npm run lint && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"djmima","email":"kat.atsushi@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"271e38b7-c022-4182-9c05-b766cd4c3178"}},"repository":{"url":"git+https://github.com/DJMIMA/PubMed_MCP.git","type":"git"},"_npmVersion":"11.21.2","description":"MCP server and CLI for searching and reading PubMed and PubMed Central literature","directories":{},"_nodeVersion":"24.22.2","allowScripts":{"esbuild@0.27.2":true},"dependencies":{"zod":"^4.6.7","jose":"^5.10.0","axios":"^1.20.0","dotenv":"^17.3.1","express":"^4.22.3","fast-xml-parser":"^5.11.2","@modelcontextprotocol/sdk":"^1.32.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.17.0","vitest":"^4.1.11","typescript":"^5.7.2","@types/node":"^22.10.0","@types/express":"^5.0.0","@typescript-eslint/parser":"^8.18.0","@typescript-eslint/eslint-plugin":"^8.18.0"},"_npmOperationalInternal":{"tmp":"tmp/pubmed-mcp_1.2.2_1793967664663_0.3598333661829044","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"_id":"@djmima/pubmed-mcp@1.2.3","bin":{"pubmed":"dist/cli.js","pubmed-mcp":"dist/index.js"},"bugs":{"url":"https://github.com/DJMIMA/PubMed_MCP/issues"},"dist":{"shasum":"5372a3b47225baf5b2e9575574fe9c7b06a0bceb","tarball":"https://registry.npmjs.org/@djmima/pubmed-mcp/-/pubmed-mcp-1.2.3.tgz","integrity":"sha512-9Msw728149/fnPtJJxlieAmRRaPopQv65RyiTtG2+M+jPJbRhJCqYEUvll+3EMLlpnVFn4Fh2GoumdZeUo6nhA==","fileCount":83,"unpackedSize":348343,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@djmima%2fpubmed-mcp@1.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDlmcB/JOgmCy7gGjEc3KcNiuw8/ZIs+qaMSll51rj42QIgVscshz7wg86tW0PS2e9ceP4D4KriLRRMz87hEUTXTDg="}]},"main":"dist/index.js","name":"@djmima/pubmed-mcp","type":"module","types":"./dist/index.d.ts","author":{"name":"DJ MIMA"},"engines":{"node":">=22"},"gitHead":"cc0541a57733f3a0ed304d05d4fdf6a710d06e64","license":"MIT","scripts":{"cli":"tsx src/cli.ts","dev":"tsx src/index.ts","lint":"eslint src","test":"vitest run","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run typecheck && npm run lint && npm test && npm run build"},"version":"1.2.3","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"271e38b7-c022-4182-9c05-b766cd4c3178"},"approver":{"name":"djmima","email":"kat.atsushi@gmail.com"}},"homepage":"https://github.com/DJMIMA/PubMed_MCP#readme","keywords":["mcp","model-context-protocol","pubmed","pmc","ncbi","e-utilities","literature-search","cli"],"repository":{"url":"git+https://github.com/DJMIMA/PubMed_MCP.git","type":"git"},"_npmVersion":"11.21.2","description":"MCP server and CLI for searching and reading PubMed and PubMed Central literature","directories":{},"maintainers":[{"name":"djmima","email":"kat.atsushi@gmail.com"}],"_nodeVersion":"24.22.2","allowScripts":{"esbuild@0.27.2":true},"dependencies":{"zod":"^4.6.7","jose":"^5.10.0","axios":"^1.20.0","dotenv":"^17.3.1","express":"^4.22.3","fast-xml-parser":"^5.11.2","@modelcontextprotocol/sdk":"^1.32.2"},"publishConfig":{"access":"public"},"devDependencies":{"tsx":"^4.19.2","eslint":"^9.17.0","vitest":"^4.1.11","typescript":"^5.7.2","@types/node":"^22.10.0","@types/express":"^5.0.0","@typescript-eslint/parser":"^8.18.0","@typescript-eslint/eslint-plugin":"^8.18.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pubmed-mcp_1.2.3_1794048064533_0.2792441294409794"},"_hasShrinkwrap":false}},"time":{"created":"2026-10-29T04:30:26.088Z","modified":"2026-11-07T10:41:04.905Z","0.0.0-stage":"2026-10-29T04:30:26.088Z","1.0.0":"2026-10-29T04:31:21.832Z","1.0.1":"2026-11-01T12:31:06.797Z","1.0.2":"2026-11-03T06:57:21.024Z","1.1.0":"2026-11-04T06:57:34.227Z","1.2.0":"2026-11-04T08:03:32.747Z","1.2.1":"2026-11-05T15:53:30.301Z","1.2.2":"2026-11-06T12:21:04.774Z","1.2.3":"2026-11-07T10:41:04.636Z"},"bugs":{"url":"https://github.com/DJMIMA/PubMed_MCP/issues"},"author":{"name":"DJ MIMA"},"license":"MIT","homepage":"https://github.com/DJMIMA/PubMed_MCP#readme","keywords":["mcp","model-context-protocol","pubmed","pmc","ncbi","e-utilities","literature-search","cli"],"repository":{"url":"git+https://github.com/DJMIMA/PubMed_MCP.git","type":"git"},"description":"MCP server and CLI for searching and reading PubMed and PubMed Central literature","maintainers":[{"name":"djmima","email":"kat.atsushi@gmail.com"}],"readme":"<h1 align=\"center\">PubMed MCP/CLI</h1>\n\n<p align=\"center\"><strong>Search and read the biomedical literature from your AI assistant.</strong></p>\n\n<p align=\"center\">PubMed and PubMed Central for Claude, Codex, and the shell.</p>\n\n<p align=\"center\">\n  <a href=\"#tools\">Tools</a> ·\n  <a href=\"#installation\"><strong>Install</strong></a> ·\n  <a href=\"#usage\">Usage</a> ·\n  <a href=\"#cli\">CLI</a> ·\n  <a href=\"#deploying-to-google-cloud-run\">Deploy</a> ·\n  <a href=\"CHANGELOG.md\">Changelog</a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@djmima/pubmed-mcp\"><img alt=\"npm version\" src=\"https://img.shields.io/npm/v/@djmima/pubmed-mcp?label=npm&color=cb3837\"></a>\n  <a href=\"https://packagephobia.com/result?p=@djmima/pubmed-mcp\"><img alt=\"npm unpacked size\" src=\"https://img.shields.io/npm/unpacked-size/@djmima/pubmed-mcp\"></a>\n  <a href=\"LICENSE\"><img alt=\"License: MIT\" src=\"https://img.shields.io/badge/license-MIT-blue\"></a>\n  <a href=\"https://nodejs.org/\"><img alt=\"Node.js version\" src=\"https://img.shields.io/node/v/@djmima/pubmed-mcp\"></a>\n  <a href=\"https://github.com/DJMIMA/PubMed_MCP/actions/workflows/ci.yml\"><img alt=\"CI status\" src=\"https://github.com/DJMIMA/PubMed_MCP/actions/workflows/ci.yml/badge.svg\"></a>\n</p>\n\n<p align=\"center\"><strong>English</strong> · <a href=\"README_ja.md\">日本語</a></p>\n\n**Free, open source, and runs on your own machine.** An [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server and command-line tool that give Claude, Codex, and other LLM clients structured access to [PubMed](https://pubmed.ncbi.nlm.nih.gov/) and [PubMed Central (PMC)](https://www.ncbi.nlm.nih.gov/pmc/) via the NCBI E-utilities API. No account needed; an NCBI API key is optional.\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `search_articles` | Search PubMed with PubMed syntax or keywords. Supports ATM diagnostics, field restriction, date filters, sorting, and pagination |\n| `get_article_metadata` | Get the title, abstract, authors, MeSH terms, keywords, and more for given PMIDs |\n| `find_related_articles` | Find similar articles and links to other NCBI databases with ELink |\n| `lookup_article_by_citation` | Look up PMIDs from citation data such as journal, year, volume, and first author |\n| `convert_article_ids` | Convert between PMID, PMCID, and DOI |\n| `get_full_text_article` | Get the full body text of PMC Open Access articles as plain text |\n| `get_copyright_status` | Check whether full text is available (`has_full_text`), the license, the copyright statement, and the OA status. Uses PMC EFetch metadata (the old PMC OA Web Service was retired on 2026-08-25) |\n\nThe same tools are also available from the shell as the `pubmed` command (see [CLI](#cli)).\n\n---\n\n## ATM diagnostics and field restriction in `search_articles`\n\nPubMed applies Automatic Term Mapping (ATM) to untagged search terms. ATM expands terms to MeSH,\njournal names, author names, and so on, which can cause unintended translations, or a fallback\nsearch when a quoted phrase is not in the phrase index.\n\n`search_articles` accepts an optional `field` value and restricts every untagged term in the query\nto that field:\n\n- `title`\n- `tiab` (Title/Abstract)\n- `mesh`\n- `author`\n- `journal`\n- `affiliation`\n\nTerms with an explicit field tag in the query keep their tag, which takes precedence over `field`.\nWithout `field`, search behaves as before. `all` is not offered as a value, because it does not\nturn off ATM.\n\nThe response always includes the following fields, normalized from the NCBI ESearch diagnostics:\n\n```json\n{\n  \"warnings\": {\n    \"phrases_ignored\": [],\n    \"quoted_phrases_not_found\": [],\n    \"output_messages\": []\n  },\n  \"errors\": {\n    \"phrases_not_found\": [],\n    \"fields_not_found\": []\n  }\n}\n```\n\nThese `errors` are NCBI ESearch diagnostics about search terms and fields, not network errors or\nerrors from the MCP tool itself.\nThe keys are present as empty arrays even when there are no diagnostics. Before concluding from a\nlow or zero count that no literature exists, check `query_translation`, `warnings`, and `errors`.\nTo search several terms reliably in the same field, tag each term. For proximity searching when a\nquoted phrase is not in the phrase index, use `[ti:~0]` or `[tiab:~0]`.\n\n---\n\n## Requirements\n\n- **Node.js** 22 or later (`npx` and `npm` come with Node.js)\n- **NCBI API key** (optional; without one the server works, but is limited to 3 req/s)\n- **jq** (optional; used to extract the fields you need from [CLI](#cli) output)\n\n---\n\n## Installation\n\nThe server is published on npm as [`@djmima/pubmed-mcp`](https://www.npmjs.com/package/@djmima/pubmed-mcp).\n\n- **To use it as an MCP server**, you don't need to install anything. Put `npx -y @djmima/pubmed-mcp@latest` in your MCP client's configuration,\n  and the latest version is downloaded automatically at startup (see [Usage](#usage) below).\n- **To use the [CLI](#cli)**, install it globally:\n\n```bash\nnpm install -g @djmima/pubmed-mcp\n```\n\nThis registers two commands, `pubmed` and `pubmed-mcp`. Update with `npm update -g @djmima/pubmed-mcp`\nand uninstall with `npm rm -g @djmima/pubmed-mcp`.\n\nIf you want to modify the source code, see [Building from source](#building-from-source).\n\n### Setting up an NCBI API key (recommended)\n\nWith an API key, the rate limit goes from 3 to 8 req/s.\n\n1. Create an [NCBI account](https://www.ncbi.nlm.nih.gov/account/) and generate an API key\n2. Set it in the `NCBI_API_KEY` environment variable (see the client-specific settings below)\n\nWhen an MCP client starts the server locally, pass the key in the `env` section of the client configuration.\nThe server reads `.env` only from its own package root (the repository root if you [built from source](#building-from-source)),\nnever from the directory it is started in, so a `.env` in a project open in your MCP client cannot change its settings.\n\nUse an API key owned and managed by the person or organization running this server.\nThe repository does not ship an API key. When a response includes the `echo` from the NCBI API,\nthe `api_key` value is masked as `<redacted>`.\n\nThe client applies a simple per-process rate limiter. It sends at most 3 req/s without an API key,\nand 8 req/s with one, leaving a margin below NCBI's limit of 10 req/s (NCBI counts by arrival time, so the margin absorbs network jitter). On HTTP 429 it waits and retries up to twice.\nParallel calls within one process are spaced out automatically, but if you run multiple instances\non Cloud Run or elsewhere, keep the total across all instances within NCBI's limit. As a guideline,\nkeep a single instance to about 8 concurrent requests with an API key and about 2 without.\n\n---\n\n## Usage\n\n### Claude Desktop (local, stdio)\n\nAdd the server to `mcpServers` in `claude_desktop_config.json`.\n\n**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"pubmed-local\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@djmima/pubmed-mcp@latest\"],\n      \"env\": {\n        \"NCBI_API_KEY\": \"your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n- If other servers are already registered, add `\"pubmed-local\": { ... }` alongside them inside `mcpServers` (don't forget the comma after the previous entry).\n- If it doesn't start on Windows, change it to `\"command\": \"cmd\"` and `\"args\": [\"/c\", \"npx\", \"-y\", \"@djmima/pubmed-mcp@latest\"]`.\n- With `@latest`, the client checks npm for a newer version at every startup. To pin a version, write it as `@djmima/pubmed-mcp@1.0.0`.\n- Naming the server `pubmed-local` makes it easy to tell apart from the remote server (`pubmed-remote`) and from other PubMed connectors with the same tool names.\n\nAfter configuring, quit Claude Desktop completely and restart it. Closing the window may leave the app running in the background (on Windows, quit from the system tray icon).\nServers in this file are also loaded into sessions opened in the Code tab of Claude Desktop.\n\nIf the server doesn't start, check the log (Windows: `%APPDATA%\\Claude\\logs\\mcp-server-pubmed-local.log`, macOS: `~/Library/Logs/Claude/mcp-server-pubmed-local.log`).\n\n---\n\n### Claude Code (local, stdio)\n\nRegister the server with `claude mcp add`. With `--scope user`, it is available in every project.\n\n```bash\nclaude mcp add --env NCBI_API_KEY=your_api_key_here --transport stdio --scope user pubmed-local -- npx -y @djmima/pubmed-mcp@latest\n```\n\n- Everything after `--` is passed as-is as the command that starts the server.\n- On Windows (not WSL), use `cmd /c npx -y @djmima/pubmed-mcp@latest` after `--`.\n- If the server name comes right after `--env`, it is parsed as a continuation of `KEY=value` and fails, so put another option (here, `--transport stdio`) in between.\n- The registration is saved in `~/.claude.json` (user / local scope) or in `.mcp.json` in the project root (project scope). `mcpServers` written in `~/.claude/settings.json` is not read.\n- If you only use the Code tab of Claude Desktop, the `claude_desktop_config.json` registration above is enough, and you can skip this step.\n\nAfter registering, check the connection with `claude mcp list` or `/mcp` inside Claude Code.\n\n---\n\n### Codex (local, stdio)\n\nThe Codex desktop app, CLI, and IDE extension share one configuration file, `~/.codex/config.toml` (Windows: `%USERPROFILE%\\.codex\\config.toml`). Add the following block:\n\n```toml\n[mcp_servers.pubmed-local]\ncommand = \"npx\"\nargs = [\"-y\", \"@djmima/pubmed-mcp@latest\"]\n\n[mcp_servers.pubmed-local.env]\nNCBI_API_KEY = \"your_api_key_here\"\n```\n\n- If it doesn't start on Windows, change it to `command = \"cmd\"` and `args = [\"/c\", \"npx\", \"-y\", \"@djmima/pubmed-mcp@latest\"]`.\n- Codex does not pass OS environment variables through to MCP servers. Either write the API key in `env` as above, or add `env_vars = [\"NCBI_API_KEY\"]` under `[mcp_servers.pubmed-local]` to forward it from Codex's environment.\n\nYou can also register it from the CLI with `codex mcp add`:\n\n```bash\ncodex mcp add pubmed-local --env NCBI_API_KEY=your_api_key_here -- npx -y @djmima/pubmed-mcp@latest\n```\n\nAfter configuring, restart Codex (in the desktop app, **Restart** under **Settings → MCP servers**). You can also register the server from **Add server** on the same screen. In the CLI and IDE extension, `/mcp` shows the connected servers.\n\n---\n\n### Anthropic API (programmatic use)\n\n```python\nimport os\n\nimport anthropic\n\nclient = anthropic.Anthropic()\nresponse = client.beta.messages.create(\n    model=\"claude-opus-5\",\n    max_tokens=16000,\n    messages=[{\n        \"role\": \"user\",\n        \"content\": \"Find recent papers on CRISPR gene editing in cancer treatment\"\n    }],\n    mcp_servers=[{\n        \"type\": \"url\",\n        \"url\": \"https://pubmed-mcp-PROJECT_NUMBER.asia-northeast1.run.app/mcp\",\n        \"name\": \"pubmed\",\n        # /mcp is protected by OAuth, so an access token is required\n        \"authorization_token\": os.environ[\"PUBMED_MCP_TOKEN\"],\n    }],\n    tools=[{\"type\": \"mcp_toolset\", \"mcp_server_name\": \"pubmed\"}],\n    betas=[\"mcp-client-2025-11-20\"]\n)\n```\n\nThe MCP connector in the Anthropic API can only connect to remote servers exposed over HTTP, so you need to deploy to Cloud Run first.\nSee [Deploying to Google Cloud Run](#deploying-to-google-cloud-run) for deployment, and [Client connection settings](#client-connection-settings) for getting an access token.\n\n---\n\n### Building from source\n\nTo modify the source code, clone the repository and build it.\n\n```bash\ngit clone https://github.com/DJMIMA/PubMed_MCP.git\ncd PubMed_MCP\nnpm install\nnpm run build\n```\n\nIn your MCP client configuration, use `node /absolute/path/to/PubMed_MCP/dist/index.js` instead of `npx -y @djmima/pubmed-mcp@latest`\n(on Windows, write the path with forward slashes, like `C:/path/to/PubMed_MCP/dist/index.js`).\nTo use the CLI, run `npm link` next; it registers the `pubmed` and `pubmed-mcp` commands (undo with `npm rm -g @djmima/pubmed-mcp`).\n\n`dist/` is not in the repository. After updating the source with `git pull`, run `npm run build` again\nand restart your MCP client. A running server keeps using the old build until it restarts.\n\n### Local development\n\n```bash\n# Create a .env file and set your API key\ncp .env.example .env\n# Edit .env and fill in NCBI_API_KEY\n\n# Start in stdio mode (default)\nnpm run dev\n\n# Start in HTTP mode (enabled by setting PORT; the OAuth variables are also required)\nPORT=8080 npm run dev\n# → http://localhost:8080/mcp   MCP endpoint (Bearer token required)\n# → http://localhost:8080/health Health check\n```\n\nHTTP mode reads `OAUTH_ISSUER`, `OAUTH_JWKS_URL`, `MCP_RESOURCE_URL`, and `ALLOWED_SUBJECTS` at startup, and exits with the following error if any of them is missing:\n\n```\nFatal error: Error: Missing required environment variable: OAUTH_ISSUER\n```\n\nSet these values in `.env` before starting (see [Environment variables](#environment-variables) for what each one means).\nTo check `/health` or the 401 response, placeholder values (in URL form for the URLs) are enough to start the server, but to actually call `/mcp`\nyou need an access token issued with `MCP_RESOURCE_URL` as its `aud`. To try the tools without authentication, use stdio mode.\n\n---\n\n## CLI\n\nThe `pubmed` command runs the same tools as the MCP server from the shell. Its output is the same JSON as the MCP tools,\nwritten to standard output or to a file (`-o`). By saving results to a file and extracting only the fields you need with `jq`,\nagents such as Claude Code and Codex avoid loading large amounts of metadata into their context.\n\nFor example, the metadata for the top 20 results for `TP53 AND myelodysplastic syndromes[mh]` is about 108 KB,\nbut extracting only the PMID, year, and title brings it down to 3.2 KB (about 1/34). A single full text runs to tens of thousands of characters.\n\n### Installation\n\n```bash\nnpm install -g @djmima/pubmed-mcp\n```\n\nYou're done when `pubmed --help` prints the help. `pubmed --version` (or `-v`) prints the installed version.\n\nThe NCBI API key is read from the `NCBI_API_KEY` environment variable. Add\n`export NCBI_API_KEY=your_api_key_here` to your shell configuration file (`~/.bashrc`, `~/.zshrc`, etc.), or on Windows run\n`setx NCBI_API_KEY your_api_key_here` once and then reopen your terminal.\n\nIf you [built from source](#building-from-source) and registered the commands with `npm link`, the CLI also reads `.env` in the repository root\n(create it with `cp .env.example .env`) when the environment variable is not set, so the key is used whichever directory you run it from.\n\n### Commands\n\n| Command | MCP tool | Input | Items per request |\n|---|---|---|---|\n| `pubmed search <query>` | `search_articles` | Search query (`-` reads from stdin) | — |\n| `pubmed metadata <pmid>...` | `get_article_metadata` | PMIDs | 200 |\n| `pubmed related <pmid>...` | `find_related_articles` | PMIDs | 200 |\n| `pubmed citation --journal <journal> --year <year> ...` | `lookup_article_by_citation` | Options, or a JSON array or JSON Lines with `--input` | 100 |\n| `pubmed convert <id>...` | `convert_article_ids` | PMIDs, PMCIDs, or DOIs (set with `--id-type`) | 200 |\n| `pubmed fulltext <pmcid>...` | `get_full_text_article` | PMCIDs | 20 |\n| `pubmed copyright <pmid>...` | `get_copyright_status` | PMIDs | 50 |\n\n- Option names are the MCP parameter names in kebab case (`max_results` → `--max-results`, `date_from` → `--date-from`, and so on). See `pubmed <command> --help` for details.\n- Pass IDs as arguments (separated by spaces or commas), or pass `-` to read them from stdin, one per line.\n- IDs beyond the per-request limit are split automatically, sent in order, and merged into one JSON. The MCP tools' limits (200 for metadata, for example) do not apply.\n- With `-o <file>`, the JSON is written to a file, and the item count and file size are printed to stderr.\n- The exit code is 0 on success, 1 on NCBI or file errors, and 2 on usage errors. Error details go to stderr.\n\n### Examples\n\n```bash\n# Search, and check how PubMed interpreted the query\npubmed search \"TP53[tiab] AND myelodysplastic syndromes[mh]\" --max-results 200 -o search.json\njq '{total_count, query_translation, warnings, errors}' search.json\n\n# Get metadata for every hit and list PMID, year, journal, and title\njq -r '.pmids[]' search.json | pubmed metadata - -o meta.json\njq -r '.articles[] | [.identifiers.pmid, .publication_date.year, .journal.iso_abbreviation, .title] | @tsv' meta.json\n\n# Get full text only for articles that have it, and search just the parts you need\njq -r '.pmids[]' search.json | pubmed copyright - -o rights.json\njq -r '.statuses[] | select(.has_full_text) | .pmcid' rights.json | pubmed fulltext - -o full.json\njq -r '.articles[].full_text' full.json | grep -n -i 'venetoclax'\n```\n\n### Using with agents\n\n[`skills/pubmed-cli/SKILL.md`](skills/pubmed-cli/SKILL.md) is a Skill that teaches agents how to use the CLI (save results to files and read them with jq, pass IDs together in one call, and so on)\nalong with jq recipes. Copy it into your user-level skills folder and it is used in every project.\nClaude Code (including the Code tab of Claude Desktop) reads skills from `~/.claude/skills/`, and Codex from `~/.agents/skills/`\n(on Windows, `~` is `%USERPROFILE%`).\n\nThe Skill is included in the npm package, so if you installed with `npm install -g`, you can copy it with the following commands\n(on Windows, run them in Git Bash):\n\n```bash\nSKILL_DIR=\"$(npm root -g)/@djmima/pubmed-mcp/skills/pubmed-cli\"\nmkdir -p ~/.claude/skills ~/.agents/skills\ncp -r \"$SKILL_DIR\" ~/.claude/skills/\ncp -r \"$SKILL_DIR\" ~/.agents/skills/\n```\n\nIf you built from source, set `SKILL_DIR=skills/pubmed-cli` in the repository root and run the same commands.\nCopy it again whenever you update the package or the Skill.\n\nTo stop Claude Code from asking for permission every time it runs a command, add `pubmed` and `jq` to `permissions.allow`\nin `~/.claude/settings.json` (if you already have settings, append to the array):\n\n```json\n{\n  \"permissions\": {\n    \"allow\": [\"Bash(pubmed:*)\", \"Bash(jq:*)\"]\n  }\n}\n```\n\nNotes:\n\n- The CLI works only where a shell is available (Claude Code, Codex, and so on). From claude.ai chats or from a custom connector deployed on Cloud Run, keep using the MCP server.\n- NCBI rate limits apply per process. Running several `pubmed` processes in parallel can exceed the limit in total, so pass IDs together in a single run.\n- On Windows, run pipelines in Git Bash or PowerShell 7. In Windows PowerShell 5.1, `>` saves files as UTF-16, so use `-o` instead.\n\n---\n\n## Deploying to Google Cloud Run\n\nThe server can be deployed to Google Cloud Run as a Docker container.\nWhen the `PORT` environment variable is set, it starts in HTTP mode automatically and talks to MCP clients over the Streamable HTTP transport.\n\nIn HTTP mode, `/mcp` is **protected by OAuth 2.0**. The server acts as an OAuth resource server and,\nfor every request, verifies the Bearer token's (JWT's) signature, issuer (`iss`), audience (`aud`), and expiry against the authorization server's public keys (JWKS).\nThe login screen and token issuance are handled by an external authorization server (here, WorkOS AuthKit).\n\nCloud Run itself is exposed with `--allow-unauthenticated`. Cloud Run's IAM authentication (including IAP) is incompatible with connections from claude.ai,\nso access control is done by OAuth in the app rather than by Cloud Run.\n\n| Path | Authentication | Description |\n|------|----------------|-------------|\n| `/mcp` | Bearer token required | MCP endpoint |\n| `/.well-known/oauth-protected-resource` | None | Metadata pointing to the authorization server (RFC 9728) |\n| `/health` | None | Health check |\n\n```\nClaude (Web / Desktop / mobile), Claude Code, Anthropic API\n        │  Authorization: Bearer <access token issued by WorkOS AuthKit>\n        ▼\n  Cloud Run (--allow-unauthenticated)\n        │  /mcp verifies the JWT and limits users with ALLOWED_SUBJECTS\n        ▼\n  MCP handler\n```\n\nThe Claude apps and Claude Code follow the metadata from the 401 response (`WWW-Authenticate` header) returned to requests without a token\nto find the authorization server, and get a token after a login in the browser.\nWhen using the Anthropic API, the caller prepares the token and passes it in.\n\n### Prerequisites\n\n- A Google Cloud project (with billing enabled)\n- [gcloud CLI](https://cloud.google.com/sdk/docs/install) installed and logged in\n- A [WorkOS](https://workos.com/) account (AuthKit is used as the OAuth authorization server)\n\n### Step 1 — Set up the project and APIs\n\n```bash\n# Set the project to deploy to\ngcloud config set project MY_PROJECT_ID\n\n# Enable the required APIs (first time only)\ngcloud services enable \\\n  run.googleapis.com \\\n  artifactregistry.googleapis.com \\\n  cloudbuild.googleapis.com \\\n  secretmanager.googleapis.com  # only if you manage NCBI_API_KEY there\n```\n\n### Step 2 — Create an Artifact Registry repository (first time only)\n\n```bash\ngcloud artifacts repositories create pubmed-mcp \\\n  --repository-format=docker \\\n  --location=asia-northeast1 \\\n  --description=\"PubMed MCP Server\"\n```\n\n### Step 3 — Store secrets in Secret Manager\n\nUse Secret Manager so the NCBI API key doesn't end up in your command history or logs.\n\n```bash\n# Store the NCBI API key\necho -n \"your_ncbi_api_key\" | \\\n  gcloud secrets create ncbi-api-key \\\n    --data-file=- \\\n    --replication-policy=automatic\n```\n\n### Step 4 — Build and push the container image\n\nWith Cloud Build, you can build without installing Docker locally.\n`gcloud builds submit` sends the files in the current directory to Cloud Build, so\n**clone the repository first.**\n\n```bash\n# Clone the repository and move into it\ngit clone https://github.com/DJMIMA/PubMed_MCP.git\ncd PubMed_MCP\n\n# Build with Cloud Build (no local Docker needed)\ngcloud builds submit \\\n  --region=asia-northeast1 \\\n  --tag asia-northeast1-docker.pkg.dev/MY_PROJECT_ID/pubmed-mcp/server:latest\n```\n\nTo build with local Docker:\n\n```bash\ngcloud auth configure-docker asia-northeast1-docker.pkg.dev\n\ndocker build -t asia-northeast1-docker.pkg.dev/MY_PROJECT_ID/pubmed-mcp/server:latest .\ndocker push asia-northeast1-docker.pkg.dev/MY_PROJECT_ID/pubmed-mcp/server:latest\n```\n\n### Step 5 — Set up the OAuth authorization server (WorkOS AuthKit)\n\nFirst, decide the public URL of the MCP endpoint. Cloud Run services are assigned a URL of the form\n`https://SERVICE_NAME-PROJECT_NUMBER.REGION.run.app`, so you can determine it before deploying.\n\n```bash\nPROJECT_NUMBER=$(gcloud projects describe MY_PROJECT_ID --format='value(projectNumber)')\nMCP_RESOURCE_URL=\"https://pubmed-mcp-${PROJECT_NUMBER}.asia-northeast1.run.app/mcp\"\necho \"$MCP_RESOURCE_URL\"\n```\n\nThis URL is `MCP_RESOURCE_URL`. Use **exactly the same string** for the WorkOS Resource Indicator and for the URL you register in each client\n(clients check that the URL they connect to matches the `resource` in the metadata, and the server checks the token's `aud` against this value).\nCloud Run also assigns a URL of the form `https://pubmed-mcp-xxxx-an.a.run.app`, and both work, but use only one of them for OAuth.\n\nNext, configure AuthKit in the WorkOS dashboard.\n\n1. Under **Connect → Configuration**, enable **Dynamic Client Registration** (so MCP clients such as claude.ai can register themselves as OAuth clients)\n2. Register `MCP_RESOURCE_URL` as a **Resource Indicator** (access tokens get this URL as their `aud`)\n3. Open the authorization server metadata of your AuthKit domain and note the `issuer` and `jwks_uri` values\n\n   ```bash\n   curl https://YOUR_AUTHKIT_DOMAIN/.well-known/oauth-authorization-server\n   # → {\"issuer\":\"https://YOUR_AUTHKIT_DOMAIN\", ..., \"jwks_uri\":\"https://YOUR_AUTHKIT_DOMAIN/oauth2/jwks\", ...}\n   ```\n\nWorkOS Staging and Production environments have separate settings and separate AuthKit domains. When you switch environments, redo the settings above\nand replace `OAUTH_ISSUER` and `OAUTH_JWKS_URL`.\n\n### Step 6 — Deploy to Cloud Run\n\nDeploy with the values you noted in step 5. Set `ALLOWED_SUBJECTS` to a placeholder value (here, `placeholder`) for now (see step 8 for why).\n\n```bash\n# Replace with the issuer and jwks_uri values from step 5\nOAUTH_ISSUER=\"https://YOUR_AUTHKIT_DOMAIN\"\nOAUTH_JWKS_URL=\"https://YOUR_AUTHKIT_DOMAIN/oauth2/jwks\"\n\ngcloud run deploy pubmed-mcp \\\n  --image asia-northeast1-docker.pkg.dev/MY_PROJECT_ID/pubmed-mcp/server:latest \\\n  --region asia-northeast1 \\\n  --port 8080 \\\n  --memory 512Mi \\\n  --cpu 1 \\\n  --timeout 300 \\\n  --allow-unauthenticated \\\n  --set-secrets NCBI_API_KEY=ncbi-api-key:latest \\\n  --set-env-vars \"OAUTH_ISSUER=${OAUTH_ISSUER},OAUTH_JWKS_URL=${OAUTH_JWKS_URL},MCP_RESOURCE_URL=${MCP_RESOURCE_URL},ALLOWED_SUBJECTS=placeholder\"\n```\n\n| Variable | Value |\n|----------|-------|\n| `OAUTH_ISSUER` | The `issuer` from the authorization server metadata. It is compared with the token's `iss` exactly, so copy it as-is, including whether it has a trailing `/` |\n| `OAUTH_JWKS_URL` | The `jwks_uri` from the same metadata: the URL of the public keys used to verify token signatures |\n| `MCP_RESOURCE_URL` | The MCP endpoint URL you decided in step 5. It is compared with the token's `aud`, and published as `resource` in `/.well-known/oauth-protected-resource` |\n| `ALLOWED_SUBJECTS` | A comma-separated list of user IDs (the token's `sub`) allowed to connect. Required: without it, every user who can get a valid token from AuthKit could connect |\n\nIf any of `OAUTH_ISSUER`, `OAUTH_JWKS_URL`, `MCP_RESOURCE_URL`, or `ALLOWED_SUBJECTS` is missing, the server exits at startup with\n`Missing required environment variable: ...` and the deployment fails. If it fails, look for this message in the Cloud Run logs\n(if you set the variables in Cloud Console, also check for spaces around the variable names).\n\n> **`--set-env-vars` vs. `--update-env-vars`**: `--set-env-vars` removes all existing environment variables and then sets the ones you specify (variables you leave out are deleted).\n> To add or change only some values after deploying, use `--update-env-vars`, which merges with the existing values (it also works with `gcloud run services update`).\n\n### Step 7 — Verify the deployment\n\n`/health` and `/.well-known/oauth-protected-resource` respond without authentication. Without a token, `/mcp` **should return 401**.\n\n**Linux / macOS (bash)**\n\n```bash\nPROJECT_NUMBER=$(gcloud projects describe MY_PROJECT_ID --format='value(projectNumber)')\nCLOUD_RUN_URL=\"https://pubmed-mcp-${PROJECT_NUMBER}.asia-northeast1.run.app\"\n\n# Health check\ncurl \"$CLOUD_RUN_URL/health\"\n# → ok\n\n# Protected Resource Metadata (check that resource is MCP_RESOURCE_URL and authorization_servers is OAUTH_ISSUER)\ncurl \"$CLOUD_RUN_URL/.well-known/oauth-protected-resource\"\n# → {\"resource\":\"https://pubmed-mcp-PROJECT_NUMBER.asia-northeast1.run.app/mcp\",\"authorization_servers\":[\"https://YOUR_AUTHKIT_DOMAIN\"],\"bearer_methods_supported\":[\"header\"]}\n\n# MCP endpoint (401 because there is no token; -i shows headers; a heredoc avoids quoting problems)\ncurl -i \"$CLOUD_RUN_URL/mcp\" \\\n  -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -d @- <<'EOF'\n{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-03-26\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"0.0.1\"}}}\nEOF\n```\n\nThe `/mcp` response looks like this (excerpt; the HTTP version and header-name casing vary by environment):\n\n```\nHTTP/2 401\nwww-authenticate: Bearer resource_metadata=\"https://pubmed-mcp-PROJECT_NUMBER.asia-northeast1.run.app/.well-known/oauth-protected-resource\", error=\"missing_token\"\ncontent-type: application/json; charset=utf-8\n\n{\"error\":\"missing_token\"}\n```\n\nMCP clients follow `resource_metadata` in the `WWW-Authenticate` header to find the authorization server.\nIf token verification fails, the server returns 401 with `error=\"invalid_token\"`; if the token is valid but its `sub` is not in `ALLOWED_SUBJECTS`, it returns 403 (`{\"error\":\"forbidden\"}`).\n\n**Windows (Command Prompt)**\n\n```cmd\n:: Set %CLOUD_RUN_URL% before running (replace PROJECT_NUMBER with your project number)\nset CLOUD_RUN_URL=https://pubmed-mcp-PROJECT_NUMBER.asia-northeast1.run.app\n\ncurl \"%CLOUD_RUN_URL%/health\"\n\ncurl \"%CLOUD_RUN_URL%/.well-known/oauth-protected-resource\"\n\ncurl -i \"%CLOUD_RUN_URL%/mcp\" -X POST -H \"Content-Type: application/json\" -d \"{\\\"jsonrpc\\\":\\\"2.0\\\",\\\"id\\\":1,\\\"method\\\":\\\"initialize\\\",\\\"params\\\":{\\\"protocolVersion\\\":\\\"2025-03-26\\\",\\\"capabilities\\\":{},\\\"clientInfo\\\":{\\\"name\\\":\\\"test\\\",\\\"version\\\":\\\"0.0.1\\\"}}}\"\n```\n\n**Windows (PowerShell)**\n\n```powershell\n$CLOUD_RUN_URL = \"https://pubmed-mcp-PROJECT_NUMBER.asia-northeast1.run.app\"\n\ncurl.exe \"$CLOUD_RUN_URL/health\"\n\ncurl.exe \"$CLOUD_RUN_URL/.well-known/oauth-protected-resource\"\n\ncurl.exe -i \"$CLOUD_RUN_URL/mcp\" -X POST -H \"Content-Type: application/json\" `\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-03-26\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"0.0.1\"}}}'\n```\n\n### Step 8 — Add your user ID to ALLOWED_SUBJECTS\n\nWith Dynamic Client Registration, anyone can register an OAuth client, so `ALLOWED_SUBJECTS` limits which users can connect\n(without it, every user who can log in to AuthKit could use `/mcp`, including third parties if AuthKit allows sign-ups, so the server does not start without it).\nThe value is the access token's `sub` (the WorkOS user ID, starting with `user_`).\n\nThe server logs the `sub` of users it rejects. So connect once with the placeholder value in place, and find your `sub` in the log entry for the rejected request.\n\n1. Connect from claude.ai or another client following [Client connection settings](#client-connection-settings) below, and log in with WorkOS AuthKit.\n   Because your `sub` is not in `ALLOWED_SUBJECTS`, the connection fails with 403, and the server logs `[auth] forbidden subject: ...`.\n2. Find your `sub` in the logs (it is the same as the user ID shown under **Users** in the WorkOS dashboard).\n\n   ```bash\n   gcloud run services logs read pubmed-mcp \\\n     --region asia-northeast1 \\\n     --log-filter='textPayload:\"forbidden subject\"' \\\n     --limit 5\n   # → ... [auth] forbidden subject: user_01XXXXXXXXXXXXXXXXXXXXXXXX\n   ```\n\n3. Set that value. Because this uses `--update-env-vars`, the other environment variables stay as they are.\n\n   ```bash\n   gcloud run services update pubmed-mcp \\\n     --region asia-northeast1 \\\n     --update-env-vars ALLOWED_SUBJECTS=user_01XXXXXXXXXXXXXXXXXXXXXXXX\n   ```\n\n   To allow several users, the value contains commas, so change the delimiter with `^@^`\n   (for example, `--update-env-vars '^@^ALLOWED_SUBJECTS=user_01AAAA,user_01BBBB'`; in Windows cmd / PowerShell, write `^` as `^^^^`. See `gcloud topic escaping` for details).\n4. Reconnect from the client.\n\n---\n\n### Client connection settings\n\nAfter deploying, register the MCP endpoint URL in each client. Use **exactly the same string** as `MCP_RESOURCE_URL`\n(for example, `https://pubmed-mcp-PROJECT_NUMBER.asia-northeast1.run.app/mcp`).\nThe WorkOS AuthKit login screen opens on the first connection. You can connect if the `sub` of the account you log in with is in `ALLOWED_SUBJECTS`\n(see step 8 for adding your own `sub`).\n\n**Claude (Web and Claude Desktop) — custom connector**\n\nAdd the remote server as a \"custom connector\" ([Claude Help Center](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp)).\nThe Free plan also allows one custom connector.\n\n- Pro / Max plans\n  1. Open **Customize > Connectors** in [claude.ai](https://claude.ai) or Claude Desktop\n  2. Click **+** → **Add custom connector**\n  3. Enter the URL (`MCP_RESOURCE_URL`) and click **Add**\n  4. Authenticate from **Connect** on the added connector (the WorkOS AuthKit login screen opens)\n- Team / Enterprise plans\n  1. An owner opens **Organization settings > Connectors**, clicks **Add**, hovers over **Custom**, and chooses **Web**\n  2. Enter the URL (`MCP_RESOURCE_URL`) and click **Add**\n  3. Each member finds the connector under **Customize > Connectors** and authenticates from **Connect**\n\nLeave OAuth Client ID / OAuth Client Secret under **Advanced settings** empty (the client registers itself with Dynamic Client Registration).\nTo use it in a chat, enable it per conversation from **+** → **Connectors** at the bottom left of the input box.\n\nClaude Desktop's `claude_desktop_config.json` is for local (stdio) servers; writing `\"type\"` or `\"url\"` there does not connect to a remote server.\nOn Desktop too, add the remote server as a custom connector as above (connectors added on the Web are available on Desktop as well).\n\n**Claude mobile apps (Android / iOS)**\n\nCustom connectors added on the Web or in Claude Desktop work as-is in the mobile apps signed in to the same account.\nAdding connectors from the mobile apps is a beta feature, so add them on the Web or in Desktop.\n\n**Claude Code**\n\n```bash\nclaude mcp add --transport http --scope user pubmed-remote https://pubmed-mcp-PROJECT_NUMBER.asia-northeast1.run.app/mcp\n```\n\nClaude Code does not read `mcpServers` in `~/.claude/settings.json`, so register the server with `claude mcp add`.\nAfter registering, open `/mcp` in Claude Code, choose `pubmed-remote`, and log in to WorkOS AuthKit in the browser to authenticate.\n\n**Anthropic API (Python)**\n\n```python\nimport os\n\nimport anthropic\n\nclient = anthropic.Anthropic()\nresponse = client.beta.messages.create(\n    model=\"claude-opus-5\",\n    max_tokens=16000,\n    messages=[{\"role\": \"user\", \"content\": \"...\"}],\n    mcp_servers=[{\n        \"type\": \"url\",\n        \"url\": \"https://pubmed-mcp-PROJECT_NUMBER.asia-northeast1.run.app/mcp\",\n        \"name\": \"pubmed\",\n        \"authorization_token\": os.environ[\"PUBMED_MCP_TOKEN\"],\n    }],\n    tools=[{\"type\": \"mcp_toolset\", \"mcp_server_name\": \"pubmed\"}],\n    betas=[\"mcp-client-2025-11-20\"]\n)\n```\n\nThe MCP connector neither performs the OAuth login nor refreshes tokens. The caller must get an access token that WorkOS AuthKit issued for this server\n(with `aud` equal to `MCP_RESOURCE_URL` and a `sub` included in `ALLOWED_SUBJECTS`), pass it as `authorization_token`,\nand get a new one when it expires.\n\nYou can get a token for testing with MCP Inspector ([MCP connector documentation](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector#authentication)):\n\n1. Run `npx @modelcontextprotocol/inspector`\n2. Choose **Streamable HTTP** as the **Transport type** and enter `MCP_RESOURCE_URL` as the URL\n3. Click **Open Auth Settings** → **Quick OAuth Flow** and log in with WorkOS AuthKit\n4. Continue until **Authentication complete**, then copy the displayed `access_token` value\n\n---\n\n### Updating the image (redeploying)\n\n```bash\ncd PubMed_MCP\ngit pull\n\ngcloud builds submit \\\n  --region=asia-northeast1 \\\n  --tag asia-northeast1-docker.pkg.dev/MY_PROJECT_ID/pubmed-mcp/server:latest\n\ngcloud run services update pubmed-mcp \\\n  --region asia-northeast1 \\\n  --image asia-northeast1-docker.pkg.dev/MY_PROJECT_ID/pubmed-mcp/server:latest\n```\n\nAn update that specifies only `--image` keeps the existing environment variables and secrets.\n\n---\n\n## Development commands\n\n```bash\nnpm run build      # Compile TypeScript → dist/\nnpm run dev        # Run directly with tsx (for development)\nnpm run cli -- search \"CRISPR\" --max-results 5   # Run the CLI directly with tsx (for development)\nnpm test           # Run the test suite\nnpm run typecheck  # Type-check only (no emit)\nnpm run lint       # Run ESLint\n```\n\n### Releasing to npm (for maintainers)\n\nPublishing a Release on GitHub makes [`.github/workflows/release.yml`](.github/workflows/release.yml) stage a publish to npm ([staged publishing](https://docs.npmjs.com/staged-publishing/)).\nThe new version is not published until a maintainer approves it on npmjs.com with 2FA. This way, a compromised workflow or dependency cannot publish on its own.\nBecause the workflow uses npm [Trusted Publishing](https://docs.npmjs.com/trusted-publishers/) (OIDC), no npm token is stored in the repository.\n\nPRs that make changes add the same entry to `[Unreleased]` in both [`CHANGELOG.md`](CHANGELOG.md) (English) and [`CHANGELOG_ja.md`](CHANGELOG_ja.md) (Japanese). To release:\n\n1. On a release branch, run `npm version patch --no-git-tag-version` (or `minor` / `major`) to bump the version in `package.json`\n   (GitHub adds the tag in step 3, so don't tag here)\n2. In both `CHANGELOG.md` and `CHANGELOG_ja.md`, move the contents of `[Unreleased]` under a heading for the new version (for example, `## [1.0.1] - 2026-11-01`), update the comparison links at the end, then open a PR and merge it into main\n3. On GitHub, publish a Release targeting main with the tag `v<version>` (for example, `v1.0.1`). Paste the corresponding part of `CHANGELOG.md` (English) into the release notes\n4. The workflow checks that the tag matches the version in `package.json`, runs typecheck, lint, tests, and build, and then stages the publish\n5. Review it on the **Staged Packages** tab of the package page on npmjs.com and click **Approve** (2FA required). You can also approve from the CLI with `npm stage approve <stage-id>`\n\nAs a rule of thumb, bug fixes and documentation changes are `patch`, new tools or options are `minor`,\nand changes to tool names, arguments, or output shape that break existing usage are `major`.\n\nThe first release is published by hand, because Trusted Publishing can't be configured until the package exists on npm.\n\n1. Run `npm login` with an npm account that has 2FA enabled, and publish the latest main with `npm publish` (if it is held for approval, approve it as in step 5 above)\n2. In the package settings on npmjs.com → **Trusted Publisher**, choose GitHub Actions and register the repository `DJMIMA/PubMed_MCP` and the workflow `release.yml`.\n   Under **Allowed actions**, allow only `npm stage publish` (always allowed); do not allow `npm publish` or `npm dist-tag`\n3. On the same settings page, under **Publishing access**, choose **Require two-factor authentication and disallow tokens**\n\n---\n\n## Environment variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `NCBI_API_KEY` | No | NCBI API key. Raises the rate limit from 3 to 8 req/s |\n| `PORT` | No | Starts the server in HTTP mode when set. Cloud Run injects this variable automatically |\n| `OAUTH_ISSUER` | Required in HTTP mode | The authorization server's issuer (`issuer` in its metadata). Compared with the token's `iss` |\n| `OAUTH_JWKS_URL` | Required in HTTP mode | The URL of the authorization server's JWKS (`jwks_uri` in the same metadata). Used to verify token signatures |\n| `MCP_RESOURCE_URL` | Required in HTTP mode | The public URL of the MCP endpoint. Compared with the token's `aud`, and published as `resource` in the Protected Resource Metadata |\n| `ALLOWED_SUBJECTS` | Required in HTTP mode | A comma-separated list of token `sub` values allowed to connect |\n\n`OAUTH_ISSUER`, `OAUTH_JWKS_URL`, `MCP_RESOURCE_URL`, and `ALLOWED_SUBJECTS` are used only in HTTP mode and are not needed in stdio mode.\nSee steps 5–8 of [Deploying to Google Cloud Run](#deploying-to-google-cloud-run) for how to choose their values.\n\nTo use a `.env` file, copy `.env.example` and edit it.\nIn production, pass `NCBI_API_KEY` from Secret Manager with Cloud Run's `--set-secrets`, and set the OAuth values with `--set-env-vars` / `--update-env-vars`.\n\n---\n\n## References\n\n- [MCP documentation](https://modelcontextprotocol.io/docs)\n- [NCBI E-utilities documentation](https://www.ncbi.nlm.nih.gov/books/NBK25499/)\n- [NCBI API key registration](https://www.ncbi.nlm.nih.gov/account/)\n- [PubMed search help](https://pubmed.ncbi.nlm.nih.gov/help/)\n- [Cloud Run documentation](https://cloud.google.com/run/docs)\n- [Secret Manager documentation](https://cloud.google.com/secret-manager/docs)\n\n---\n\n## License\n\nThe source code in this repository is released under the [MIT License](LICENSE).\n\n- This is an unofficial tool, not affiliated with NCBI or NLM (the U.S. National Library of Medicine).\n- Access to PubMed / PMC goes through NCBI's E-utilities. When using it, follow [NCBI's website and data usage policies, including the Disclaimer and Copyright notice](https://www.ncbi.nlm.nih.gov/home/about/policies/), and the [E-utilities usage guidelines](https://www.ncbi.nlm.nih.gov/books/NBK25497/).\n- As the guidelines require, requests to NCBI include this software's name (`tool=pubmed-mcp`) and the developer's contact address (`email`). If you modify this code and distribute it as different software, change `TOOL_NAME` and `TOOL_EMAIL` in `src/pubmed/client.ts` to your own values.\n- The MIT License covers only this software's code. Copyright in retrieved abstracts and full texts belongs to their authors and publishers. Check each article's license with `get_copyright_status`.\n","readmeFilename":"README.md"}