Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

CSE Market Server

БесплатноНе проверен

Enables querying real-time and historical Colombo Stock Exchange data, including prices, sectors, top movers, and technical indicators like RSI and MACD, for AI

GitHubEmbed

Описание

Enables querying real-time and historical Colombo Stock Exchange data, including prices, sectors, top movers, and technical indicators like RSI and MACD, for AI-assisted market analysis.

README

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

Setup

1. Install dependencies

cd cse-market-mcp
pip install -r requirements.txt  

Or without the package:

pip install mcp requests tradingview_ta

All tests should show PASS. Compare the numbers manually against:


Connect to Claude Desktop

Find your Claude configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %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:

  1. Curly Braces: The entire file must be enclosed in an opening and closing curly brace { }.
  2. 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 ,.
  3. Absolute Paths: Ensure the file paths to your Python executable and server.py are absolute (e.g., starts with /Users/name/... or C:\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:
    1. ASPI and S&P SL20 values
    2. Top 3 gaining and losing sectors
    3. Top 5 stocks by volume
    4. 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:
    1. Fetch the 6-month chart data
    2. Get weekly technical indicators
    3. Current RSI, MACD, and Bollinger Band position
    4. Overall TradingView recommendation (BUY/SELL/NEUTRAL)
    5. 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?

from github.com/Pahinithi/cse-market-mcp-server

Установка CSE Market Server

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/Pahinithi/cse-market-mcp-server

FAQ

CSE Market Server MCP бесплатный?

Да, CSE Market Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для CSE Market Server?

Нет, CSE Market Server работает без API-ключей и переменных окружения.

CSE Market Server — hosted или self-hosted?

Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.

Как установить CSE Market Server в Claude Desktop, Claude Code или Cursor?

Открой CSE Market Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare CSE Market Server with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории ai