coin-mcp-server
Coin MCP 服务器🚀💰
欢迎来到Coin MCP 服务器——一站式获取最新加密货币价格信息,速度比你说“飞向月球”还快!🌙 这款小型服务器基于FastMCP构建,并添加了zod进行验证,可以从 Bitget 的 API 获取代币价格,就像一位值得信赖的加密货币管家。🧑💼
中文文档| English
它有什么作用?🤔
这个项目启动了一个服务器,让你可以使用 Bitget 的 API 查询任何加密货币(与 USDT 配对)的当前价格。想知道你最喜欢的代币现在值多少钱吗?只需询问,价格就归你了!💸
工具:
getTokenPrice任务:获取代币(例如
BGB、BTC、ETH)的最新价格。超能力:速度快,操作简单,并且由
FastMCP提供支持!⚡工具:
getAnnoucements任务:获取公告
工具:
getCoinInfo任务:获取有关指定令牌的详细信息。
Superpower :提供代币可转移性、支持的链列表、链网络状态等详细信息。
Related MCP server: Bybit Server
特点🌟
🎯极其简单的 API :传递代币符号,即可获取价格。无需麻烦,无需处理。
🛡️ Zod 验证:参数检查比保险库门更严格。
📡 Bitget 集成:直接从 Bitget 的市场行情 API 提取实时数据。
🧠错误处理:像专业人士一样捕获错误并将其记录下来,以便您稍后取笑。
入门🏁
准备好深入加密货币价格池了吗?以下是如何启动它的方法:
先决条件
Deno :你需要安装 Deno,因为我们的界面时尚又现代。点击此处获取。
Bitget API 访问:无需 API 密钥——我们像冠军一样轻松访问公共端点!如果您有自定义的
BGURL,请将其设置为环境变量。
安装
克隆这个 repo,就像它很热门一样:
git clone https://github.com/pwh-pwh/coin-mcp-server.git cd coin-mcp-server安装依赖项(Deno 通过导入自动处理此问题!)。
运行服务器
启动它:
deno run --allow-net --allow-env --allow-read main.ts或者
deno run --allow-net --allow-env --allow-read https://deno.land/x/coin_mcp_server/main.ts--allow-net:让我们与 Bitget 的 API 对话。--allow-env:如果您已设置,则获取您的BGURL环境变量。
服务器将以stdio模式启动,准备像加密货币自动售货机一样提供价格信息!🍔
支持免安装,直接部署到 deno,fork 该项目,登录 dash.deno.com,设置环境变量 StartType=sse 即可使用 deno 提供的域名以 sse 方式连接
配置
配置.json
{
"mcpServers": {
"coin-mcp": {
"command": "deno",
"args": [
"run",
"--allow-net",
"--allow-read",
"--allow-env",
"https://deno.land/x/coin_mcp_server/main.ts"
]
}
}
}使用示例🎮
以下是调用getTokenPrice方法:
{
"tool": "getTokenPrice",
"parameters": {
"token": "BGB"
}
}回复:
"42.069" // The latest BGB/USDT price (not a real price, just vibes!)如果令牌不存在或者 API 出现问题,它会抛出一个错误,并附带一个提醒你它已经尽力了的日志。😅
代码预览👀
幕后的魔法如下:
FastMCP :使用很酷的名称和版本启动服务器。
Zod :检查您的
token参数。Bitget API :从
https://api.bitget.com/api/v2/spot/market/tickers获取股票行情数据。
getBitgetPrice函数是 MVP,它从响应中获取lastPr (最新价格)。查看日志以获取价格更新或错误信息,这可是喜剧片的精华!😂
环境变量🌍
BGURL:自定义 Bitget API 基础 URL(未设置时默认为https://api.bitget.com)。设置方式如下:export BGURL="https://your-custom-bitget-url.com"
故障排除🛠️
“HTTP 错误!状态:404” :请仔细检查您的代币符号。BGBUSDT
BGB``BGBUSDT!“网络错误” :确保您已连接到互联网并启用了 Deno 的
--allow-net标志。还卡住吗? :大声喊出来(或者开个 issue)。我们一起解决!🙌
为什么存在🎉
谁不想实时了解自己加密货币的价格呢?无论您是交易员、持币者,还是只是对加密货币感兴趣,这款服务器都能为您提供支持。此外,它还是一种锻炼 Deno 技能和使用 API 的有趣方式。😎
贡献🤝
有想法?发现 bug 了?想添加类似月相价格预测的功能吗?快来 fork 它,调整它,提交 PR!让我们一起把它打造成全银河系最酷的 MCP 服务器吧!🌌
许可证📜
MIT——你想怎么用就怎么用,只是别怪我,如果你的代币涨跌互现!🌑📉
祝你加密货币狩猎愉快,愿你的行李永远是绿色的!💚
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceInteract with Upbit cryptocurrency exchange services to retrieve market data, manage accounts, and execute trades. Simplify your trading experience with tools for order management, deposits, withdrawals, and technical analysis.1017MIT
- AlicenseBqualityDmaintenanceInteract seamlessly with the Bybit API to fetch market data, manage your account, and execute trades. Leverage powerful tools to enhance your trading experience and automate your strategies effortlessly. If you wish to use an API key restricted to your personal IP address, you must configure the MCP159MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Bitget cryptocurrency exchange for spot and futures trading. Supports real-time market data, order management, account balances, leverage control, and position tracking with demo trading capabilities.175MIT
- AlicenseNot gradedqualityDmaintenanceProvides real-time cryptocurrency market data from Binance API, including price queries, 24h statistics, K-line data, market trend analysis, and order book depth information for trading analysis.121MIT
Related MCP Connectors
Real-time crypto prices from Binance, Coinbase, Kraken, OKX, and Bybit
Provide real-time cryptocurrency price data and market analysis.
Bity crypto bank (Bitybank / Bitypreço), account balance per coin, market data (ticker, order book,
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pwh-pwh/coin-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server