Kotlin Crypto Price Spring MCP Server Demo
@gaplo917
Kotlin Spring AI MCP server demo. Getting Cryptocurrency pricing from Binance
Overview
What is Kotlin Crypto Price Spring MCP Server Demo?
A demonstration project that integrates Spring AI’s Model Context Protocol (MCP) server with a cryptocurrency price API service, allowing AI models to retrieve real-time cryptocurrency information through a standardized interface. It uses Kotlin, Spring Boot 3.4.4, and the CoinGecko API.
How to use Kotlin Crypto Price Spring MCP Server Demo?
Requires JDK 21 or higher and Gradle. Run with ./gradlew bootRun; the MCP server starts on port 8080 by default. AI models communicate via the exposed MCP tools: searchCryptocurrency(query) and getMarketDataByCryptocurrencyId(id).
Key features of Kotlin Crypto Price Spring MCP Server Demo
- Search cryptocurrencies, exchanges, categories, and NFTs by user query.
- Retrieve detailed market data for a specific cryptocurrency.
- Exposes functionality as tools for AI models via Spring AI MCP.
- Comprehensive logging of tool requests and responses.
- Built with Kotlin 1.9.25 and Spring Boot 3.4.4.
Use cases of Kotlin Crypto Price Spring MCP Server Demo
- AI assistants answering real-time cryptocurrency questions.
- Automated price monitoring via AI model tool calls.
- Demo for integrating Spring Boot MCP servers with crypto data.
FAQ from Kotlin Crypto Price Spring MCP Server Demo
What API does this server use to fetch cryptocurrency data?
It uses the CoinGecko API to retrieve real-time cryptocurrency information.
What are the runtime dependencies?
JDK 21 or higher and Gradle are required to build and run the application.
What tools does the server expose to AI models?
It exposes two tools: searchCryptocurrency (search by query) and getMarketDataByCryptocurrencyId (get market data by a coin ID from the search results).
Where does the cryptocurrency data come from?
All data is fetched live from the CoinGecko API; no local database is used.
What transport or authentication does the server use?
The README does not specify transport or authentication details beyond starting on default port 8080.