jishnu-kimp/test-mcp-server
If you are the rightful owner of test-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A modular Node.js server that provides OKX cryptocurrency market data and business analytics tools as Model Context Protocol (MCP) tools.
Test MCP Server
A modular Node.js server that exposes both OKX cryptocurrency market data (price, candlesticks, etc.) and business analytics tools (sales, revenue by region, etc.) as Model Context Protocol (MCP) tools.
Features
- MCP Tool Server: Exposes both OKX market data and business analytics as MCP tools.
- Cryptocurrency Data:
- Get latest price, bid, ask, 24h high/low, and volume for any OKX instrument.
- Retrieve historical candlestick data for any OKX instrument and interval.
- Business Analytics:
- Get total sales revenue.
- Get sales sum grouped by region.
- Compare sales performance across regions.
Project Structure
src/
api/ # Handles OKX and business analytics API requests
handlers/ # MCP tool handler logic
server/ # Server setup and logic
types/ # TypeScript interfaces for APIs
main.ts # Entry point, starts the server
Getting Started
Prerequisites
- Node.js (v18+ recommended)
- npm, pnpm, or yarn
- OKX public API (no key required for public endpoints)
Installation
npm install
# or
pnpm install
# or
yarn install
Build
npm run build
# or
pnpm run build
# or
yarn build
Run
npm start
# or
pnpm start
# or
yarn start
Usage
The server runs as an MCP tool server over stdio. It exposes the following tools:
Cryptocurrency Market Data Tools
1. get_price
Fetch the latest price and market data for a given OKX instrument.
Input:
{
"instrument": "BTC-USDT"
}
Output:
{
"instrument": "BTC-USDT",
"lastPrice": "104417.4",
"bid": "104417.9",
"ask": "104418",
"high24h": "104528",
"low24h": "102613.9",
"volume24h": "3294.9269693",
"timestamp": "2025-05-18T13:45:24.914Z"
}
2. get_candlesticks
Fetch historical candlestick data for a given OKX instrument and interval.
Input:
{
"instrument": "BTC-USDT",
"bar": "1D",
"limit": 2
}
Output: An array of candlestick objects with open, high, low, close, volume, and timestamp.
Business Analytics Tools
3. get_total_revenue
Fetch the total sales revenue.
Output:
{
"totalRevenue": 1234.56
}
4. get_sales_by_region
Fetch the sales sum for a specific region.
Input:
{
"region": "North"
}
Output:
{
"region": "North",
"revenue": 120.5
}
5. Regional Sales Comparison
You can compare sales across different regions to identify the best-performing area.
Development
- API Layer: All OKX and business analytics API calls are in
src/api/
. - Handlers: MCP tool logic is in
src/handlers/
. - Types: API response types are in
src/types/
. - Server: MCP server setup is in
src/server/
. - Entry Point: Start the server with
src/main.ts
.
Contributing
- Fork the repo
- Create your feature branch (
git checkout -b feature/YourFeature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/YourFeature
) - Open a pull request
License
ISC
Authors
- Jishnu Satheesh (KIMP)