{"_id":"@boxlab/yandex-mcp-core","_rev":"2-7cdeb22e754c321b385fb3d8633917b1","name":"@boxlab/yandex-mcp-core","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@boxlab/yandex-mcp-core","version":"0.1.0","keywords":["yandex","oauth","pkce","mcp","model-context-protocol"],"license":"MIT","_id":"@boxlab/yandex-mcp-core@0.1.0","maintainers":[{"name":"dearonski","email":"abromovich546@gmail.com"}],"homepage":"https://github.com/BoxLab-Ltd/yandex-mcp-core#readme","bugs":{"url":"https://github.com/BoxLab-Ltd/yandex-mcp-core/issues"},"dist":{"shasum":"6d73267bbea38a210d8950bd14fc34d7a7695839","tarball":"https://registry.npmjs.org/@boxlab/yandex-mcp-core/-/yandex-mcp-core-0.1.0.tgz","fileCount":63,"integrity":"sha512-7lq1zuXfF1umlip2NmE17MRJCZfqodyAxOkWu56voWVp1pZE7GWkZ1JwE6CawQZxpQtIUt+pPqzy5JfHHmBrzw==","signatures":[{"sig":"MEUCIDZSDIjqotBnb27qDjXwCnn1BYm1EM6XDPhCfzRxY+sXAiEA1Pt0Sh1qPl6Ycdm16pg/BBKUYpakmzl3QwYE+nfkHik=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":118641},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"1d0170af60e27b4fda99220506d3bd3cbc366305","scripts":{"lint":"eslint .","test":"bun test","build":"tsc -p tsconfig.build.json","format":"prettier --write .","typecheck":"tsc -p tsconfig.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"dearonski","email":"abromovich546@gmail.com"},"repository":{"url":"git+https://github.com/BoxLab-Ltd/yandex-mcp-core.git","type":"git"},"_npmVersion":"10.9.8","description":"Shared auth (OAuth PKCE + loopback login), HTTP client and MCP helpers for Yandex MCP servers.","directories":{},"_nodeVersion":"22.23.1","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.29.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.5.0","prettier":"^3.8.4","@eslint/js":"^10.0.1","@types/bun":"^1.3.14","typescript":"^6.0.3","@types/node":"^26.1.1","typescript-eslint":"^8.61.0","eslint-config-prettier":"^10.1.8"},"_npmOperationalInternal":{"tmp":"tmp/yandex-mcp-core_0.1.0_1784469267887_0.3854066481877181","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@boxlab/yandex-mcp-core","version":"0.1.1","description":"Shared auth (OAuth PKCE + loopback login), HTTP client and MCP helpers for Yandex MCP servers.","keywords":["yandex","oauth","pkce","mcp","model-context-protocol"],"license":"MIT","publishConfig":{"access":"public"},"homepage":"https://github.com/BoxLab-Ltd/yandex-mcp-core#readme","repository":{"type":"git","url":"git+https://github.com/BoxLab-Ltd/yandex-mcp-core.git"},"bugs":{"url":"https://github.com/BoxLab-Ltd/yandex-mcp-core/issues"},"type":"module","engines":{"node":">=18"},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json","lint":"eslint .","format":"prettier --write .","test":"bun test","prepublishOnly":"npm run build"},"dependencies":{"@modelcontextprotocol/sdk":"^1.29.0","zod":"^4.4.3"},"devDependencies":{"@eslint/js":"^10.0.1","@types/bun":"^1.3.14","@types/node":"^26.1.1","eslint":"^10.5.0","eslint-config-prettier":"^10.1.8","prettier":"^3.8.4","typescript":"^6.0.3","typescript-eslint":"^8.61.0"},"gitHead":"a77fab23d706210aa5f7a898f505d82de283b89f","_id":"@boxlab/yandex-mcp-core@0.1.1","_nodeVersion":"22.23.1","_npmVersion":"11.18.0","dist":{"integrity":"sha512-aZg6C/UIp72SdeGl9l6qHUL0PRwh2NqgaBcLbDwRkGXy3RbVUfI3blSFEXsYTlWWhhBAo3jCifnk+GZBRD6YcA==","shasum":"fd4760028980600c85de38faaf66170e3ffdcda1","tarball":"https://registry.npmjs.org/@boxlab/yandex-mcp-core/-/yandex-mcp-core-0.1.1.tgz","fileCount":63,"unpackedSize":119558,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@boxlab%2fyandex-mcp-core@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG/G0xV0ZWnFw33amd9C1DBVeHe697X1t19S4G3O/D8MAiEAgaYIROij9CGb+orY+V8w/ip8fqwUkyaD8zy45Z9cPkQ="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eb728403-982f-4724-ba91-39a47d6cc514"}},"directories":{},"maintainers":[{"name":"dearonski","email":"abromovich546@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/yandex-mcp-core_0.1.1_1784631084993_0.13509083148456402"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-19T13:54:27.743Z","modified":"2026-07-21T10:51:25.506Z","0.1.0":"2026-07-19T13:54:28.011Z","0.1.1":"2026-07-21T10:51:25.139Z"},"bugs":{"url":"https://github.com/BoxLab-Ltd/yandex-mcp-core/issues"},"license":"MIT","homepage":"https://github.com/BoxLab-Ltd/yandex-mcp-core#readme","keywords":["yandex","oauth","pkce","mcp","model-context-protocol"],"repository":{"type":"git","url":"git+https://github.com/BoxLab-Ltd/yandex-mcp-core.git"},"description":"Shared auth (OAuth PKCE + loopback login), HTTP client and MCP helpers for Yandex MCP servers.","maintainers":[{"name":"dearonski","email":"abromovich546@gmail.com"}],"readme":"# @boxlab/yandex-mcp-core\n\n[![CI](https://github.com/BoxLab-Ltd/yandex-mcp-core/actions/workflows/ci.yml/badge.svg)](https://github.com/BoxLab-Ltd/yandex-mcp-core/actions/workflows/ci.yml)\n[![npm](https://badgen.net/npm/v/@boxlab/yandex-mcp-core)](https://www.npmjs.com/package/@boxlab/yandex-mcp-core)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)\n\nShared plumbing for **Yandex MCP servers** — so authentication, the HTTP\nclient and the common MCP helpers live in one place across the family\n(`yandex-metrica-mcp`, `yandex-webmaster-mcp`, …).\n\nIt provides:\n\n- **Auth** — Yandex ID OAuth (authorization-code + PKCE, no client secret),\n  sign-in over a **loopback redirect** (the browser returns the code\n  automatically) with a copy-paste fallback, token providers that boot even\n  before the first sign-in, and a CLI helper.\n- **`login` / `submit_code` MCP tools** — sign in from the client, no terminal.\n- **`YandexClient`** — a small HTTP client (retries, concurrency cap, timeouts,\n  streaming) that talks to any Yandex REST API.\n- **`YandexApiError`** + `errorResult` / `toToolResult` — error mapping and MCP\n  result shaping.\n\nEach server plugs in its own OAuth scope, app id, token-cache name and static\ntoken env var; nothing is shared at runtime between servers except the code.\n\n## Usage\n\n```ts\nimport {\n    loadYandexAuthConfig,\n    resolveTokenProvider,\n    registerLoginTools,\n    runAuthCli,\n    YandexClient,\n} from '@boxlab/yandex-mcp-core'\n\nconst auth = loadYandexAuthConfig(process.env, {\n    scope: 'metrika:read',\n    appName: 'yandex-metrica-mcp',\n    embeddedClientId: '<your public client id>',\n    staticTokenEnv: 'YANDEX_METRIKA_TOKEN',\n})\n\n// CLI: `my-server auth`\nif (process.argv[2] === 'auth') await runAuthCli(auth)\n\nconst { provider, store } = resolveTokenProvider(auth)\nconst client = new YandexClient({\n    baseUrl: 'https://api-metrika.yandex.net',\n    userAgent: 'yandex-metrica-mcp/0.2.0',\n    getToken: () => provider.getAccessToken(),\n    onUnauthorized: rejected => provider.forceRefresh(rejected),\n    canRefresh: () => provider.canRefresh(),\n    maxConcurrency: 3,\n    requestTimeoutMs: 60_000,\n})\n\n// register the login/submit_code tools; they own token persistence\nregisterLoginTools(server, { config: auth, provider, store })\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}