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., "@CSE MCP Serverwhat's the current stock price of John Keells Holdings?"
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.
CSE MCP Server
A Model Context Protocol (MCP) server that provides real-time stock market data from the Colombo Stock Exchange (CSE). This server enables AI assistants to search for companies and retrieve current stock prices from the Sri Lankan stock market.
Features
Company Search: Search for CSE-listed companies by name or symbol with fuzzy matching
Real-time Stock Data: Get current price, change, and percentage change for any CSE ticker
Fuzzy Matching: Find companies even with typos or partial names
308 Companies: Complete database of all CSE-listed companies
Installation with MCP Clients
Claude Desktop / Claude Code
Using Claude CLI (Recommended)
Manual Configuration
Alternatively, add to your Claude configuration (~/Library/Application Support/Claude/claude_desktop_config.json on Mac):
Other MCP Clients
Use the following command configuration:
Command:
npxArguments:
["cse-mcp"]
Available Tools
1. search_company
Search for companies listed on the Colombo Stock Exchange.
Input:
query(string): Company name or symbol to search
Features:
Returns top 3 matches using fuzzy search
Searches both symbol and company name
Handles typos and partial matches
Example:
Response:
2. get_stock_data
Get real-time stock price data for a specific ticker symbol.
Input:
symbol(string): Exact ticker symbol (e.g., "JKH.N0000")
Features:
Validates symbol against company database
Fetches real-time data from CSE API
Returns price in Sri Lankan Rupees (Rs.)
Example:
Response:
Development
Prerequisites
Node.js 16 or higher
npm or yarn
Building from Source
Project Structure
API Rate Limits
The CSE API has the following considerations:
No authentication required
Reasonable rate limiting is recommended
Timeout set to 10 seconds per request
Data Source
Company data and real-time prices are sourced from the Colombo Stock Exchange.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
License
This project is licensed under the ISC License - see the package.json file for details.
Disclaimer
This tool is for informational purposes only. Stock market data may be delayed. Always verify data with official sources before making investment decisions.
Support
For issues, questions, or suggestions, please open an issue on GitHub.
Acknowledgments
Colombo Stock Exchange for providing the data API
Model Context Protocol for the MCP SDK