Skip to main content
Glama

CoinGecko MCP Server

index.js725 B
// src/index.ts import { CoinGeckoMCPServer } from "./server.js"; import { CoinGeckoService } from "./services/coingecko.js"; import * as dotenv from 'dotenv'; dotenv.config(); // Export for use as a library export { CoinGeckoService, CoinGeckoMCPServer }; // Run as standalone server if executed directly if (import.meta.url === `file://${process.argv[1]}`) { const apiKey = process.env.COINGECKO_API_KEY; if (!apiKey) { console.error("COINGECKO_API_KEY is not set in the environment variables"); process.exit(1); } const server = new CoinGeckoMCPServer(apiKey); server.start().catch((error) => { console.error("Fatal error in main():", error); process.exit(1); }); }

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/crazyrabbitLTC/mcp-coingecko-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server