Penumbra MCP Server
Penumbra MCP Server
An MCP server providing tools for interacting with the Penumbra blockchain. This server enables privacy-preserving interactions with Penumbra's core features including transaction queries, validator set information, DEX state, and governance proposals.
Features
Current Tools
get_validator_set
: Get the current validator set informationget_chain_status
: Get current chain status including block height and chain IDget_transaction
: Get details of a specific transactionget_dex_state
: Get current DEX state including latest batch auction resultsget_governance_proposals
: Get active governance proposals
Planned Features
- Transaction submission
- Private staking operations
- DEX trading (sealed-bid batch auctions)
- Private governance voting
- Liquidity position management
Installation
You can install the package via npm:
Or using yarn:
Setup
Local Development from Source
- Install dependencies:
- Build the server:
- Run in development mode:
Claude Desktop Integration
To integrate with Claude desktop, add the following configuration to your Claude desktop settings file (~/Library/Application Support/Claude/claude_desktop_config.json
):
Replace /path/to/penumbra-mcp
with the actual path where you've installed the server.
Using the MCP Server
Once configured, you can interact with Penumbra through Claude using the following tools:
- Query validator set:
- Check chain status:
- Get transaction details:
- View DEX state:
- List governance proposals:
Development
npm run watch
: Watch mode for developmentnpm run inspector
: Run MCP inspector for testingnpm test
: Run test suite
Environment Variables
Node Configuration
PENUMBRA_NODE_URL
: URL of the Penumbra node (default: https://rpc.penumbra.zone)PENUMBRA_REQUEST_TIMEOUT
: HTTP request timeout in milliseconds (default: 30000)PENUMBRA_REQUEST_RETRIES
: Number of request retries (default: 5)
Chain Configuration
PENUMBRA_NETWORK
: Network to connect to (default: mainnet)PENUMBRA_CHAIN_ID
: Chain ID (default: penumbra-1)PENUMBRA_BLOCK_TIME
: Block time in milliseconds (default: 6000)PENUMBRA_EPOCH_DURATION
: Number of blocks per epoch (default: 100)
DEX Configuration
PENUMBRA_DEX_BATCH_INTERVAL
: Batch auction interval in milliseconds (default: 60000)PENUMBRA_DEX_MIN_LIQUIDITY
: Minimum liquidity amount (default: 1000)PENUMBRA_DEX_MAX_PRICE_IMPACT
: Maximum price impact as decimal (default: 0.05)
Governance Configuration
PENUMBRA_GOVERNANCE_VOTING_PERIOD
: Voting period duration in milliseconds (default: 1209600000 - 14 days)PENUMBRA_GOVERNANCE_MIN_DEPOSIT
: Minimum proposal deposit amount (default: 100000)
Architecture
The server is built using TypeScript and implements the Model Context Protocol (MCP) for standardized tool interfaces. It currently provides mock implementations for core functionality, with plans to integrate directly with Penumbra's client libraries and node API endpoints.
Privacy Considerations
All interactions respect Penumbra's privacy-preserving design:
- Shielded transactions
- Private staking operations
- Sealed-bid batch auctions
- Anonymous governance voting
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
ISC
Enables privacy-preserving interactions with the Penumbra blockchain, offering tools for transaction queries, validator set information, DEX state, and governance proposals.