CSE

Provides real-time stock data from the Colombo Stock Exchange via MCP for searching companies and retrieving live prices.
  • typescript

4

GitHub Stars

typescript

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "shaveen12-cse-mcp": {
      "command": "npx",
      "args": [
        "cse-mcp"
      ]
    }
  }
}

You run a Model Context Protocol (MCP) server that delivers real-time stock data from the Colombo Stock Exchange (CSE). This server enables AI assistants to search for CSE-listed companies and fetch current prices, changes, and percentage changes for any CSE ticker. It supports fuzzy searches, handling typos, and provides a complete database of listed companies for quick access.

How to use

You integrate this MCP server with an MCP client to perform two core actions: search for companies and retrieve live stock data. Use the search function to find companies by name or symbol, even if you have partial names or minor typos. Use the stock data function to get the latest price and movement for a specific ticker symbol. Your MCP client will send requests to the local stdin server in real time and display results to you in a structured format.

Typical workflows include: searching for a company when you know only part of its name, then selecting the best match to get its current price, change, and percent change. You can perform multiple searches in sequence to compare several companies side by side. For automation, chain responses from the search function into stock data lookups to build quick price dashboards.

How to install

Prerequisites you need before installation:

  • Node.js 16 or higher

  • npm or yarn

Install steps

# Install the MCP server client and prepare to run in development mode
# 1) Install dependencies for the MCP server project
npm install

# 2) Build TypeScript sources (if you are cloning a TS project)
npm run build

# 3) Start in development mode to watch for changes
npm run dev

# 4) Optionally test locally with the MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.js

# If you prefer using the MCP command entry directly with npx
npx cse-mcp

Configuration and usage notes

The MCP server supports a stdio-based runtime configuration. You run the server via a local command that the MCP client can spawn. In this setup, you use npx to execute the server package.

Additional setup and notes

Environment considerations: the server queries the CSE API for real-time data. It does not require authentication for the API, but you should respect reasonable rate limits and allow up to 10 seconds per request to avoid timeouts.

Troubleshooting

If you encounter issues starting the server, ensure Node.js and npm are installed, then reinstall dependencies and rebuild. Check that your MCP client is configured to spawn the stdio server using the correct command and arguments as shown in the installation steps.

Notes

The server provides two main tools for end users: search_company to find CSE-listed companies by name or symbol with fuzzy matching, and get_stock_data to fetch real-time price data for a given ticker symbol.

Available tools

search_company

Search for CSE-listed companies by name or symbol with fuzzy matching, returning top 3 results and including id, symbol, and company name.

get_stock_data

Retrieve real-time stock price data for a specific ticker symbol, including price, change, and last updated timestamp.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational