{"_id":"@anseta/mcp","_rev":"2-7c505ba1d7017ce7e5d41b42f8040248","name":"@anseta/mcp","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.0":{"name":"@anseta/mcp","version":"0.2.0","keywords":["mcp","staking","anseta","blockchain"],"author":"","license":"MIT","_id":"@anseta/mcp@0.2.0","maintainers":[{"name":"dvisacker","email":"davidvanisacker@gmail.com"}],"homepage":"https://github.com/anseta-labs/mcp#readme","bugs":{"url":"https://github.com/anseta-labs/mcp/issues"},"bin":{"anseta-mcp":"dist/stdio.js"},"dist":{"shasum":"a0e6b521c9d2c43627e9f421dd57218db99119c4","tarball":"https://registry.npmjs.org/@anseta/mcp/-/mcp-0.2.0.tgz","fileCount":8,"integrity":"sha512-sJrGGCkyaOMFVDUBXZAc56aNzFJxPbaVnzCm2kXgLgXNqaKZvsdoF3Ns8jyvq0dQedXuNT7ZNVcI65NhcMTrCw==","signatures":[{"sig":"MEUCIQCizzy0OR5rF59CuquK5G3EqRIIvJaWE/rfM+H72c7x3QIgDlZKZguP2N/ixIgRdl/G5tStfAbklCui0bKYpq9Dq98=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52201},"main":"./dist/index.js","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"e3e613eeb4223465ae7b3c303d1294a125fa90d8","scripts":{"lint":"eslint .","test":"vitest run","build":"tsup src/stdio.ts src/index.ts --format esm --dts --clean","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","prepublishOnly":"pnpm run test && pnpm run build","typecheck:tests":"tsc -p tsconfig.test.json","capture:fixtures":"tsx scripts/capture-fixtures.ts"},"_npmUser":{"name":"dvisacker","email":"davidvanisacker@gmail.com"},"repository":{"url":"git+https://github.com/anseta-labs/mcp.git","type":"git"},"_npmVersion":"10.9.4","description":"MCP server exposing the Anseta staking API as 22 curated tools","directories":{},"_nodeVersion":"22.22.0","dependencies":{"zod":"^4.4.3","@anseta/typescript-sdk":"^0.2.0","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.30.3","devDependencies":{"tsx":"^4.23.12","tsup":"^8.5.1","eslint":"^9.39.5","vitest":"^4.1.11","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.3.0","typescript-eslint":"^8.68.0","@stylistic/eslint-plugin":"^5.10.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp_0.2.0_1788168304384_0.2062449825020931","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"_id":"@anseta/mcp@0.2.1","bin":{"anseta-mcp":"dist/stdio.js"},"bugs":{"url":"https://github.com/anseta-labs/mcp/issues"},"dist":{"shasum":"e5acf729f3960ee7727de29b4944006a7dd78eb3","tarball":"https://registry.npmjs.org/@anseta/mcp/-/mcp-0.2.1.tgz","fileCount":8,"integrity":"sha512-Nra/oOcKF5PFZ0D8peJMMQQYfFlmDCadWfdtSoGoVXcn4metDXagg7J2TKnE08YFO5DBTAYc+iigAOxn0VMRAA==","signatures":[{"sig":"MEUCIDbYN4qBX4P7g393mZbbQcfMBHSMWsRI4ALPs6t+aK5EAiEA1V3BsIlzh6rGkdC5H/v3eCVUjg7hLIVk4As7MoXXHag=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC8LZeGfR9ujwUAJGmLudmU4ccX+35E3/9lcRVAgSfDeAiB1ie6DIs+CH9hSF1nLZcFg+b/UhAH2rXD9ZULdAJX5DA=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anseta%2fmcp@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":52153},"main":"./dist/index.js","name":"@anseta/mcp","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./dist/index.d.ts","author":"","engines":{"node":">=20.0.0"},"gitHead":"f5acb60907ec1bf1e26dd31a6d3cbf8b65b62cae","license":"MIT","scripts":{"lint":"eslint .","test":"vitest run","build":"tsup src/stdio.ts src/index.ts --format esm --dts --clean","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","prepublishOnly":"pnpm run test && pnpm run build","typecheck:tests":"tsc -p tsconfig.test.json","capture:fixtures":"tsx scripts/capture-fixtures.ts"},"version":"0.2.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:40054a98-00da-44d0-a21f-54d527a22319"}},"homepage":"https://github.com/anseta-labs/mcp#readme","keywords":["mcp","staking","anseta","blockchain"],"repository":{"url":"git+https://github.com/anseta-labs/mcp.git","type":"git"},"_npmVersion":"12.0.2","description":"MCP server exposing the Anseta staking API as 22 curated tools","directories":{},"maintainers":[{"name":"dvisacker","email":"davidvanisacker@gmail.com"}],"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","@anseta/typescript-sdk":"^0.2.0","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.30.3","devDependencies":{"tsx":"^4.23.12","tsup":"^8.5.1","eslint":"^9.39.5","vitest":"^4.1.11","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.3.0","typescript-eslint":"^8.68.0","@stylistic/eslint-plugin":"^5.10.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp_0.2.1_1788336746467_0.9421199358501526"}}},"time":{"created":"2026-08-31T09:25:04.150Z","modified":"2026-09-02T08:12:26.968Z","0.2.0":"2026-08-31T09:25:04.536Z","0.2.1":"2026-09-02T08:12:26.562Z"},"bugs":{"url":"https://github.com/anseta-labs/mcp/issues"},"license":"MIT","homepage":"https://github.com/anseta-labs/mcp#readme","keywords":["mcp","staking","anseta","blockchain"],"repository":{"url":"git+https://github.com/anseta-labs/mcp.git","type":"git"},"description":"MCP server exposing the Anseta staking API as 22 curated tools","maintainers":[{"name":"dvisacker","email":"davidvanisacker@gmail.com"}],"readme":"# @anseta/mcp\n\n[![ci](https://github.com/anseta-labs/mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/anseta-labs/mcp/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/@anseta/mcp.svg)](https://www.npmjs.com/package/@anseta/mcp)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\nAn MCP server that exposes the [Anseta](https://anseta.com) staking API to AI agents as 22 tools:\ndiscovery of networks, tokens, validators and entities; staking and EigenLayer restaking positions\nand reward history; and construction of unsigned staking and restaking transactions.\n\n**It never holds a key and never broadcasts.** The eight `build_*_tx` tools return unsigned\ntransaction objects for the user to review and sign in their own wallet. Nothing this server does\nmoves funds.\n\n## Install\n\nRequires Node 20 or newer and an Anseta API key.\n\n### Claude Code\n\n```bash\nclaude mcp add anseta --env ANSETA_API_KEY=your-key -- npx -y @anseta/mcp\n```\n\n### Claude Desktop / Cursor\n\nAdd to `claude_desktop_config.json` or `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"anseta\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@anseta/mcp\"],\n      \"env\": { \"ANSETA_API_KEY\": \"your-key\" }\n    }\n  }\n}\n```\n\nTo point at a non-default host, add `\"ANSETA_BASE_URL\": \"https://…\"` to the same `env` block. The\ndefault is `https://preview.api.stakefi.network`. Give the bare host: the client adds the `/v1`\nprefix itself, and a base URL that still ends in `/v1` is accepted for compatibility with older\nconfigs.\n\n## Tools\n\n| Tool | What it does |\n|---|---|\n| `list_networks` | Supported networks with type, native token, chain ID, explorer |\n| `list_tokens` | Stakeable tokens with **decimals** — needed to build any amount |\n| `list_staking_options` | Which network/token pairs are LIVE or PLANNED |\n| `list_entities` | Validator organizations behind one or more validators |\n| `list_validators` | Validators associated with your organization, with commission and status |\n| `get_stakes` | A wallet's positions with one specific validator |\n| `get_delegation_history` | Delegation and undelegation events for a validator |\n| `get_reward_history` | On-chain reward-claim transactions for a validator |\n| `get_daily_rewards` | Daily accrual, split into delegator share and commission |\n| `build_stake_tx` | Unsigned transactions that delegate to a validator |\n| `build_unstake_tx` | Unsigned transactions that **begin** unbonding |\n| `build_withdraw_tx` | Unsigned transactions that **claim** finished unbonding or rewards |\n\nA validator appearing in `list_validators` is one associated with your organization. That is not a\nstatement that you can stake to it: whether staking is available depends on the individual validator\nand its network, and the `build_*_tx` tools accept only the networks and tokens their own schemas\nlist. The same holds for `list_operators` — check `publicDelegationEnabled` on the row.\n\n`build_unstake_tx` and `build_withdraw_tx` are two distinct lifecycle steps. Unstaking starts the\nunbonding period; it does not return tokens to the wallet. Withdrawing claims what has finished\nunbonding.\n\n### Restaking (EigenLayer)\n\nRestaking is a separate surface with its own operators, positions and lifecycle. It runs on\nEthereum only (`ethereum`, `ethereum-hoodi-testnet`) and covers `EIGEN`, `BEIGEN`, `STETH`, `CBETH`\nand `RETH`.\n\n| Tool | What it does |\n|---|---|\n| `list_operators` | EigenLayer operators known to Anseta, with protocol, status and commission |\n| `get_restaking_stakes` | A wallet's restaked positions with one operator, and withdrawal status |\n| `get_restaking_delegation_history` | Delegate and undelegate events for an operator |\n| `get_restaking_reward_history` | On-chain reward-claim transactions for an operator |\n| `get_restaking_daily_rewards` | Daily accrual, split into delegator share and commission |\n| `build_restaking_deposit_tx` | Unsigned approve + depositIntoStrategy transactions |\n| `build_restaking_delegate_tx` | Unsigned transactions that delegate the deposit to an operator |\n| `build_restaking_unstake_tx` | Unsigned transactions that queue a **partial** withdrawal |\n| `build_restaking_undelegate_tx` | Unsigned transactions that queue **everything** and undelegate |\n| `build_restaking_withdraw_tx` | Unsigned transactions that **complete** a matured withdrawal |\n\nThe restaking lifecycle is four steps, and skipping one silently does nothing:\n\n```\ndeposit  ->  delegate  ->  unstake (part, stays delegated)  ->  withdraw\n                       \\-> undelegate (all, ends delegation) -/\n                                    ~7 days on mainnet\n```\n\n`build_restaking_unstake_tx` withdraws a chosen amount of one token and keeps the delegation.\n`build_restaking_undelegate_tx` is all-or-nothing: it queues every restaked asset and ends the\ndelegation. Both only *queue* a withdrawal — `build_restaking_withdraw_tx` completes it once the\ndelay has passed, and `get_restaking_stakes` reports the completion date.\n\n## Amounts are base units\n\nEvery `amount` argument is a **string in the token's base denomination**, never a decimal token\nvalue:\n\n| Token | Decimals | 1 token as an amount |\n|---|---|---|\n| SOL | 9 | `\"1000000000\"` |\n| POL | 18 | `\"1000000000000000000\"` |\n| MANTRA | 6 | `\"1000000\"` |\n\nCall `list_tokens` for a token's `decimals`. The server rejects a non-integer amount before it\nreaches the API, and every successful `build_*_tx` result echoes the decoded human-readable amount\nnext to the transaction so a wrong value is visible without decoding hex.\n\nNote that Polygon staking is addressed as `network: \"ethereum\"` with `token: \"POL\"`, because the POL\nvalidator contracts are deployed on Ethereum L1.\n\n## Getting an API key\n\nRequest one through your Anseta account contact. The key is sent as an `x-api-key` header; this\nserver never puts it in a query string.\n\n## Development\n\n```bash\npnpm install\npnpm test           # vitest, no network access — every test injects a stub fetch\npnpm exec tsc --noEmit\npnpm lint           # eslint; pnpm lint:fix applies the autofixable rules\npnpm build          # tsup -> dist/\n```\n\nResponse fixtures under `tests/fixtures/` are currently derived from the upstream schemas rather\nthan captured from a live host; see `tests/fixtures/FIELDS.md`. With a staging key:\n\n```bash\nANSETA_API_KEY=<key> ANSETA_BASE_URL=https://staging-api.stakefi.network pnpm capture:fixtures\n```\n\n`spec/developer_api.json` is a read-only copy of the Anseta OpenAPI spec, kept as reference for the\ntool schemas. Nothing imports it at runtime.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}