{"_id":"@drparadox05/lido-mcp-server","name":"@drparadox05/lido-mcp-server","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@drparadox05/lido-mcp-server","version":"0.1.0","type":"module","publishConfig":{"access":"public"},"description":"MCP server for Lido staking, wrapping, governance, and Uniswap-powered swaps/bridges with safety-first design.","main":"dist/index.js","bin":{"lido-mcp-server":"dist/index.js"},"keywords":["mcp","lido","ethereum","staking","defi","uniswap","bridge","cursor","claude"],"author":"","license":"MIT","repository":{"type":"git","url":"git+https://github.com/drparadox05/Lido-MCP-Server.git"},"bugs":{"url":"https://github.com/drparadox05/Lido-MCP-Server/issues"},"homepage":"https://github.com/drparadox05/Lido-MCP-Server#readme","engines":{"node":">=21"},"scripts":{"build":"tsc -p tsconfig.json","dev":"tsx src/index.ts","start":"node dist/index.js","prepublishOnly":"npm run build"},"dependencies":{"@modelcontextprotocol/sdk":"1.27.1","viem":"2.47.6","zod":"4.3.6"},"devDependencies":{"@types/node":"22.12.0","tsx":"4.21.0","typescript":"5.9.3"},"gitHead":"1b781c6241c81183d7d1fe2a8b61c03b0659016f","_id":"@drparadox05/lido-mcp-server@0.1.0","_nodeVersion":"22.16.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-lmo68iFWDWK2L8r/SO4ML3Z4NpocJRUvst9E5ko/yTPHL2BMBx34n4hYJYf6gjobgMDbkSx050X6buM0W4I+Ig==","shasum":"80939f24fa4f0ef11db5205dd2d6410cb2e54986","tarball":"https://registry.npmjs.org/@drparadox05/lido-mcp-server/-/lido-mcp-server-0.1.0.tgz","fileCount":28,"unpackedSize":153883,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCaj4ymWPlQA0AmTyedFTQLaI5JJMbeq55o5/le9tZ7xgIge+sNypptseae3GiWWmRdp5xVNK778VcgoMGE5zKM6Fg="}]},"_npmUser":{"name":"drparadox05","email":"deepakshah9016@gmail.com"},"directories":{},"maintainers":[{"name":"drparadox05","email":"deepakshah9016@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lido-mcp-server_0.1.0_1774245931465_0.21830617533442775"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-23T06:05:31.407Z","0.1.0":"2026-03-23T06:05:31.672Z","modified":"2026-03-23T06:05:31.837Z"},"maintainers":[{"name":"drparadox05","email":"deepakshah9016@gmail.com"}],"description":"MCP server for Lido staking, wrapping, governance, and Uniswap-powered swaps/bridges with safety-first design.","homepage":"https://github.com/drparadox05/Lido-MCP-Server#readme","keywords":["mcp","lido","ethereum","staking","defi","uniswap","bridge","cursor","claude"],"repository":{"type":"git","url":"git+https://github.com/drparadox05/Lido-MCP-Server.git"},"bugs":{"url":"https://github.com/drparadox05/Lido-MCP-Server/issues"},"license":"MIT","readme":" # Lido MCP Server\n\n A reference MCP server for Lido that exposes real on-chain tools for:\n\n- staking ETH into `stETH`\n- wrapping and unwrapping `stETH` and `wstETH`\n- requesting and claiming withdrawals through the Lido withdrawal queue\n- balance and reward-aware position queries\n- Lido DAO governance proposal queries and voting\n- Uniswap-powered swaps and cross-chain bridge routing with approval-aware preflight and dry-run execution\n- agent-friendly discovery and mental-model guidance for safe tool selection\n\nThe server uses direct contract calls through `viem`.\nIt is not a REST wrapper.\nAll write tools support `dry_run` and default to `true`.\n\n## Installation & usage\n\n**For users:** See [USER_GUIDE.md](USER_GUIDE.md) for complete setup instructions.\n\n**Quick start:**\n\nYou don't need to manually install anything. Just add this to your MCP client config (Cursor, Claude Desktop, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"lido\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"lido-mcp-server\"],\n      \"env\": {\n        \"LIDO_PRIVATE_KEY\": \"0x...\",\n        \"ETHEREUM_RPC_URL\": \"https://eth-mainnet.g.alchemy.com/v2/...\",\n        \"UNISWAP_API_KEY\": \"...\"\n      }\n    }\n  }\n}\n```\n\n> [!TIP]\n> **Important:** To get the best out of this server, feed the `lido.skill.md` file to your AI agent (in custom instructions or workspace rules). This ensures the agent understands Lido's rebasing mechanics and safety patterns.\n\n**Configuration templates:**\n- [Example Config](mcp.config.example.json) - Standard configuration example\n\n## Project structure\n\n```text\nsrc/\n  config/\n    env.ts\n  lido/\n    abis.ts\n    advisor.ts\n    account.ts\n    clients.ts\n    governance.ts\n    index.ts\n    networks.ts\n    rewards.ts\n    setup.ts\n    staking.ts\n    types.ts\n    utils.ts\n    withdrawals.ts\n  server/\n    createServer.ts\n    index.ts\n  shared/\n    mcp.ts\n  uniswap/\n    api.ts\n    index.ts\n    tokens.ts\n    types.ts\n  index.ts\n```\n\nThe repo is structured so contract metadata, runtime configuration, chain clients, business logic, and MCP transport wiring are separated.\nSensitive environment access is centralized in `src/config/env.ts` instead of being scattered across the codebase.\n\n ## Supported networks\n\n - `ethereum`\n - `base`\n - `optimism`\n - `arbitrum`\n\n Core staking, withdrawal queue actions, wrapping, and governance execute on `ethereum`.\n L2 networks are supported for balance-aware reads of bridged Lido assets.\n\n ## Implemented MCP tools\n\n - `lido_get_setup`\n - `lido_get_agent_guide`\n - `lido_get_account_overview`\n - `lido_get_portfolio_summary`\n - `lido_preflight_write_action`\n - `lido_get_rewards`\n - `lido_stake_eth`\n - `lido_wrap_steth`\n - `lido_unwrap_wsteth`\n - `lido_request_unstake`\n - `lido_get_withdrawal_requests`\n - `lido_claim_withdrawals`\n - `lido_get_governance_proposals`\n - `lido_vote_on_proposal`\n - `lido_execute_proposal`\n - `lido_preflight_uniswap_route`\n - `lido_execute_uniswap_route`\n - `lido_get_uniswap_route_status`\n - `lido_get_uniswap_bridgable_tokens`\n\n ## Quick start\n\n ### 1. Install dependencies\n\n ```bash\n npm install\n ```\n\n### 2. Configure environment\n\nCopy `.env.example` to `.env` or export variables in your shell.\n\nRequired for writes:\n\n- `LIDO_PRIVATE_KEY`\n- `ETHEREUM_RPC_URL`\n\nUseful variables:\n\n- `ETHEREUM_RPC_URL`\n- `BASE_RPC_URL`\n- `OPTIMISM_RPC_URL`\n- `ARBITRUM_RPC_URL`\n\nRequired for Uniswap-powered route discovery and execution:\n\n- `UNISWAP_API_KEY`\n\nOptional for Uniswap route generation:\n\n- `UNISWAP_UNIVERSAL_ROUTER_VERSION`\n\n### 3. Build\n\n```bash\nnpm run build\n```\n\n### 4. Run over stdio\n\n```bash\nnpm start\n```\n\nFor local development:\n\n```bash\nnpm run dev\n```\n\n## Judge and developer quick prompts\n\nUse these prompts directly in Cursor or Claude after connecting the MCP server:\n\n```text\nShow my Lido MCP setup status.\nShow the Lido agent guide for staking.\nShow my aggregated Lido portfolio summary.\nShow bridgable destinations for wstETH on Ethereum.\nPreflight a Uniswap route from ETH on Ethereum into wstETH on Base.\nDry run a Uniswap route from wstETH on Base into native ETH on Base.\nPreflight staking 0.01 ETH on Ethereum.\nPreflight wrapping 0.1 stETH into wstETH on Ethereum.\nDry run wrapping 0.1 stETH into wstETH on Ethereum.\nShow my withdrawal requests and claimable ETH on Ethereum.\nShow the 5 most recent Lido governance proposals.\n```\n\nA fuller walkthrough lives in `DEMO.md`.\n\n## Cursor or Claude MCP configuration\n\nUse a stdio MCP entry that launches the server from this repo.\n\nExample:\n\n```json\n{\n  \"mcpServers\": {\n    \"lido\": {\n      \"command\": \"node\",\n      \"args\": [\"/home/drparadox/synthesis_hack/dist/index.js\"],\n      \"env\": {\n        \"LIDO_PRIVATE_KEY\": \"0x...\",\n        \"ETHEREUM_RPC_URL\": \"https://eth-mainnet.your-rpc.example\",\n        \"BASE_RPC_URL\": \"https://mainnet.base.org\",\n        \"OPTIMISM_RPC_URL\": \"https://mainnet.optimism.io\",\n        \"ARBITRUM_RPC_URL\": \"https://arb1.arbitrum.io/rpc\",\n        \"UNISWAP_API_KEY\": \"your-uniswap-api-key\"\n      }\n    }\n  }\n}\n```\n\nIf you prefer running TypeScript directly during development, point the MCP client at `tsx` and `/home/drparadox/synthesis_hack/src/index.ts` instead.\n\n## Safety model\n\n- All write tools default to `dry_run=true`\n- `lido_get_setup` returns recommended first tools, safety defaults, quickstart prompts, and Uniswap API readiness metadata\n- `lido_get_agent_guide` returns the Lido mental model, network boundaries, workflow guidance, and topic-specific tool recommendations\n- `lido_preflight_write_action` can validate the path before a Lido-core write is even dry-run\n- `lido_preflight_uniswap_route` checks approval requirements, route type, and execution compatibility before a Uniswap swap or bridge is attempted\n- `lido_execute_uniswap_route` defaults to `dry_run=true` and uses a direct approval-then-swap flow with `x-permit2-disabled=true`\n- `lido_get_uniswap_route_status` can track the source-chain transaction status for swap and bridge routes after submission\n- Approval-dependent flows report when an approval is required before the main action can execute\n- Withdrawal requests are treated as queue entries, not instant ETH exits\n- Governance writes require the configured wallet to be eligible to act\n\n## Notes on rewards\n\nLido rewards are not a simple claimable bucket.\n\n- `stETH` rewards appear through rebasing balances\n- `wstETH` rewards appear through an increasing conversion rate to `stETH`\n\nThe `lido_get_rewards` tool can return current reward context or a net on-chain balance delta since a historical block.\nThat historical delta should only be interpreted as pure staking rewards when the address had no transfers in or out during the interval.\n\n## Notes on unstaking\n\nUnstaking on Lido is a two-phase path:\n\n- request withdrawal from `stETH` or `wstETH`\n- wait for queue finalization and then claim ETH\n\nThe server exposes both phases separately.\n\n## Skill file\n\nThe repo includes `lido.skill.md`, which gives an agent the correct mental model for:\n\n- rebasing `stETH`\n- non-rebasing `wstETH`\n- L2 vs Ethereum responsibilities\n- safe approval and queue usage\n- governance caution\n","readmeFilename":"README.md","_rev":"1-0fcf621b6d756de77e9ae1080a33b3a5"}