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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。