Cse Mcp Intelligence — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Cse Mcp Intelligence (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Institutional-grade MCP server for the Colombo Stock Exchange. Features real-time market data, order flow pressure analysis, and AI-powered forensic fundamental screening.
# Clone repository
git clone https://github.com/hareeshkar/cse-mcp-intelligence.git
cd cse-mcp-intelligence
# Install dependencies
npm install
# Build
npm run build
# Run with Claude
npm startModel Context Protocol (MCP) enables Claude and other AI models to access external data sources and APIs in real-time. Instead of relying on static training data, Claude can now fetch live market information from the CSE API.
git clone https://github.com/hareeshkar/cse-mcp-intelligence.git
cd cse-mcp-intelligence npm install npm run buildEdit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"cse": {
"command": "node",
"args": ["/full/path/to/cse-mcp-intelligence/build/index.js"]
}
}
}Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"cse": {
"command": "node",
"args": ["C:\\full\\path\\to\\cse-mcp-intelligence\\build\\index.js"]
}
}
}⚠️ Important: Replace the path with your actual project location.
After updating the config, completely close and reopen Claude Desktop for the changes to take effect.
#### scan_market Get all stocks trading on the Colombo Stock Exchange with filtering capabilities.
Parameters:
maxPrice (number, optional) - Filter for penny stocks below this price in LKRminVolume (number, optional) - Only show stocks with volume above threshold (filters illiquid stocks)Returns: Array of stocks with symbol, name, current price, change %, and volume
Use Cases:
scan_market { maxPrice: 50 }scan_market { minVolume: 100000 }#### get_sectors Performance data for all CSE market sectors.
Returns: Sector names with change %, turnover, market capitalization
Use Cases:
#### get_market_status Real-time market status - check if trading is active.
Returns: Open/Closed status, current timestamp, trading hours
#### get_market_summary Comprehensive daily market overview with macro indicators.
Returns: P/E ratio, P/B ratio, foreign investor flow, total turnover, market mood
#### get_top_gainers Stocks with highest percentage gains today.
Parameters:
limit (number, optional, default: 10) - How many top performers to showReturns: Top performers with price action and volume data
#### get_top_losers Stocks with highest percentage losses today.
Parameters:
limit (number, optional, default: 10) - How many bottom performers to showReturns: Oversold stocks useful for contrarian or risk assessment
#### get_stock_detail Complete detailed information about a specific stock.
Parameters:
symbol (required) - Stock symbol (e.g., "SLTL", "ASPI", "LAUGF")Returns: Company profile, current price, P/E ratio, dividends, 52-week high/low, trading stats
Use Cases:
#### get_stock_trades Recent trade history for order flow analysis.
Parameters:
symbol (required) - Stock symbollimit (optional, default: 20) - Number of recent tradesReturns: Timestamps, executed prices, volumes, trade direction (buy/sell)
Use Cases:
#### get_order_book Live market depth with order flow pressure analysis.
Parameters:
symbol (required) - Stock symbolReturns:
Use Cases:
#### get_candlesticks OHLC (Open, High, Low, Close) data for technical analysis.
Parameters:
symbol (required) - Stock symbolperiod (optional, default: "1d") - Time period ("1d", "1w", "1m")Returns: Candlestick data with open, high, low, close prices and volume
Use Cases:
Query: "Find all penny stocks under Rs. 50 with high trading volume"
Tool: scan_market { maxPrice: 50, minVolume: 500000 }
→ Get list of actively traded penny stocks for swing tradingQuery: "Which sectors are outperforming today? Show me the leaders."
Tool: get_sectors
→ Identify hot sectors and potential rotation candidatesQuery: "Can I buy 10,000 shares of SLTL without moving the price too much?"
Tool: get_order_book { symbol: "SLTL" }
→ Check bid-ask spread, depth, and available liquidityQuery: "Show me the last 50 trades on ASPI - is it institutional buying or selling?"
Tool: get_stock_trades { symbol: "ASPI", limit: 50 }
→ Analyze trade timing and sizes to identify smart money activityQuery: "Show SLTL candlesticks and confirm the resistance breakout"
Tool: get_candlesticks { symbol: "SLTL", period: "1d" }
→ Get OHLC data for pattern recognition and trend analysisQuery: "What percentage of stocks are down today? Any panic selling?"
Tool: get_top_losers { limit: 20 }
→ Identify oversold conditions and panic-driven opportunities#### 1. CSE API Client (src/cse-client.ts)
getAllStocks() - Market scangetStockDetail(symbol) - Detailed fundamental datagetOrderBook(symbol) - Real-time market depthgetTradeHistory(symbol, limit) - Order flow analysisgetCandlesticks(symbol, period) - Technical data#### 2. Tool Definitions & Handlers (src/tools.ts)
scan_market - Market scanning with filtersget_sectors - Sector performanceget_market_status - Trading statusget_market_summary - Macro indicatorsget_top_gainers / get_top_losers - Performance leaders/laggardsget_stock_detail - Fundamental analysisget_stock_trades - Trade history/order flowget_order_book - Market depthget_candlesticks - Technical analysis#### 3. MCP Server (src/index.ts)
Claude Desktop
↓
[MCP Server] ← Claude makes tool request (JSON-RPC)
↓
[Tool Router] ← Validates parameters
↓
[CSE Client] ← Fetches data from API
↓
Colombo Stock Exchange API
↓
[Cache Layer] ← 30-second cache for same requests
↓
[Response Formatter] ← Cleans and structures data
↓
Claude ← Gets structured market data for analysisThe system implements smart caching to optimize performance:
The server connects to these CSE API endpoints:
/v1/stocks - All stocks with live prices/v1/stocks/{id} - Stock detail & fundamentals/v1/stocks/{id}/orderbook - Market depth/v1/stocks/{id}/trades - Trade history/v1/sectors - Sector performance/v1/market - Overall market statusnpm run build # Compile TypeScript to JavaScript
npm start # Run the MCP server
npm run dev # Run in development mode with hot reloadclaude_desktop_config.json is correct and absolutenpm run buildcurl https://api.cse.lk/api/v1/marketbuild/ and node_modules/ foldersnpm install and npm run build againThis project is open to contributions! Areas for enhancement:
MIT License - See LICENSE file for details
Hareesh Karravi - @hareeshkar
Questions? Open an issue on GitHub or check the documentation files.
Ask questions naturally:
"What are the top 5 gainers on CSE today?""Show me the current price and order book for JKH.N0000""Which stocks are trading under 10 LKR?""Get the financial reports for DIALOG.N0000""What's the market P/E ratio and which sectors are performing best?""List all companies currently on the non-compliance watch list"Run the development server:
npm run devnpm run build
npm startcse-mcp-server/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── cse-client.ts # CSE API wrapper (12 atomic tools)
│ └── tools.ts # Tool definitions for Claude
├── build/ # Compiled JavaScript (auto-generated)
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── .env.example # Environment template
└── README.md # This filehttps://www.cse.lk/api
The CSE API does not publicly advertise rate limits, but best practice suggests:
# Check Node.js version
node --version # Should be v18+
# Check if port 3000 is available
# Or rebuild everything
rm -rf build/ node_modules/
npm install
npm run buildclaude_desktop_config.json is correctnpm run buildscan_market to get list of valid symbolsThis tool provides educational access to public CSE data. Always conduct your own due diligence before making investment decisions. The authors are not responsible for any financial losses.
MIT
Created for CSE market research and analysis
For issues, feature requests, or improvements:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.