Welcome to the Coin MCP Server â your one-stop shop for snagging the latest cryptocurrency prices faster than you can say "To the moon!" ð Built with FastMCP and spiced up with zod for validation, this little server is here to fetch token prices from Bitgetâs API like a trusty crypto butler. ð§âðŒ äžæææ¡£ | English This project spins up a server that lets you query the current price of any cryptocur
Add this skill
npx mdskills install pwh-pwh/coin-mcp-serverProvides real-time cryptocurrency price queries via Bitget API with clear setup and multiple tools
1# Coin MCP Server ðð°23Welcome to the **Coin MCP Server** â your one-stop shop for snagging the latest cryptocurrency prices faster than you can say "To the moon!" ð Built with `FastMCP` and spiced up with `zod` for validation, this little server is here to fetch token prices from Bitgetâs API like a trusty crypto butler. ð§âðŒ45[äžæææ¡£](README-cn.md) | English67---89## What Does It Do? ð€1011This project spins up a server that lets you query the current price of any cryptocurrency (paired with USDT) using Bitgetâs slick API. Want to know how much your favorite token is worth right now? Just ask, and boom â the price is yours! ðž1213- **Tool**: `getTokenPrice`14- **Mission**: Fetch the latest price of a token (e.g., `BGB`, `BTC`, `ETH`).15- **Superpower**: Itâs fast, itâs simple, and itâs powered by `FastMCP`! â¡1617- **Tool**: `getAnnoucements`18- **Mission**: get annoucements1920- **Tool**: `getCoinInfo`21- **Mission**: Get detailed information about a specified token.22- **Superpower**: Provides detailed information such as token transferability, supported chain list, chain network status, etc.2324---2526## Features ð2728- ð¯ **Dead-Simple API**: Pass a token symbol, get a price. No fuss, no muss.29- ð¡ïž **Zod Validation**: Parameters are checked tighter than a vault door.30- ð¡ **Bitget Integration**: Pulls live data straight from Bitgetâs market ticker API.31- ð§ **Error Handling**: Catches hiccups like a pro and logs them for you to giggle at later.3233---3435## Getting Started ð3637Ready to dive into the crypto price pool? Hereâs how to get this baby running:3839### Prerequisites40- **Deno**: Youâll need Deno installed because weâre fancy and modern. Grab it [here](https://deno.land/).41- **Bitget API Access**: No API key needed â weâre hitting the public endpoint like champs! But if youâve got a custom `BGURL`, set it as an environment variable.4243### Installation441. Clone this repo like itâs hot:45 ```bash46 git clone https://github.com/pwh-pwh/coin-mcp-server.git47 cd coin-mcp-server48 ```492. Install dependencies (Deno handles this automagically via imports!).5051### Running the Server52Fire it up with:53```bash54deno run --allow-net --allow-env --allow-read main.ts55```5657or58```bash59deno run --allow-net --allow-env --allow-read https://deno.land/x/coin_mcp_server/main.ts60```6162- `--allow-net`: Lets us talk to Bitgetâs API.63- `--allow-env`: Grabs your `BGURL` env variable if youâve set one.6465The server will start in `stdio` mode, ready to serve up prices like a crypto vending machine! ð66673. Support installation-free, directly deploy to deno, fork this project, log in dash.deno.com, set the environment variable StartType=sse to use the domain name provided by deno to connect in sse mode6869---7071### Configuration7273config.json74```json75{76 "mcpServers": {77 "coin-mcp": {78 "command": "deno",79 "args": [80 "run",81 "--allow-net",82 "--allow-read",83 "--allow-env",84 "https://deno.land/x/coin_mcp_server/main.ts"85 ]86 }87 }88}89```9091## Usage Example ð®9293Hereâs how youâd call `getTokenPrice`:94```json95{96 "tool": "getTokenPrice",97 "parameters": {98 "token": "BGB"99 }100}101```102103**Response**:104```105"42.069" // The latest BGB/USDT price (not a real price, just vibes!)106```107108If the token doesnât exist or the API hiccups, itâll throw an error with a cheeky log to remind you it tried its best. ð109110---111112## Code Sneak Peek ð113114Hereâs the magic behind the curtain:115- **FastMCP**: Spins up the server with a cool name and version.116- **Zod**: Keeps your `token` parameter in check.117- **Bitget API**: Fetches ticker data from `https://api.bitget.com/api/v2/spot/market/tickers`.118119The `getBitgetPrice` function is the MVP, grabbing that sweet `lastPr` (last price) from the response. Check the logs for price updates or error comedy gold! ð120121---122123## Environment Variables ð124125- `BGURL`: Custom Bitget API base URL (defaults to `https://api.bitget.com` if not set). Set it like:126 ```bash127 export BGURL="https://your-custom-bitget-url.com"128 ```129130---131132## Troubleshooting ð ïž133134- **âHTTP error! status: 404â**: Double-check your token symbol. `BGBUSDT` isnât the same as `BGB`!135- **âNetwork errorâ**: Make sure youâve got internet and Denoâs `--allow-net` flag.136- **Still stuck?**: Yell into the void (or open an issue). Weâll figure it out together! ð137138---139140## Why This Exists ð141142Because who doesnât want to know the price of their crypto stash in real-time? Whether youâre a trader, a HODLer, or just crypto-curious, this serverâs got your back. Plus, itâs a fun way to flex some Deno skills and play with APIs. ð143144---145146## Contributing ð€147148Got ideas? Found a bug? Want to add a feature like moon phase price predictions? Fork it, tweak it, PR it! Letâs make this the coolest MCP server in the galaxy. ð149150---151152## License ð153154MIT â Do whatever you want with it, just donât blame me if your token moons or dumps! ðð155156---157158Happy crypto hunting, and may your bags always be green! ð159
Full transparency â inspect the skill content before installing.