Chainlink
效率与工作流by goldk3y
无缝接入 Chainlink 预言机网络服务,涵盖实时价格喂价、VRF、跨链互操作、自动化、Proof of Reserve 与 off-chain 函数执行。
什么是 Chainlink?
无缝接入 Chainlink 预言机网络服务,涵盖实时价格喂价、VRF、跨链互操作、自动化、Proof of Reserve 与 off-chain 函数执行。
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.
常见问题
Chainlink 是什么?
无缝接入 Chainlink 预言机网络服务,涵盖实时价格喂价、VRF、跨链互操作、自动化、Proof of Reserve 与 off-chain 函数执行。
相关 Skills
PDF处理
by anthropics
遇到 PDF 读写、文本表格提取、合并拆分、旋转加水印、表单填写或加解密时直接用它,也能提取图片、生成新 PDF,并把扫描件通过 OCR 变成可搜索文档。
✎ PDF杂活别再来回切工具了,文本表格提取、合并拆分到OCR识别一次搞定,连扫描件也能变可搜索。
技能工坊
by anthropics
覆盖 Skill 从创建到迭代优化全流程:起草能力、补测试提示、跑评测与基准方差分析,并持续改写内容和描述,提升效果与触发准确率。
✎ 技能工坊把技能从创建、迭代到评测串成闭环,方差分析加描述优化,特别适合把触发准确率打磨得更稳。
PPT处理
by anthropics
处理 .pptx 全流程:创建演示文稿、提取和解析幻灯片内容、批量修改现有文件,支持模板套用、合并拆分、备注评论与版式调整。
✎ 涉及PPTX的创建、解析、修改到合并拆分都能一站搞定,连备注、模板和评论也能处理,做演示文稿特别省心。
相关 MCP Server
文件系统
编辑精选by Anthropic
Filesystem 是 MCP 官方参考服务器,让 LLM 安全读写本地文件系统。
✎ 这个服务器解决了让 Claude 直接操作本地文件的痛点,比如自动整理文档或生成代码文件。适合需要自动化文件处理的开发者,但注意它只是参考实现,生产环境需自行加固安全。
by wonderwhy-er
Desktop Commander 是让 AI 直接执行终端命令、管理文件和进程的 MCP 服务器。
✎ 这工具解决了 AI 无法直接操作本地环境的痛点,适合需要自动化脚本调试或文件批量处理的开发者。它能让你用自然语言指挥终端,但权限控制需谨慎,毕竟让 AI 执行 rm -rf 可不是闹着玩的。
by stickerdaniel
LinkedIn Profile and Job Scraper 是让 Claude 直接抓取 LinkedIn 个人资料、公司信息和职位详情的工具。
✎ 这个服务器解决了招聘和商业调研中手动复制粘贴 LinkedIn 数据的痛点,适合猎头或市场分析师快速获取候选人背景和公司动态。不过,LinkedIn 反爬机制频繁更新,数据稳定性需要持续维护,使用时建议搭配人工验证。