LC

longmans/coin_api_mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

36 stars 9 forks 质量 56 趋势 12

一个模型上下文协议服务器,提供访问CoinMarketCap加密货币数据的权限。该服务器使AI驱动的应用能够检索加密货币列表、报价和详细......

概览

一个模型上下文协议服务器,提供对CoinMarketCap加密货币数据的访问。该服务器使AI驱动的应用能够检索各种币种的加密货币列表、报价和详细信息。 - 上市币 - 获取所有活跃加密货币的分页列表,包含最新市场数据。- 起始(整数,可选):偏移分页列表的起始(基于1的指数)。- 限制(整数,可选):需返回的结果数量(默认:10,最大:5000)。- price_min(数字,可选):最低美元价格以过滤结果。- price_max(数字,可选):最大美元价格以过滤结果。- market_cap_min(数字,可选):最低市值以过滤结果。- market_cap_max(数字,可选):最大市值以过滤结果。- 转换(字符串,可选):计算多种货币的市场报价。- 排序(字符串,可选):用于排序加密货币列表的字段。

概述(AI 翻译)

一个模型上下文协议服务器,提供对CoinMarketCap加密货币数据的访问。该服务器使AI驱动的应用能够检索各种币种的加密货币列表、报价和详细信息。

可用工具

  • listing-coins - 获取所有活跃加密货币的分页列表,包含最新的市场数据。

  • start(整数,可选):偏移返回项目分页列表的起始(基于1的索引)。

  • limit(整数,可选):返回结果数(默认:10,最大:5000)。

  • price_min(编号,可选):筛选结果的最低美元价格。

  • price_max(数字,可选):最高美元价格以筛选结果。

  • market_cap_min(数字,可选):最低市值以筛选结果。

  • market_cap_max(数字,可选):最大市值以筛选结果。

  • convert(字符串,可选):计算多种货币的市场报价。

  • sort(字符串,可选):用于排序加密货币列表的字段。

  • sort_dir(字符串,可选):订购加密货币(asc 或 desc)的指令。

  • get-coin-info - 获取特定加密货币的详细信息。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Coin MCP Server

A Model Context Protocol server that provides access to CoinMarketCap’s cryptocurrency data. This server enables AI-powered applications to retrieve cryptocurrency listings, quotes, and detailed information about various coins.

Available Tools

  • listing-coins - Fetches a paginated list of all active cryptocurrencies with the latest market data.

    • start (integer, optional): Offset the start (1-based index) of the paginated list of items to return.
    • limit (integer, optional): Number of results to return (default: 10, max: 5000).
    • price_min (number, optional): Minimum USD price to filter results.
    • price_max (number, optional): Maximum USD price to filter results.
    • market_cap_min (number, optional): Minimum market cap to filter results.
    • market_cap_max (number, optional): Maximum market cap to filter results.
    • convert (string, optional): Calculate market quotes in multiple currencies.
    • sort (string, optional): Field to sort the list of cryptocurrencies by.
    • sort_dir (string, optional): Direction to order cryptocurrencies (asc or desc).
  • get-coin-info - Retrieves detailed information about a specific cryptocurrency.

    • id (string, optional): One or more comma-separated CoinMarketCap cryptocurrency IDs.
    • slug (string, optional): A comma-separated list of cryptocurrency slugs.
    • symbol (string, optional): One or more comma-separated cryptocurrency symbols.
  • get-coin-quotes - Fetches the latest market quotes for one or more cryptocurrencies.

    • id (string, optional): One or more comma-separated cryptocurrency CoinMarketCap IDs.
    • slug (string, optional): A comma-separated list of cryptocurrency slugs.
    • symbol (string, optional): One or more comma-separated cryptocurrency symbols.

Installation

Installing via Smithery

To install Cryptocurrency Data for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install coin-api-mcp --client claude

Build the Server

Clone this repository and build and install the program with your default Python interpreter (recommended).

git clone https://github.com/longmans/coin_api_mcp.git
cd coin_api_mcp
uv build
uv pip install .

After installation, you can run it as a script using:

python -m coin_api_mcp

Configuration

API Key

The server requires a CoinMarketCap API key to function. You can obtain one from CoinMarketCap’s website. The API key can be provided in two ways:

  1. As an environment variable:
export COINMARKETCAP_API_KEY=your_api_key_here
  1. As a command-line argument:
python -m coin_api_mcp --api-key=your_api_key_here

Configure for Claude.app

Add to your Claude settings:

在 GitHub 查看完整 README

安装

npx -y @smithery/cli install coin-api-mcp --client claude
新手?先看 mcpskill.org 教程 →

配置

"mcpServers": { "coin_api": { "command": "python", "args": ["-m", "coin_api_mcp"] }, "env": { "COINMARKETCAP_API_KEY": "your_api_key_here" } }