CSE Market MCP Server
Provides technical indicators (RSI, MACD, Bollinger Bands, EMA, SMA) and trading signals from TradingView for Colombo Stock Exchange stocks.
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 Market MCP ServerWhat is the current price of SAMP.N0000?"
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 Market MCP Server
Model Context Protocol server for the Colombo Stock Exchange (CSE). Use with Claude Desktop, Cursor, Windsurf, or any MCP-compatible AI client.
Data Sources
Source | Used for |
cse.lk/api/ | Real-time prices, market summary, sectors, trades |
TradingView | RSI, MACD, Bollinger Bands, EMA, SMA, signals |
Related MCP server: CSE MCP Server
Setup
1. Install dependencies
cd cse-market-mcp
pip install -r requirements.txt Or without the package:
pip install mcp requests tradingview_taAll tests should show PASS. Compare the numbers manually against:
https://www.cse.lk (for prices, sectors, summary)
https://www.tradingview.com/symbols/CSELK-LOLCN0000/technicals/ (for indicators)
Connect to Claude Desktop
Find your Claude configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Editing the JSON File (For Beginners)
This configuration uses standard JSON format. If you haven't edited a JSON file before, here are a few critical rules to avoid errors:
Curly Braces: The entire file must be enclosed in an opening and closing curly brace
{ }.Commas: If you already have other settings in this file (like
"preferences"), ensure you separate the new"mcpServers"block from the other settings with a comma,.Absolute Paths: Ensure the file paths to your Python executable and
server.pyare absolute (e.g., starts with/Users/name/...orC:\Users\name\...).
If your configuration file is currently completely empty or doesn't exist, you can simply copy, paste, and save the following complete block. Make sure to replace the placeholder paths with your actual paths!
{
"mcpServers": {
"cse-market": {
"command": "/absolute/path/to/your/python/executable",
"args": [
"/absolute/path/to/CSE_MCP/src/cse_mcp/server.py"
]
}
}
}Once saved, restart Claude Desktop for the changes to take effect.
Connect to Cursor / Windsurf
Same config format — both support MCP. Add the same JSON block to their respective MCP config files (check their docs for the exact path).
Tools Available
Tool | Description |
get_stock_price | Real-time price, change, market cap for one stock |
get_market_summary | ASPI and S&P SL20 index values and daily stats |
get_sectors | All CSE sectors with change and turnover |
get_chart_data | Historical OHLCV for 1D / 1W / 1M / 3M / 6M / 1Y |
get_top_gainers | Today's biggest price gainers |
get_top_losers | Today's biggest price losers |
get_top_volume | Today's most actively traded stocks |
get_technical_indicators | Full RSI, MACD, BB, EMA, SMA for one stock |
get_bulk_indicators | Summary indicators for multiple stocks at once |
screen_by_recommendation | Filter stocks by BUY / SELL / NEUTRAL signal |
screen_by_rsi | Filter stocks by RSI range (e.g. oversold < 30) |
Example Questions to Ask Claude (Test Prompts)
After connecting, try asking the AI some of these targeted analysis questions:
Basic Checks
Basic price check: What is the current price of SAMP.N0000?
Market overview: Give me today's CSE market summary. What is the ASPI and S&P SL20?
Sector analysis: Which CSE sectors are performing best today? Show me the top 5 by percentage change.
Top movers: Show me today's top 10 gainers and top 5 losers on the Colombo Stock Exchange.
Comprehensive Screening & Comparison
Compare multiple stocks: Compare these stocks technically: LOLC.N0000, JKH.N0000, COMB.N0000, DIAL.N0000, SAMP.N0000. Which ones have a BUY signal?
Screener: From this watchlist — LOLC.N0000, JKH.N0000, COMB.N0000, DIAL.N0000, SAMP.N0000 — which stocks are oversold right now (RSI below 40)?
Investment decision prompt: I am thinking of buying DIAL. Fetch the current price, RSI, MACD, and Bollinger Bands on the daily timeframe. Based on the technical signals, is this a good entry point?
Heavy multi-tool prompt: Give me a full CSE market report for today:
ASPI and S&P SL20 values
Top 3 gaining and losing sectors
Top 5 stocks by volume
Technical signal (BUY/SELL/NEUTRAL) for LOLC, JKH, COMB, DIAL, SAMP
Multi-Month Trend Analysis
Basic 6-Month Analysis: Analyze LOLC.N0000 performance over the last 6 months. Get the chart data and technical indicators on the weekly timeframe.
Basic 6-Month Analysis: How has COMB.N0000 performed over the past 6 months? Show price trend, RSI, and MACD on the weekly chart.
Trend & Momentum: Fetch 6 months of chart data for JKH.N0000. Is the stock in an uptrend or downtrend? Support your answer with EMA20, SMA50, and MACD signals.
Trend & Momentum: Based on DIAL.N0000 weekly indicators, has the momentum been increasing or decreasing over the last 6 months? Check RSI trend and MACD crossover signals.
Risk & Entry Points
Entry Point Decision: I want to buy SAMP.N0000. Based on 6 months of weekly chart data and current RSI and Bollinger Band position, is this a good time to enter or should I wait for a pullback?
Entry Point Decision: COMB.N0000 has been on my watchlist for 6 months. Get the weekly technical indicators and tell me if the stock is currently overbought, oversold, or at a fair entry point.
Risk Assessment: Fetch 6 months of LOLC.N0000 data on the weekly chart. How wide are the Bollinger Bands? Is the stock showing high volatility or is it consolidating?
Risk Assessment: Based on 6-month weekly data for JKH.N0000, what is the current support level (BB lower) and resistance level (BB upper)? Where is the price sitting right now relative to those levels?
Full Reports
Full Report Style: Give me a 6-month performance report for DIAL.N0000:
Fetch the 6-month chart data
Get weekly technical indicators
Current RSI, MACD, and Bollinger Band position
Overall TradingView recommendation (BUY/SELL/NEUTRAL)
Your view on whether the stock looks bullish or bearish for the next month
Comparison Over 6 Months: Compare COMB.N0000 and SAMP.N0000 over 6 months. Get weekly technical indicators for both. Which stock has stronger momentum right now?
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/Pahinithi/cse-market-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server