Tairon-ai/scrt-network-mcp
If you are the rightful owner of scrt-network-mcp 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.
The SCRT Network MCP Server v0.1 is a production-ready server designed for seamless integration with the Secret Network blockchain, offering privacy-preserving smart contract interactions and comprehensive blockchain operations.
đ SCRT Network MCP Server v0.1
Production-ready Model Context Protocol (MCP) server for Secret Network blockchain integration
Features âĸ Quick Start âĸ Tools âĸ Examples âĸ Prompts âĸ Security
đ Features
đ Secret Network Integration
- Full Secret Network API integration with LCD and RPC endpoints
- Privacy-preserving smart contract interactions with encrypted inputs/outputs
- IBC (Inter-Blockchain Communication) support for cross-chain transfers
- Real-time blockchain data access and monitoring
- Validator information and staking operations
- Governance proposal tracking and voting
- Dual operation modes - read-only without keys, full transaction signing with wallet configuration
đ Direct Links Integration
- Every response includes relevant explorer URLs
- Transactions include
explorerURL
to Secret Network explorers - Accounts provide
accountExplorerURL
- Validators include
validatorURL
- Smart contracts link to
contractExplorerURL
- Proposals show
proposalURL
- No extra API calls needed - links are generated automatically
đ Blockchain Operations
- Query blockchain info, height, and node status
- Network parameters (staking, slashing, governance, mint)
- Real-time validator tracking and status
- Account balance queries with automatic wallet detection
- Transaction history and detailed transaction lookups
- Staking delegations, unbonding, and rewards tracking
đ Transaction Capabilities
- Send tokens with optional wallet configuration
- IBC transfers between blockchains
- Fee grant management (allow others to pay your fees)
- Vesting account creation with locked tokens
- Smart contract execution with encrypted messages
- Contract migration for administrators
- Multi-signature transaction creation
đ Wallet Management
- Environment-based default wallet configuration
- Support for mnemonic phrase or private key
- User-provided wallet override capability
- Automatic wallet validation and fallback
- Secure key management practices
- Multi-wallet transaction support
đ Smart Contract Features
- Query smart contracts with encrypted inputs
- Execute contracts with SecretJS encryption
- Contract info and code retrieval
- Contract search by code ID
- Contract migration support
- Privacy-preserving computations
đī¸ Enterprise-Ready Architecture
- Built with SecretJS SDK and Express.js
- Comprehensive error handling with fallback mechanisms
- Docker containerization support
- Production-tested components
- MCP protocol implementation
- 20+ specialized tools for blockchain operations
- Zero-configuration deployment for read operations
đĻ Quick Start
Note: This MCP server provides full read-only access to Secret Network data without requiring wallet configuration. Private keys are only needed for transaction signing.
â Prerequisites
# Required
Node.js >= 18.0.0
npm >= 9.0.0
đ Wallet Configuration
Important: Wallet configuration is optional for read operations.
- Without Wallet: All query operations work (blockchain info, balances, validators, etc.)
- With Wallet: Enable transaction signing (send tokens, IBC transfers, contract execution)
- Configuration: Set in environment variables (see .env.example)
đĨ Installation
# Clone the repository
git clone https://github.com/Tairon-ai/scrt-network-mcp.git
cd scrt-network-mcp/mcp-server
# Install dependencies
npm install
# Configure environment (optional for transactions)
cp .env.example .env
# Edit .env only if you want transaction capabilities
# Start the server
npm start
# Development mode
npm run dev
# MCP stdio server for Claude Desktop
npm run mcp
đ¤ Claude Desktop Integration
Add to your Claude Desktop configuration:
{
"mcpServers": {
"scrt-network": {
"command": "node",
"args": ["/path/to/scrt-network-mcp/mcp-server/mcp/index.js"],
"env": {
"SCRT_LCD_ENDPOINT": "https://lcd.mainnet.secretsaturn.net",
"SCRT_RPC_ENDPOINT": "https://rpc.mainnet.secretsaturn.net",
"SCRT_WALLET_ADDRESS": "", // Optional: Your Secret address
"SCRT_WALLET_MNEMONIC": "" // Optional: Your mnemonic phrase
}
}
}
}
đ Available Tools
đ Blockchain Tools
Tool | Description | Parameters | Returns |
---|---|---|---|
get_blockchain_info | Get current blockchain information | None | Height, chain ID, latest block |
get_node_info | Get node sync status and info | None | Node details, sync status |
get_network_parameters | Get network parameters | None | Staking, slashing, governance params |
đ Validator Tools
Tool | Description | Parameters | Returns |
---|---|---|---|
get_validators | Get list of validators | status | Validators with validatorURL |
đ° Account Tools
Tool | Description | Parameters | Returns |
---|---|---|---|
get_account_balance | Get account balance | address (optional) | Balance with accountExplorerURL |
get_staking_info | Get staking details | address (optional) | Delegations, unbonding, rewards |
đ Transaction Tools
Tool | Description | Parameters | Returns |
---|---|---|---|
get_transaction | Get transaction by hash | hash | Transaction with explorerURL |
get_transactions_by_address | Get address transactions | address (optional), limit | Transaction history |
send_tokens | Send tokens | to_address , amount , denom , from_address , private_key | Transaction hash |
ibc_transfer | IBC cross-chain transfer | to_address , amount , source_channel , etc. | Transaction hash |
đī¸ Governance Tools
Tool | Description | Parameters | Returns |
---|---|---|---|
get_governance_proposals | Get proposals | status | Proposals with proposalURL |
đ Smart Contract Tools
Tool | Description | Parameters | Returns |
---|---|---|---|
search_contracts | Search by code ID | code_id | Contracts with contractExplorerURL |
get_contract_info | Get contract details | address | Contract info |
query_smart_contract | Query contract | address , query | Query result |
execute_contract | Execute contract | contract_address , msg , sender_address , private_key | Transaction hash |
migrate_contract | Migrate contract | contract_address , new_code_id , msg | Transaction hash |
đ¸ Advanced Transaction Tools
Tool | Description | Parameters | Returns |
---|---|---|---|
grant_fee_allowance | Grant fee payment permission | grantee_address , spend_limit | Transaction hash |
revoke_fee_allowance | Revoke fee permission | grantee_address | Transaction hash |
create_vesting_account | Create vesting account | to_address , amount , end_time | Transaction hash |
create_multisig_tx | Create multi-sig transaction | multisig_address , signers , threshold , msg | Unsigned transaction |
âšī¸ Utility Tools
Tool | Description | Parameters | Returns |
---|---|---|---|
generate_wallet | Generate new Secret Network wallet | None | Address, mnemonic, private key |
get_wallet_info | Get configured wallet info | None | Wallet configuration status |
đĄ Examples
đ Get Blockchain Info
// Request
{
"tool": "get_blockchain_info",
"params": {}
}
// Response includes
{
"chainId": "secret-4",
"height": "12345678",
"latestBlock": {
"hash": "0x...",
"time": "2024-01-01T00:00:00Z"
}
}
đ Generate New Wallet
{
"tool": "generate_wallet",
"params": {}
}
// Response includes
{
"address": "secret1abc...",
"mnemonic": "word1 word2 ... word24",
"privateKey": "hex_private_key",
"publicKey": "hex_public_key",
"warning": "IMPORTANT: Save these credentials securely!"
}
đ° Check Balance
{
"tool": "get_account_balance",
"params": {
"address": "secret1..." // Optional if wallet configured
}
}
đ¤ Send Tokens
{
"tool": "send_tokens",
"params": {
"to_address": "secret1abc...",
"amount": "1000000", // 1 SCRT in uscrt
"denom": "uscrt",
"memo": "Payment"
}
}
đ IBC Transfer
{
"tool": "ibc_transfer",
"params": {
"to_address": "cosmos1...",
"amount": "1000000",
"source_channel": "channel-0",
"denom": "uscrt"
}
}
đ Query Smart Contract
{
"tool": "query_smart_contract",
"params": {
"address": "secret1contract...",
"query": {
"balance": {
"address": "secret1user..."
}
}
}
}
đī¸ Get Proposals
{
"tool": "get_governance_proposals",
"params": {
"status": "PROPOSAL_STATUS_VOTING_PERIOD"
}
}
đ Execute Contract
{
"tool": "execute_contract",
"params": {
"contract_address": "secret1contract...",
"msg": {
"transfer": {
"recipient": "secret1...",
"amount": "1000000"
}
}
}
}
đ Grant Fee Allowance
{
"tool": "grant_fee_allowance",
"params": {
"grantee_address": "secret1...",
"spend_limit": "1000000" // 1 SCRT limit
}
}
đ¤ Prompts
đŦ Example Prompts for AI Assistants
đ Blockchain Queries
"What's the current height of Secret Network?"
"Show me the latest block information"
"Get Secret Network node sync status"
"What are the network staking parameters?"
"Show me the slashing parameters"
"Get governance voting parameters"
"What's the current inflation rate?"
"Show network mint parameters"
"Get distribution parameters"
"What chain ID is Secret Network using?"
đ Validator Information
"Show me all active validators on Secret Network"
"Get unbonding validators"
"Find unbonded validators"
"Show validator details for secret1valoper..."
"Get top validators by voting power"
"Show validator commission rates"
"Find validators with low commission"
"Get validator uptime information"
"Show jailed validators"
"Find validators accepting delegations"
đ° Account & Balance Queries
"Check my SCRT balance"
"Get balance for secret1abc..."
"Show all balances for my wallet"
"Check account balance in SCRT"
"Get token balances for address"
"Show my available balance"
"Check staking rewards"
"Get unbonding amounts"
"Show total portfolio value"
"Check vesting account balance"
đ¤ Token Transfers
"Send 10 SCRT to secret1abc..."
"Transfer 100 SCRT to this address"
"Send tokens with memo 'Payment'"
"Transfer 0.5 SCRT to my friend"
"Send maximum amount to secret1..."
"Transfer tokens from my wallet"
"Send SCRT with custom fee"
"Transfer tokens with high priority"
"Send all my SCRT to..."
"Make a payment of 50 SCRT"
đ IBC Transfers
"Transfer SCRT to Cosmos Hub via IBC"
"Send tokens to Osmosis through channel-1"
"IBC transfer to Juno Network"
"Bridge SCRT to Terra"
"Send tokens cross-chain to Akash"
"Transfer to cosmos1... via IBC"
"Bridge 100 SCRT to Osmosis"
"Send tokens to another blockchain"
"IBC transfer with timeout"
"Cross-chain transfer to Stride"
đ Transaction History
"Get my recent transactions"
"Show transaction hash ABC123..."
"Find transactions for my wallet"
"Get last 50 transactions"
"Show transactions from today"
"Find failed transactions"
"Get successful transfers"
"Show IBC transactions"
"Find transactions with memo"
"Get transaction details for..."
đĨŠ Staking Operations
"Show my staking delegations"
"Get unbonding delegations"
"Check staking rewards"
"Show delegation to validator X"
"Get total staked amount"
"Check rewards from all validators"
"Show pending rewards"
"Get staking APR"
"Find best validators to stake with"
"Show my staking portfolio"
đī¸ Governance
"Show active governance proposals"
"Get proposals in voting period"
"Show passed proposals"
"Get rejected proposals"
"Find proposals in deposit period"
"Show proposal #123 details"
"Get governance proposal history"
"Find proposals about staking"
"Show community pool proposals"
"Get software upgrade proposals"
đ Smart Contracts
"Query secret contract at address..."
"Get contract info for secret1..."
"Search contracts with code ID 123"
"Execute transfer on contract"
"Query token balance on contract"
"Get contract code hash"
"Find all contracts by code ID"
"Execute swap on DEX contract"
"Query liquidity pool info"
"Migrate contract to new code"
đ¸ Fee Management
"Grant fee allowance to secret1..."
"Allow address X to pay my fees"
"Revoke fee grant for address"
"Set 10 SCRT fee allowance"
"Create fee grant with expiry"
"Show my fee grants"
"Check who can pay my fees"
"Remove fee allowance"
"Grant unlimited fee allowance"
"Set daily fee limit"
đ Vesting Accounts
"Create vesting account for employee"
"Set up 1 year vesting schedule"
"Create delayed vesting account"
"Lock 1000 SCRT until next year"
"Create vesting with cliff period"
"Set up token vesting plan"
"Create continuous vesting"
"Lock tokens for 6 months"
"Create vesting for team member"
"Set up investor vesting"
đ Wallet Management
"Generate new Secret Network wallet"
"Create new wallet with mnemonic"
"Generate wallet for testing"
"Create fresh wallet address"
"Get new wallet credentials"
"Generate wallet for user"
"Create wallet with private key"
"Make new Secret account"
"Generate secure wallet"
"Create wallet for staking"
đ Multi-signature
"Create multisig transaction"
"Set up 2-of-3 multisig"
"Create transaction for signing"
"Generate multisig address"
"Create unsigned transaction"
"Set threshold for multisig"
"Add signers to multisig"
"Create complex multisig tx"
"Set up corporate multisig"
"Create multisig with 5 signers"
đ Advanced Queries
"Show wallet configuration status"
"Get default wallet address"
"Check if wallet is configured"
"Show available signing capabilities"
"Get chain configuration"
"Check LCD endpoint status"
"Show RPC connection info"
"Get network chain ID"
"Check wallet signing ability"
"Show environment configuration"
đĄ Privacy Features
"Execute private computation"
"Query encrypted contract state"
"Send private transaction"
"Execute secret contract function"
"Query private data"
"Interact with privacy token"
"Execute confidential swap"
"Query encrypted balance"
"Send private message"
"Execute sealed bid auction"
đ Analytics
"Calculate total value locked"
"Show network statistics"
"Get transaction volume today"
"Show active addresses count"
"Calculate staking ratio"
"Get network participation rate"
"Show IBC volume statistics"
"Calculate average block time"
"Get validator performance metrics"
"Show network growth metrics"
đ ī¸ Development
"Deploy smart contract"
"Query contract admin"
"Update contract code"
"Set contract metadata"
"Get contract source code"
"Verify contract code"
"Instantiate contract"
"Query contract schema"
"Get contract permissions"
"Check contract migration history"
đ Network Operations
"Check mainnet status"
"Get testnet information"
"Show network peers"
"Get consensus state"
"Check network latency"
"Show connected nodes"
"Get network topology"
"Check sync progress"
"Show mempool status"
"Get pending transactions"
đ Security
đĄī¸ Security Features
- Private Key Protection - Keys stored securely in environment variables
- Mnemonic Support - BIP39 mnemonic phrase support
- Input Validation - All inputs validated before processing
- Error Handling - Comprehensive error management
- Address Validation - Secret Network address format validation
- HTTPS Only - All API calls use secure connections
- Encrypted Contracts - Native support for Secret Network's encrypted computation
đ Best Practices
- Key Management: Never commit private keys or mnemonics
- Wallet Security: Use hardware wallets for production
- Transaction Verification: Always verify transaction details
- Contract Interaction: Validate contract addresses
- Fee Monitoring: Monitor transaction fees
- Network Selection: Ensure correct network (mainnet/testnet)
đ Supported Infrastructure
đ Network Endpoints
- LCD API:
https://lcd.mainnet.secretsaturn.net
- REST API for queries - RPC API:
https://rpc.mainnet.secretsaturn.net
- Tendermint RPC - Chain ID:
secret-4
(mainnet) - Token: SCRT (uscrt for micro-units)
đ API Endpoints
- Main LCD:
https://lcd.mainnet.secretsaturn.net
- Alternative LCD:
https://secretnetwork-api.lavenderfive.com
- RPC Endpoint:
https://rpc.mainnet.secretsaturn.net
⥠Rate Limits
Endpoint Type | Rate Limit | Notes |
---|---|---|
LCD API | 100 req/sec | Public endpoint |
RPC API | 50 req/sec | Public endpoint |
Contract Queries | 50 req/sec | Encrypted queries |
đ Deployment
đ Production Deployment
# Start production server
NODE_ENV=production npm start
# With PM2
pm2 start mcp/index.js --name scrt-network-mcp
# With Docker
docker build -t scrt-network-mcp .
docker run -d -p 8080:8080 --env-file .env scrt-network-mcp
đ Environment Variables
# Server Configuration
PORT=8080
# Secret Network endpoints
SCRT_LCD_ENDPOINT=https://lcd.mainnet.secretsaturn.net
SCRT_RPC_ENDPOINT=https://rpc.mainnet.secretsaturn.net
SCRT_NETWORK=mainnet
SCRT_CHAIN_ID=secret-4
# Wallet Configuration (optional for transactions)
SCRT_WALLET_ADDRESS=secret1...
SCRT_WALLET_MNEMONIC="your twelve word mnemonic phrase..."
# OR use private key instead
# SCRT_WALLET_PRIVATE_KEY=your_private_key_here
# Optional
REQUEST_TIMEOUT=30000
DEBUG=false
đ Performance
- Response Time: <100ms for local queries
- Transaction Speed: 6-7 second block time
- Query Caching: Intelligent caching for repeated queries
- Concurrent Requests: Optimized for parallel operations
- Error Recovery: Automatic retry with exponential backoff
- Encryption Overhead: Minimal (<50ms) for contract encryption
đ¯ Key Features
⨠Privacy-First Design
- Encrypted smart contract state
- Private computation capabilities
- Confidential transactions
- Secure multi-party computation
đ Cross-Chain Support
- IBC protocol integration
- Multi-chain asset transfers
- Bridge compatibility
- Interchain accounts
đ¤ī¸ Developer Friendly
- Comprehensive toolset
- SecretJS SDK integration
- Clear error messages
- Extensive documentation
đ¤ Contributing
We welcome contributions!
# Fork the repository on GitHub, then clone
git clone https://github.com/Tairon-ai/scrt-network-mcp
# Create feature branch
git checkout -b feature/amazing-feature
# Make changes and test
npm test
# Commit and push
git commit -m 'feat: add amazing feature'
git push origin feature/amazing-feature
# Open Pull Request
đ License
This project is licensed under the MIT License - see the file for details.
đ Acknowledgments
- Secret Network - Privacy-preserving smart contracts
- SecretJS - Secret Network JavaScript SDK
- Model Context Protocol - AI integration standard
- Express.js - Web framework for Node.js
đ Resources
- Secret Network Docs
- SecretJS Documentation
- Secret Network GitHub
- IBC Protocol
- Cosmos SDK
- Secret Network Explorer
đ API Access Information
Public Access (Default)
All query tools work without authentication:
- â Full read access to blockchain data
- â Account balances and staking info
- â Validator information and status
- â Transaction history and details
- â Smart contract queries
- â Governance proposals
Authenticated Access (With Wallet)
With wallet configuration, additionally enables:
- ⨠Token transfers and payments
- ⨠IBC cross-chain transfers
- ⨠Smart contract execution
- ⨠Fee grant management
- ⨠Vesting account creation
- ⨠Multi-signature transactions
- ⨠Contract migration
Built by Tairon.ai team with help from Claude