dex-kline-mcp
Retrieves K-line (candlestick) OHLCV data from Binance Smart Chain DEXs, supporting multiple timeframes and dynamically selecting the most liquid trading pools
Fetches K-line (candlestick) OHLCV data from Ethereum DEXs, automatically selecting pools with highest liquidity to provide accurate price and trading data
Streams K-line (candlestick) OHLCV data from Solana-based decentralized exchanges, with support for various timeframes and historical data retrieval
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dex-kline-mcpget 1-hour kline data for USDC on Ethereum"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DEX K-line MCP
An MCP server that streams K-line (candlestick) data from decentralized exchanges (DEXs) to power your AI agents and workflows.
Features
K-line Data Retrieval: Fetches OHLCV (Open, High, Low, Close, Volume) data for specified tokens on supported chains (Ethereum, Binance Smart Chain, Solana).
Dynamic Timeframes: Supports multiple timeframes (
1m,5m,15m,1h,4h,12h,1d) with appropriate API endpoints.Best Pool Selection: Automatically selects the pool with the highest liquidity for accurate data.
Flexible End Time: Allows specifying an end time in ISO 8601 format or defaults to the current UTC time.
Tabular Output: Formats K-line data into a clean, readable table using the
tabulatelibrary.
Related MCP server: liquidity-pools-mcp
Installation
Prerequisites
Python 3.10 or higher
uv for dependency management
Setup
Clone the repository:
git clone https://github.com/kukapay/dex-kline-mcp.git cd dex-kline-mcpInstall dependencies:
uv syncInstalling to Claude Desktop:
Install the server as a Claude Desktop application:
uv run mcp install main.py --name "DEX K-line"Configuration file as a reference:
{ "mcpServers": { "DEX K-line": { "command": "uv", "args": [ "--directory", "/path/to/dex-kline-mcp", "run", "main.py" ] } } }Replace
/path/to/dex-kline-mcpwith your actual installation path.
Usage
Tool: get_kline
The server exposes a single tool, get_kline, which retrieves K-line data for a specified token.
Parameters
chain(str): Blockchain network (e.g.,eth,bsc,solana)address(str): Token contract addresstimeframe(str): K-line timeframe (e.g.,1m,5m,15m,1h,4h,12h,1d). Default:1hend_time(str, optional): ISO 8601 timestamp for data end time (e.g.,2025-07-03T02:14:00Z). Default: current UTC timelimit(int): Number of data points to return (max 1000). Default: 100
Example Prompt
Fetch the 1-hour K-line data for the token with the contract address 0xf4b385849f2e817e92bffbfb9aeb48f950ff4444 on the Binance Smart Chain (BSC).
Example Output
Pair: TOKEN/USDT
+---------------------+------------+------------+------------+------------+------------+
| Timestamp | Open | High | Low | Close | Volume |
+---------------------+------------+------------+------------+------------+------------+
| 2025-07-03 01:00:00 | 0.12345678 | 0.12345678 | 0.12345678 | 0.12345678 | 1234.56789 |
| 2025-07-03 00:00:00 | 0.12345678 | 0.12345678 | 0.12345678 | 0.12345678 | 1234.56789 |
+---------------------+------------+------------+------------+------------+------------+License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgments
Data powered by GeckoTerminal API.
Available Tools
1 toolget_klineA
Fetch K-line data for a specified token on a given chain and return it as a formatted table.
Parameters:
chain (str): Blockchain network (e.g., 'eth', 'bsc', 'solana')
address (str): Token contract address
timeframe (str): K-line timeframe (e.g., '1m', '5m', '15m', '1h', '4h', '12h', '1d'). Default: '1n'
end_time (str, optional): ISO 8601 timestamp for data end time (e.g., '2025-07-03T02:14:00Z'). Default: current UTC time
limit (int): Number of data points to return (max 1000). Default: 100
Returns:
str: String containing pair name and K-line data in a formatted table
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | ||
| address | Yes | ||
| timeframe | No | 1m | |
| end_time | No | ||
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It specifies the output format ('formatted table') and mentions a max limit ('max 1000'), which adds useful context beyond the input schema. However, it lacks details on error handling, rate limits, authentication needs, or data freshness, which are important for a data-fetching tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and appropriately sized, with a clear purpose statement followed by parameter and return sections. Every sentence adds value, such as explaining defaults and constraints. It could be slightly more concise by integrating the purpose with parameter details, but overall it's efficient and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (5 parameters, no annotations, but with an output schema), the description is mostly complete. It covers all parameters semantically and specifies the return format. The output schema (indicated as present) likely handles return values, so the description doesn't need to detail them further. However, it lacks context on error cases or usage scenarios, leaving minor gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant semantic value beyond the input schema, which has 0% description coverage. It explains each parameter's purpose with examples (e.g., 'e.g., 'eth', 'bsc', 'solana'' for chain, 'e.g., '1m', '5m', '15m', '1h', '4h', '12h', '1d'' for timeframe), clarifies defaults, and notes constraints like 'max 1000' for limit. This fully compensates for the schema's lack of descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Fetch K-line data for a specified token on a given chain and return it as a formatted table.' This specifies the verb ('fetch'), resource ('K-line data'), and output format ('formatted table'). However, with no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, preventing a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or contextual constraints. It only lists parameters and returns, with no mention of use cases, limitations beyond defaults, or comparisons to other tools. This leaves the agent without operational context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
- First observed
get_kline
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion or overlap between tools. The tool has a single, clearly defined purpose of fetching K-line data for tokens on specific blockchains.
The single tool follows a clear verb_noun pattern (get_kline). With only one tool, naming consistency is inherently perfect as there are no other tools to compare against.
A single tool is insufficient for a K-line data server that presumably needs to handle multiple aspects of cryptocurrency trading data. While the tool itself is well-defined, the server feels thin and incomplete with only one operation available.
The server is severely incomplete for K-line data operations. While fetching K-line data is covered, there are obvious gaps such as listing available tokens, getting token metadata, historical data analysis tools, or comparison tools between different tokens or timeframes.
Maintenance
Related MCP Connectors
MCP server giving AI agents one-connection access to crypto & DeFi data: DeFi protocol TVL, stableco
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
Real-time crypto market data: candles, tickers, orderbooks across 13+ exchanges via MCP.
Related MCP Servers
- AlicenseAqualityFmaintenanceAn MCP server that provides real-time data and insights from the Hyperliquid perp DEX for use in bots, dashboards, and analytics.1729MIT
- AlicenseAqualityDmaintenanceAn MCP server that tracks and analyzes DEX liquidity pools to power intelligent DeFi agents and automated strategies.12MIT
- AlicenseAqualityDmaintenanceAn MCP server that provides AI agents with real-time access to DEX liquidity pool data, enabling smarter trading, analytics, and automated strategies.101MIT
- AlicenseBqualityDmaintenanceMCP server that exposes QuantXData's institutional crypto market data APIs to AI assistants, enabling natural language queries for trades, order books, OHLCV, options, and more across 120+ exchanges.12MIT