crypto_price_tracker
Click on "Install 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., "@crypto_price_trackerwhat's the current price of Bitcoin?"
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.
šŖ MCP Crypto Price Lookup Server using ALPACA API
This project sets up a cryptocurrency price lookup service powered by the ALPACA API and built for integration with MCP (Multi-Agent Control Protocol).
The server allows AI agents or clients to fetch real-time cryptocurrency prices and market data efficiently using Alpaca's API.
š¦ Step 1: Set Up the Environment with uv
We'll use uv ā a fast, modern Python package manager ā to create and manage the project environment.
š ļø Installation & Setup
Run these commands in your terminal (not in Jupyter):
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create and navigate to your project directory
mkdir mcp-crypto-server
cd mcp-crypto-server
# Initialize a new project
uv init
# Create and activate the virtual environment
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install required dependencies
uv add "mcp[cli]" httpxRelated MCP server: coingecko-mcp-server
Step 2: Running the MCP Server
Once the environment is set up, we're ready to build and run our crypto price lookup tool. Copy the server script from the scripts folder:
cp ../mcp_server.py .
Start the MCP server:
uv run mcp_server.pyš” Check out mcp_server.py for implementation details on how the tool interfaces with the Alpaca API.
About the Server
The MCP-compatible server includes tools that:
Fetch real-time crypto prices (e.g., BTC/USD, ETH/USD)
Access market data using Alpaca's REST API
Serve AI agents with quick, formatted responses
Step 3: Configure Your MCP Server
Add the following to your MCP config to register the server:
{
"mcpServers": {
"crypto-price-tracker": {
"command": "/ABSOLUTE/PATH/TO/uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/GenAI_Agents//mcp-crypto-server",
"run",
"mcp_server.py"
]
}
}
}š Replace /ABSOLUTE/PATH/TO/... with the full paths to your uv binary and project folder.
Step 4: Restart Claude Desktop for the changes to take effect.
Step 5: Try ask the price of Bitcoin
You can add your own tools to mcp_server.py
"""
This script demonstrates how to create a simple MCP server that fetches
the current price of a cryptocurrency using the CoinGecko API.
It uses the FastMCP library to create the server and handle requests.
"""
import httpx
from dotenv import load_dotenv
from mcp.server.fastmcp import FastMCP
load_dotenv()
COINGECKO_BASE_URL = "https://api.coingecko.com/api/v3"
# Create our MCP server with a descriptive name
mcp = FastMCP("crypto_price_tracker")
# Now let's define our first tool - getting the current price of a cryptocurrency
@mcp.tool()
async def get_crypto_price(crypto_id: str, currency: str = "usd") -> str:
"""
Get the current price of a cryptocurrency in a specified currency.
Parameters:
- crypto_id: The ID of the cryptocurrency (e.g., 'bitcoin', 'ethereum')
- currency: The currency to display the price in (default: 'usd')
Returns:
- Current price information as a formatted string
"""
# Construct the API URL
url = f"{COINGECKO_BASE_URL}/simple/price"
# Set up the query parameters
params = {
"ids": crypto_id,
"vs_currencies": currency
}
try:
# Make the API call
async with httpx.AsyncClient() as client:
response = await client.get(url, params=params)
response.raise_for_status() # Raise an exception for HTTP errors
# Parse the response
data = response.json()
# Check if we got data for the requested crypto
if crypto_id not in data:
return f"Cryptocurrency '{crypto_id}' not found. Please check the ID and try again."
# Format and return the price information
price = data[crypto_id][currency]
return f"The current price of {crypto_id} is {price} {currency.upper()}"
except httpx.HTTPStatusError as e:
return f"API Error: {e.response.status_code} - {e.response.text}"
except Exception as e:
return f"Error fetching price data: {str(e)}"
# You can add more tools here, following the same pattern as above
# Run the MCP server
# This will start the server and listen for incoming requests
if __name__ == "__main__":
mcp.run()š Then Level Up: Build the yFinance Stock Server
Once you're familiar with the flow, move on to this more advanced stock tracker š¹
š GitHub Repo: https://github.com/Adity-star/mcp-yfinance-server
š Detailed Blog: š How I Built My Own Stock Server with Python, yFinance, and a Touch of Nerdy Ambition
Enjoy Learnings !
Available Tools
1 toolget_crypto_market_infoA
Get market information for one or more cryptocurrencies using Alpha Vantage.
Parameters:
- crypto_ids: Comma-separated list of cryptocurrency symbols (e.g., 'BTC,ETH')
- currency: The fiat currency to compare against (default: 'USD')
Returns:
- Current exchange rates for each cryptocurrency.
| Name | Required | Description | Default |
|---|---|---|---|
| currency | No | USD | |
| crypto_ids | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states that it returns current exchange rates, but it does not mention that it makes an external API call (to Alpha Vantage), potential rate limits, authentication requirements, or possible failure modes. For a tool that performs network I/O, this lack of transparency is a notable gap.
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 concise and well-structured. It front-loads the purpose, then lists parameters with examples, and concludes with the return type. Every sentence is informative, and there is no redundant or vague content.
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 simplicity (two parameters, no output schema, no annotations), the description covers the essential information: purpose, parameters, and return value. However, it could be more complete by describing the exact structure of the returned exchange rates or noting any constraints (e.g., maximum number of symbols). Still, it is sufficient for a basic getter tool.
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 input schema has no descriptions for its parameters (0% coverage), so the description fully compensates. It provides clear semantics for crypto_ids ('Comma-separated list of cryptocurrency symbols (e.g., 'BTC,ETH')') and currency ('The fiat currency to compare against (default: 'USD')'), including an example and the default value. This adds significant value beyond what the schema provides.
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 function: 'Get market information for one or more cryptocurrencies using Alpha Vantage.' It specifies the verb (get), the resource (market information for cryptocurrencies), and the data source (Alpha Vantage). This is unambiguous and distinct even in the absence of sibling tools.
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 gives clear context that this tool is used for obtaining cryptocurrency market information, and it explains the required parameters. It does not explicitly mention alternatives or when not to use it, but since there are no sibling tools, this is adequate. It could be improved by noting that it provides current exchange rates but not historical data, but this is not a major gap.
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. Dates show when Glama detected each change.
1 tool update
v0.1.0- First observed
get_crypto_market_info
TDQS
With only one tool, there is no possibility of confusing it with another. The tool's purpose is clearly defined and distinct.
The single tool follows a clear verb_noun pattern ('get_crypto_market_info'), which is consistent with standard naming conventions and leaves no room for inconsistency.
The server has only one tool, which is extremely thin for a typical MCP server. A crypto price tracker would typically need additional capabilities such as historical data, symbol discovery, or alerts to be useful.
The tool covers the core need of fetching current exchange rates, but it lacks obvious complementary features like historical data or a way to list supported cryptocurrencies, leaving notable gaps for a price tracking domain.
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 Connectors
MCP server giving AI agents one-connection access to crypto & DeFi data: DeFi protocol TVL, stableco
Unlock the power of real-time cryptocurrency data with our Crypto Price Insights MCP server.
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseBqualityFmaintenanceAn MCP server that provides cryptocurrency project data to AI agents11MIT
- AlicenseNot gradedqualityAmaintenanceMCP server providing market data for 15,000+ cryptocurrencies including prices, history, trends, and deep coin metadata via CoinGecko.1011Apache 2.0
- AlicenseNot gradedqualityCmaintenanceAn MCP server that gives AI agents the ability to check crypto wallet balances, track token prices, calculate portfolio value, monitor gas prices, and track the Fear & Greed Index ā all with zero external dependencies using free public APIs.MIT
- AlicenseAqualityBmaintenanceAn MCP server that exposes CoinGecko crypto market data as tools ā get spot prices and find cross-exchange arbitrage spreads without needing an API key.310MIT
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/Adity-star/mcp-crypto-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server