MyronKoch-dev/mcp-osmosis
If you are the rightful owner of mcp-osmosis and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Osmosis MCP Server is a comprehensive Model Context Protocol server designed for interacting with the Osmosis blockchain, offering a wide range of tools for blockchain queries, DeFi operations, smart contract interactions, and more.
get-blockchain-status
Get current blockchain status
get-account-balance
Get token balances for an address
get-epochs
Get epoch information
get-transaction
Get transaction details by hash
get-latest-blocks
Get recent block information
Osmosis MCP Server
A comprehensive MCP (Model Context Protocol) server for interacting with the Osmosis blockchain. This server provides AI assistants with 158 tools covering every aspect of the Osmosis ecosystem, from basic blockchain queries to advanced DeFi operations, smart contract interactions, wallet management, direct transaction execution, and testnet utilities.
Features
Core Blockchain Operations
- Query blockchain status, blocks, and transactions
- Get account balances and token information
- Retrieve chain parameters and module accounts
- Monitor epochs and network state
Liquidity Pools & Trading
- Query all pool types (Balancer, Stableswap, Concentrated Liquidity)
- Get pool information, liquidity, fees, and APR
- Estimate swaps and prepare trading transactions
- Access historical price data and trading records
Concentrated Liquidity (CL)
- Manage CL positions and liquidity ranges
- Convert between prices and ticks
- Query pool incentives and fee growth
- Prepare position creation and management transactions
Staking & Governance
- Query validators, delegations, and rewards
- Prepare staking, unstaking, and redelegation transactions
- Access governance proposals, votes, and tallies
- Get staking parameters and commission rates
DeFi & Advanced Features
- Time-Weighted Average Price (TWAP) calculations
- Token lockups and superfluid staking
- IBC denomination tracing
- MEV/arbitrage tracking via ProtoRev
Smart Contracts (CosmWasm)
- Query and execute smart contracts
- Get contract information and history
- Prepare contract instantiation and migration
- Estimate gas fees for contract operations
Token Factory
- Create custom tokens with metadata
- Mint and burn token factory denominations
- Manage token administration and parameters
Specialized Features
- Downtime detection and validator preferences
- IBC rate limiting and fee token management
๐ NEW: Direct Transaction Execution (37 Tools)
- Bank Operations: Send tokens, multi-send transactions
- Governance: Submit proposals, vote, deposit on proposals
- Lockup & Incentives: Lock tokens, claim rewards, create gauges
- IBC Transfers: Cross-chain token transfers
- Superfluid Staking: Liquid staking with LP tokens
- Pool Operations: Create pools, advanced swaps
- Token Factory: Create custom tokens, mint/burn
- Module Administration: Parameter updates, upgrades
๐ Wallet Management (6 Tools)
- Generate new Osmosis wallets with BIP-39 mnemonics
- Restore wallets from seed phrases
- Validate addresses and mnemonics
- Derive addresses from public keys
๐งช NEW: Testnet Utilities (3 Tools)
- Check Network Status: Verify if on testnet/mainnet with safety warnings
- Get Testnet Tokens: Complete guide to faucets and token sources
- Testnet Faucet: Direct integration with Osmosis testnet faucet
- Pool incentives and superfluid parameters
Installation
# Clone the repository
git clone https://github.com/yourusername/osmosis-mcp-server.git
cd osmosis-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
Usage
Running the Server
# Start the server
npm start
# Or run with the MCP inspector (for testing)
npm run inspect
Configuring in Claude Desktop
- Open Claude Desktop
- Go to Settings
- Navigate to the MCP section
- Add a new server with the following configuration:
- Name: Osmosis Blockchain Server
- Command: path/to/osmosis-mcp-server/build/index.js
Available Tools
The server exposes 158 tools organized into 12 categories:
๐ Blockchain Tools (9 tools)
get-blockchain-status
- Get current blockchain statusget-account-balance
- Get token balances for an addressget-epochs
- Get epoch informationget-transaction
- Get transaction details by hashget-latest-blocks
- Get recent block informationget-token-info
- Get token metadataget-supply
- Get token supply informationget-chain-params
- Get chain parametersget-module-accounts
- Get module account information
๐ Pool Tools (18 tools)
get-pool-info
- Get pool informationget-all-pools
- Get all liquidity poolsget-pool-spot-price
- Get current spot priceestimate-swap
- Estimate swap resultsget-incentivized-pools
- Get pools with incentivesget-pool-incentives
- Get pool incentive informationget-pool-type
- Get pool type (balancer/stableswap/CL)get-historical-prices
- Get historical price dataprepare-swap-transaction
- Prepare swap transactionget-pool-total-shares
- Get total LP sharesget-pool-liquidity
- Get pool liquidity detailsget-pool-swap-fee
- Get pool swap feesget-pool-exit-fee
- Get pool exit feesget-pool-join-exit-records
- Get join/exit historyget-pool-total-value-locked
- Get pool TVLprepare-join-pool
- Prepare join pool transactionprepare-exit-pool
- Prepare exit pool transactionget-pool-apr
- Get pool APR
๐ฏ Concentrated Liquidity Tools (15 tools)
get-cl-pools
- Get all CL poolsget-cl-positions
- Get CL positions for addressget-cl-position
- Get specific CL position detailsget-cl-positions-by-pool
- Get all positions in a poolget-cl-user-positions
- Get user's CL positionsprice-to-tick
- Convert price to ticktick-to-price
- Convert tick to priceget-cl-pool-incentives
- Get CL pool incentivesget-cl-pool-liquidity
- Get CL pool liquidityget-cl-pool-tick-data
- Get tick spacing and current tickget-cl-pool-fee-growth
- Get fee growth statisticsprepare-cl-create-position
- Prepare create position transactionprepare-cl-add-liquidity
- Prepare add liquidity transactionprepare-cl-remove-liquidity
- Prepare remove liquidity transactionget-cl-swap-estimates
- Get CL-specific swap estimates
๐ฅฉ Staking Tools (15 tools)
get-validators
- Get validator informationget-delegations
- Get delegations for addressget-staking-rewards
- Get pending staking rewardsget-unbonding-delegations
- Get unbonding delegationsget-validator-delegations
- Get all delegations to validatorget-validator-unbonding-delegations
- Get validator unbonding delegationsget-validator-commission
- Get validator commissionget-validator-self-delegation
- Get validator self-delegationprepare-delegate
- Prepare delegation transactionprepare-undelegate
- Prepare undelegation transactionprepare-redelegate
- Prepare redelegation transactionprepare-claim-rewards
- Prepare claim rewards transactionget-staking-params
- Get staking parametersget-slashing-params
- Get slashing parametersget-distribution-params
- Get distribution parameters
๐ณ๏ธ Governance Tools (4 tools)
get-proposals
- Get governance proposalsget-proposal-details
- Get proposal detailsget-proposal-votes
- Get proposal votesget-proposal-tally
- Get proposal vote tally
๐ฐ DeFi Tools (5 tools)
get-twap
- Get Time-Weighted Average Priceget-lockups
- Get token lockup informationget-superfluid-assets
- Get superfluid staking assetsget-denoms-by-creator
- Get token factory denoms by creatorget-ibc-denom-trace
- Get IBC token source information
๐ CosmWasm Tools (20 tools)
get-wasm-codes
- Get all uploaded WASM codesget-wasm-code-info
- Get WASM code informationget-contracts-by-code
- Get contracts by code IDget-contract-info
- Get contract metadataquery-contract-state
- Query contract stateget-contract-history
- Get contract migration historyprepare-instantiate-contract
- Prepare contract instantiationprepare-execute-contract
- Prepare contract executionprepare-migrate-contract
- Prepare contract migrationget-contract-code-id
- Get contract code IDget-contract-admin
- Get contract adminget-contract-label
- Get contract labelquery-contract-raw
- Query raw contract storageget-pinned-codes
- Get pinned code IDsget-code-metadata
- Get code metadatavalidate-contract-address
- Validate contract addressestimate-instantiate-fee
- Estimate instantiation gasestimate-execute-fee
- Estimate execution gasget-contract-ibc-port
- Get contract IBC portget-contract-events
- Get contract events
๐ญ Token Factory Tools (10 tools)
get-token-factory-denoms
- Get all token factory denomsget-token-factory-denom-info
- Get token factory denom metadataget-token-factory-creator
- Get token creator addressprepare-create-token-factory-denom
- Prepare create token transactionprepare-mint-token-factory-tokens
- Prepare mint tokens transactionprepare-burn-token-factory-tokens
- Prepare burn tokens transactionprepare-change-token-factory-admin
- Prepare change admin transactionget-token-factory-params
- Get token factory parametersvalidate-token-factory-denom
- Validate token factory denomget-token-factory-total-supply
- Get token total supply
โก ProtoRev Tools (8 tools)
get-protorev-profits-by-denom
- Get MEV profits by denominationget-protorev-profits-by-tx
- Get MEV profits by transactionget-protorev-statistics
- Get overall MEV statisticsget-protorev-number-of-trades
- Get ProtoRev trade countget-protorev-enabled
- Check if ProtoRev is enabledget-protorev-developer-account
- Get developer accountget-protorev-max-pool-points
- Get max pool points per txget-protorev-pool-weights
- Get pool weight configuration
๐ง Specialized Tools (11 tools)
get-downtime-detector-params
- Get downtime detector parametersget-downtime-status
- Get current downtime statusget-validator-set-preference
- Get validator set preferencesget-ibc-rate-limits
- Get IBC rate limiting infoget-mint-params
- Get token minting parametersget-epoch-provisions
- Get current epoch provisionsget-all-locks-by-type
- Get locks by typeget-synthetic-locks-by-lock-id
- Get synthetic lock detailsget-fee-tokens
- Get accepted fee tokensget-pool-incentives-params
- Get pool incentives parametersget-superfluid-params
- Get superfluid parameters
๐ Wallet Management Tools (6 tools)
generate-wallet
- Generate new Osmosis wallet with mnemonicrestore-wallet-from-mnemonic
- Restore wallet from seed phraseget-wallet-address
- Get address from mnemonicvalidate-mnemonic
- Validate BIP-39 mnemonic phrasevalidate-address
- Validate Osmosis address formatderive-address-from-pubkey
- Derive address from public key
๐ Execution Tools (37 tools) - NEW!
Bank Operations (3 tools)
send
- Send tokens to another addressmulti-send
- Send tokens to multiple addressesset-send-enabled
- Enable/disable sending for token types
Governance Operations (4 tools)
submit-proposal
- Submit governance proposalvote-proposal
- Vote on governance proposaldeposit-proposal
- Deposit tokens to proposalclaim-community-pool
- Claim community pool rewards
Lockup & Incentive Operations (6 tools)
lock-tokens
- Lock tokens for incentive rewardsbegin-unlocking
- Start unlocking specific locked tokensbegin-unlocking-all
- Start unlocking all locked tokensunlock-period-lock
- Unlock completed period locksclaim-incentives
- Claim available incentive rewardscreate-gauge
- Create new incentive gauge
IBC Operations (4 tools)
ibc-transfer
- Transfer tokens across chainstimeout-packet
- Handle IBC packet timeoutsacknowledge-packet
- Acknowledge IBC packetsupdate-client
- Update IBC light clients
Advanced Pool Operations (8 tools)
create-pool
- Create new liquidity poolsjoin-swap-extern-amount-in
- Advanced join-swap operationsjoin-swap-share-amount-out
- Join-swap with share outputexit-swap-extern-amount-out
- Advanced exit-swap operationsexit-swap-share-amount-in
- Exit-swap with share inputcreate-cosmwasm-pool
- Create CosmWasm-based poolsstable-swap
- Perform stable asset swapsset-pool-weights
- Adjust pool weights
Superfluid Staking Operations (4 tools)
superfluid-delegate
- Delegate LP tokens via Superfluidsuperfluid-undelegate
- Undelegate Superfluid tokenslock-and-superfluid-delegate
- Lock and delegate in one txunlock-and-migrate-superfluid-tokens
- Unlock and migrate
Token Factory Advanced Operations (3 tools)
set-token-metadata
- Set custom token metadataforce-transfer
- Admin force transfer tokensset-before-send-hook
- Set token transfer hooks
Module Administration (5 tools)
update-params
- Update module parametersupgrade-proposal
- Submit software upgrade proposalcancel-upgrade
- Cancel pending upgradeset-withdrawal-address
- Set reward withdrawal addressfund-community-pool
- Fund community pool
Example Interactions
Basic Blockchain Queries
Ask Claude:
What's the current status of the Osmosis blockchain?
Can you tell me about the OSMO token on Osmosis?
What's the balance of osmosis1abc...xyz?
Pool and Trading Operations
Show me information about pool #1
I want to swap 10 OSMO for ATOM. Can you estimate how much ATOM I would get?
What pools have the highest APR right now?
Help me prepare a transaction to join pool #678 with 100 OSMO and 50 ATOM
Concentrated Liquidity Management
Show me all my concentrated liquidity positions for address osmosis1...
Convert a price of 1.25 ATOM/OSMO to tick format for pool #1066
Help me create a new CL position in the OSMO/USDC pool with a price range of $0.8 to $1.2
Staking and Governance
Show me all active validators and their commission rates
What are my pending staking rewards for osmosis1...?
What governance proposals are currently active?
Prepare a transaction to delegate 100 OSMO to validator osmovaloper1...
Smart Contract Interactions
Show me all smart contracts deployed with code ID 123
Query the state of contract osmosis14... with message {"get_config": {}}
Help me prepare a transaction to execute contract osmosis14... with the "swap" function
Token Factory Operations
Show me all custom tokens created by address osmosis1...
Help me create a new token called "MyToken" with symbol "MTK"
Prepare a transaction to mint 1000 MTK tokens to address osmosis1...
Advanced Analytics
What are the current ProtoRev MEV profits for OSMO?
Show me the time-weighted average price for OSMO/ATOM over the last 24 hours
What's the total value locked in pool #1?
๐ NEW: Direct Transaction Execution
Generate a new Osmosis wallet for me
Send 10 OSMO from my wallet to osmosis1abc...xyz using my mnemonic phrase
Vote 'yes' on governance proposal #42 using my wallet
Lock 100 OSMO for 14 days to earn incentive rewards
Create an IBC transfer of 50 ATOM to the Cosmos Hub
Submit a text governance proposal titled "Improve Pool Incentives"
Security Notes
โ ๏ธ UPDATED SECURITY MODEL:
- Default Network: TESTNET (for safety during execution tools testing)
- Execution Tools: Can sign and broadcast transactions directly using provided mnemonics
- Query Tools: Read-only operations, no private key handling
- Production Use: Set
OSMOSIS_NETWORK=mainnet
environment variable for mainnet - Mnemonic Handling: Mnemonics are processed in-memory only, never stored
- Testnet First: Always test with testnet before using mainnet funds
Development
# Run in development mode with auto-reloading
npm run dev
# Test with the MCP inspector
npm run inspect
# Run all tests
npm run test
# Validate everything works
npm run validate
Tool Categories Summary
Category | Count | Description |
---|---|---|
๐ Blockchain | 9 | Core blockchain operations and queries |
๐ Pools | 18 | Liquidity pool management and trading |
๐ฏ Concentrated Liquidity | 15 | Advanced CL position management |
๐ฅฉ Staking | 15 | Validator operations and delegation |
๐ณ๏ธ Governance | 4 | Proposal voting and governance |
๐ฐ DeFi | 5 | Advanced DeFi features and analytics |
๐ CosmWasm | 20 | Smart contract interactions |
๐ญ Token Factory | 10 | Custom token creation and management |
โก ProtoRev | 8 | MEV and arbitrage tracking |
๐ง Specialized | 11 | Advanced module features |
๐ Wallet | 6 | Wallet generation and management |
๐ Execution | 37 | Direct transaction execution |
Total | 158 | Complete Osmosis ecosystem coverage |
Architecture
The server is built with:
- TypeScript for type safety
- @modelcontextprotocol/sdk for MCP protocol implementation
- @cosmjs/stargate for Cosmos SDK interactions
- osmojs for Osmosis-specific operations
- axios for HTTP API calls
- zod for input validation
Each tool category is modular and can be used independently, making the server highly maintainable and extensible.
License
MIT