Provides real-time access to Chainlink's decentralized on-chain price feeds.
An MCP server that provides real-time access to Chainlink's decentralized on-chain price feeds, optimized for seamless integration into AI agents and autonomous systems
FIL/ETH
) on a given chain (e.g., ethereum
), including price, decimals, round ID, and timestamp.ethereum,base
).- ethereum: FIL/ETH,FDUSD/USD
).FIL/ETH,FDUSD/USD
for ethereum
).feeds.json
file, supporting multiple chains and feed categories.The server supports 9 blockchain networks with a total of 329 price feeds, as defined in feeds.json
:
FIL/ETH
, BTC/USD
, USDC/USD
)DOT/USD
, CAKE/USD
, BUSD/BNB
)AXL/USD
, USDC/USD
, WIF/USD
)ETH/USD
, BTC/USD
, WSTETH/ETH
)ETH/USD
, FOXY/USD
, MATIC/USD
)MNT/USD
, USDT/USD
, BTC/USD
)SCR/USD
, STETH/USD
, WBTC/BTC
)ZK/USD
, PEPE/USD
, TRUMP/USD
)CELO/USD
, CUSD/USD
, NGN/USD
)Additional chains and feeds can be added by updating feeds.json
with new network configurations and proxy addresses from Chainlink's Price Feeds documentation.
Clone the Repository:
git clone https://github.com/kukapay/chainlink-feeds-mcp.git
cd chainlink-feeds-mcp
Install Dependencies:
npm install
The project requires:
@modelcontextprotocol/sdk
: For MCP server functionality.ethers
: Version 6.x for blockchain interactions.zod
: For input validation.dotenv
: For environment variable management.Configure MCP Client: To use this server with an MCP client like Claude Desktop, add the following to your config file (or equivalent):
{
"mcpServers": {
"chainlink-feeds-mcp": {
"command": "node",
"args": ["path/to/chainlink-feeds-mcp/index.js"],
"env": { "INFURA_API_KEY": "your_api_key_here" }
}
}
}
Create a .env
file in the root directory and add your Infura API key:
INFURA_API_KEY=your_infura_api_key_here
You can get a free key from Infura.
To start the server, run the following command:
npm start
This project is pre-configured for debugging index.ts
in Visual Studio Code.
npm install
).Cmd+Shift+D
on macOS or Ctrl+Shift+D
on Windows/Linux).F5
.The debugger will launch the TypeScript server using ts-node
, and you can set breakpoints in your .ts
files.
The server exposes five tools via the MCP protocol, accessible through Claude Desktop (for natural language queries) or MCP Inspector (for JSON inputs). Below are the tools, with examples in both natural language (via Claude Desktop) and JSON formats.
getLatestPrice
Description: Fetches the latest price for a given pair on a specified chain, returns a JSON object like this:
{
"chain": "ethereum",
"pair": "FIL/ETH",
"price": 0.01234,
"decimals": 18,
"roundId": "123456",
"timestamp": "2025-04-17T12:00:00.000Z",
"proxyAddress": "0x0606Be69451B1C9861Ac6b3626b99093b713E801",
"feedCategory": "medium"
}
Parameters:
pair
(string): The price feed pair, e.g., FIL/ETH
.chain
(string): The blockchain network, e.g., ethereum
.Natural Language Example (Claude Desktop):
Input: "What��s the latest FIL/ETH price on Ethereum?"
Output: "The latest FIL/ETH price on Ethereum is 0.01234, with 18 decimals, round ID 123456, updated at 2025-04-17 12:00:00 UTC."
queryPriceByRound
Description: Queries the price for a given pair and round ID on a specified chain, returns a JSON object like this:
{
"chain": "ethereum",
"pair": "FDUSD/USD",
"price": 1.0001,
"decimals": 8,
"roundId": "123",
"timestamp": "2025-04-17T12:00:00.000Z",
"proxyAddress": "0xfAA9147190c2C2cc5B8387B4f49016bDB3380572",
"feedCategory": "medium"
}
Parameters:
roundId
(string): The round ID for the price data.pair
(string): The price feed pair, e.g., FDUSD/USD
.chain
(string): The blockchain network, e.g., ethereum
.Natural Language Example (Claude Desktop):
Input: "Can you get the FDUSD/USD price for round ID 123 on Ethereum?"
Output: "For round ID 123, the FDUSD/USD price on Ethereum is 1.0001, with 8 decimals, updated at 2025-04-17 12:00:00 UTC. Note: This is a placeholder response due to historical data limitations."
listSupportedChains
Description: Returns a comma-separated list of all supported blockchain networks.
Parameters: None.
Natural Language Example (Claude Desktop):
Input: "Which blockchain networks does this server support?"
Output: "The server supports the following networks: ethereum, bsc, base, starknet, linea, mantle, scroll, zksync, celo."
listSupportedFeeds
Description: Returns a Markdown list of all supported chains and their price feed names.
Parameters: None.
Natural Language Example (Claude Desktop):
Input: "Can you list all the price feeds supported by the server?"
Output: "Here are the supported price feeds by chain:
Original repo: https://github.com/kukapay/chainlink-feeds-mcp, index.js not working
Used ai.studio and MCP llms.txt to have created a working index.ts
How to use: .vscode/mcp.json
Notice the --prefix
vs uv
--directory
...
"chainlink-feeds-mcp": {
"command": "npm",
"args": [
"--prefix",
"/Users/xxx/xxxx/_github/kukapay/chainlink-feeds-mcp",
"run",
"start"
],
"env": { "INFURA_API_KEY": "0d2xxxxxxcfac96a1dfd" }
},
An unofficial MCP server plugin for remote control of Unreal Engine using AI tools.
Single tool to control all 100+ API integrations, and UI components
Generate mermaid diagram and chart with AI MCP dynamically.
Beautiful HTML and PNG diff visualization using diff2html, designed for filesystem edit_file dry-run output with high-performance Bun runtime.
Bootstrap Model Context Protocol (MCP) servers and clients in TypeScript with best practices, examples, and proper tooling setup.
A secure command-line interface server for the Model Context Protocol (MCP) that allows AI models to interact with a user's terminal.
A tool to retrieve API interface information from YApi, with authentication configurable via environment variables.
A scientific computing server for symbolic math, data analysis, and visualization using popular Python libraries like NumPy, SciPy, and Pandas.
Connects to the React Native application debugger to retrieve console logs from Metro.
A platform-agnostic server for scalable mobile automation and development across iOS, Android, simulators, and emulators.