Chainlink MCP Server
Enables interaction with Chainlink's decentralized oracle network, providing access to real-time price feeds, serverless functions, smart contract automation, verifiable randomness, cross-chain messaging, and proof of reserve across multiple blockchain networks.
README
Chainlink MCP Server
A comprehensive Model Context Protocol (MCP) server for interacting with Chainlink's decentralized oracle network services. This server provides AI developers with seamless access to Chainlink's entire ecosystem including Data Feeds, Functions, Automation, VRF, CCIP, and Proof of Reserve.
Features
🔗 Data Feeds
Access real-time and historical price data from Chainlink's industry-leading price feeds:
get_price_feed: Get current price for any trading pairget_price_feeds_batch: Retrieve multiple prices simultaneouslylist_available_feeds: Browse all available feeds by networksearch_feeds: Find feeds by asset name or descriptionget_feed_metadata: Get detailed feed informationget_round_data: Access specific round data
⚡ Chainlink Functions
Deploy and execute custom serverless functions with off-chain computation:
deploy_function: Deploy JavaScript functions to the networkcall_function: Execute functions with custom argumentsget_function_result: Retrieve execution resultslist_user_functions: Manage your deployed functionsestimate_function_cost: Calculate execution costs
🤖 Automation
Automate smart contract execution based on time or custom conditions:
create_automation: Set up new automation jobslist_automations: View all automation jobsget_automation_status: Check job status and historypause_automation/resume_automation: Control job executioncancel_automation: Permanently stop jobs
🎲 VRF (Verifiable Random Function)
Generate provably fair random numbers for gaming and other applications:
request_random_words: Request verifiable random numbersget_random_result: Retrieve fulfilled random numbersverify_randomness: Verify cryptographic proofsget_vrf_config: Get network VRF settingsestimate_vrf_cost: Calculate randomness costs
🌉 CCIP (Cross-Chain Interoperability)
Enable secure cross-chain communication and token transfers:
send_cross_chain_message: Send messages between chainstransfer_tokens_cross_chain: Bridge tokens across networksget_message_status: Track delivery statuslist_supported_networks: View CCIP-enabled networksestimate_ccip_fees: Calculate cross-chain costs
🛡️ Proof of Reserve
Verify asset backing and collateralization:
get_proof_of_reserve: Get latest reserve dataverify_reserve_proof: Verify cryptographic proofslist_supported_assets: View monitored assetsget_reserve_history: Track historical reserve ratios
Network Support
Mainnets
- Ethereum - Full feature support
- Polygon - Data Feeds, VRF, CCIP
- Arbitrum - Data Feeds, CCIP
- Optimism - Data Feeds, CCIP
- Avalanche - Data Feeds, VRF, CCIP
- BNB Smart Chain - Data Feeds, VRF
Testnets
- Sepolia - All features for testing
Configuration
Basic Setup
{
"chainlinkApiKey": "optional-api-key-for-premium-features",
"defaultNetwork": "ethereum"
}
Custom Networks
{
"chainlinkApiKey": "your-api-key",
"defaultNetwork": "ethereum",
"networks": {
"custom-network": {
"rpcUrl": "https://your-rpc-endpoint.com",
"chainId": 12345
}
}
}
Usage Examples
Get ETH/USD Price
// Get current ETH price
await callTool("get_price_feed", {
pair: "ETH/USD",
network: "ethereum"
})
Monitor Multiple Assets
// Track portfolio prices
await callTool("get_price_feeds_batch", {
pairs: ["ETH/USD", "BTC/USD", "LINK/USD"],
network: "ethereum"
})
Request Random Numbers
// Generate random numbers for gaming
await callTool("request_random_words", {
numWords: 3,
subscriptionId: "1234",
network: "ethereum"
})
Cross-Chain Token Transfer
// Bridge USDC from Ethereum to Polygon
await callTool("transfer_tokens_cross_chain", {
sourceNetwork: "ethereum",
destinationNetwork: "polygon",
tokenAddress: "0xA0b86a33E6441c8F8dB20A3d2A3485b5BFa71b1F",
amount: "100000000", // 100 USDC (6 decimals)
recipient: "0x742d35Cc6ABf11d7a6E2a1f5e3E77D4a8F6AF6AF"
})
Deploy Custom Function
// Deploy weather data fetcher
await callTool("deploy_function", {
name: "Weather Oracle",
source: `
const response = await fetch("https://api.openweathermap.org/data/2.5/weather?q=London&appid=" + secrets.apiKey);
const data = await response.json();
return Functions.encodeString(data.main.temp.toString());
`,
subscriptionId: "5678",
secrets: { "apiKey": "your-weather-api-key" }
})
Automate Yield Harvesting
// Set up automatic yield harvesting
await callTool("create_automation", {
name: "DeFi Yield Harvester",
targetContract: "0x1234567890123456789012345678901234567890",
functionSelector: "harvest()",
triggerType: "conditional",
triggerConfig: {
condition: "pendingRewards() > 1000000000000000000" // 1 ETH worth
}
})
Common Use Cases
Trading & Finance
- Algorithmic Trading: Real-time price feeds for automated trading strategies
- Portfolio Management: Multi-asset price tracking and rebalancing
- Risk Assessment: Historical price analysis and volatility calculations
- DeFi Integration: Price feeds for lending, borrowing, and AMM protocols
Gaming & NFTs
- Provably Fair Gaming: VRF for transparent randomness in games
- Dynamic NFTs: Price-triggered metadata updates
- Reward Distribution: Fair random selection of winners
- Cross-Chain Gaming: CCIP for multi-chain game economies
Automation & Infrastructure
- Yield Farming: Automated harvesting and compounding
- Liquidation Bots: Automated position management
- Rebalancing: Portfolio optimization triggers
- Monitoring: Custom alert systems
Cross-Chain Applications
- Multi-Chain DeFi: Unified protocols across networks
- Asset Bridging: Secure token transfers between chains
- Governance: Cross-chain voting and execution
- Liquidity Management: Cross-chain arbitrage and optimization
Error Handling
All tools return structured responses with error handling:
{
"success": true | false,
"data": { /* result data */ },
"error": "error message if failed",
"message": "human-readable status message"
}
Common error scenarios:
- Network Issues: Connectivity problems or invalid networks
- Invalid Parameters: Malformed addresses or unsupported pairs
- Rate Limiting: API quota exceeded
- Insufficient Funds: Lack of LINK or ETH for operations
Supported Trading Pairs
Crypto Assets
- Major Cryptocurrencies: BTC/USD, ETH/USD, LINK/USD
- Altcoins: ADA/USD, DOT/USD, MATIC/USD
- Stablecoins: USDC/USD, USDT/USD, DAI/USD
Traditional Assets
- Forex: EUR/USD, GBP/USD, JPY/USD
- Commodities: XAU/USD (Gold), XAG/USD (Silver)
- Indices: SPX/USD, FTSE/USD
Development & Testing
Local Development
npm install
npm run dev
Testing with Testnets
Use Sepolia testnet for safe testing:
{
"defaultNetwork": "sepolia",
"chainlinkApiKey": "test-api-key"
}
Mock Data
The server includes realistic mock data for development and testing without consuming actual resources.
Rate Limits & Costs
Free Tier
- Data Feeds: 100 requests/hour
- Network Info: Unlimited
- Historical Data: Limited to 24 hours
Premium Features
- Functions: Requires LINK subscription
- VRF: ~0.25 LINK per request
- CCIP: Variable based on message size and networks
- Automation: Gas costs + small premium
Security Considerations
- API Keys: Store securely, never expose in client-side code
- Private Keys: Not required - server only reads blockchain data
- Rate Limiting: Implement client-side rate limiting for production
- Validation: All inputs are validated and sanitized
Troubleshooting
Common Issues
"No feed found for pair"
- Check spelling and format (e.g., "ETH/USD" not "eth/usd")
- Verify network supports the trading pair
- Use
list_available_feedsto see supported pairs
"Unsupported network"
- Check network name spelling
- Use
get_vrf_configor similar tools to see supported networks - Add custom network configuration if needed
"Request timeout"
- Check network connectivity
- Verify RPC endpoint is responsive
- Try different network or wait and retry
"Invalid address format"
- Ensure addresses are valid Ethereum format (0x...)
- Use checksummed addresses when possible
- Verify address corresponds to correct network
Performance Optimization
- Batch Requests: Use batch tools for multiple operations
- Caching: Cache frequently accessed data locally
- Network Selection: Use faster networks for non-critical operations
Contributing
This MCP server is built following Smithery's established patterns and best practices. For contributions:
- Follow the modular architecture in
src/tools/ - Add comprehensive error handling and validation
- Include TypeScript type definitions
- Provide clear tool descriptions and examples
- Test with both mainnet and testnet networks
License
MIT License - See LICENSE file for details.
Built for AI developers by the Smithery team
For support and updates, visit our documentation or join our community.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.