Kite Spring MCP Server
@Kartikhub
A Java implementation of Zerodha's Kite trading API as a Model Context Protocol (MCP) server using Spring Boot. This project enables AI agents to interact with the Kite trading platform through a standardized protocol, providing authentication and portfolio data access tools. Ins
Overview
What is Kite Spring MCP Server?
Kite Spring MCP Server is a Java implementation of Zerodha's Kite API as a Model Context Protocol (MCP) server built with Spring Boot. It provides a communication bridge between AI agents and the Kite trading platform, allowing agents to authenticate users and access trading information through defined tools.
How to use Kite Spring MCP Server?
Set environment variables KITE_API_KEY and KITE_API_SECRET. Build with mvn clean package and run java -jar target/kite-spring-mcp-1.0-SNAPSHOT.jar. The server starts on port 8080. Configure AI agents (e.g., VS Code) to use SSE endpoint http://localhost:8080/mcp/sse.
Key features of Kite Spring MCP Server
- OAuth-based authentication with Zerodha Kite
- Session management for maintaining user context
- Two MCP tools:
loginandget_holdings - Built with Spring Boot and Java 21
- Supports Server-Sent Events (SSE) transport
Use cases of Kite Spring MCP Server
- AI agent authenticates a user via OAuth login URL
- AI agent retrieves user's portfolio holdings
- Developers extend the server with additional Kite API tools
- Integrate Zerodha trading data into AI workflows
FAQ from Kite Spring MCP Server
What dependencies are required?
Java 21 or higher, Maven, and Zerodha Kite API credentials.
What transport does it use?
It uses Server-Sent Events (SSE) for communicating with AI agents.
How do I authenticate with the trading platform?
Use the login tool which provides an OAuth login URL for the user to authenticate.
Can I add more tools to the server?
Yes, by creating new tool classes in the io.github.kartikhub.tool package and registering them.
Is this implementation production-ready?
It is a proof-of-concept with only two tools implemented (login and get_holdings).