MCP server that gives Claude (and other AIs) live Colombo Stock Exchange market data.
Give Claude (or any AI) live Colombo Stock Exchange data. No more copy-pasting prices into chat.
You: How did banks do today vs the ASPI? Anything interesting from COMB? Claude: *checks get_market_overview, get_sector_indices, get_stock, get_announcements* The ASPI closed +2.75% at 22,123. Banks did even better (+3.7%). COMB ended at LKR 225.25 (+4.3%) on 1.5M shares... cse-mcp is an MCP server. MCP is a standard "plug" that lets AI apps use tools. This one connects your AI to the public data behind cse.lk, so its answers use current prices, indices and announcements.
Claude Desktop sets up Python and everything else for you.
claude mcp add cse -- uvx cse-mcp Or install it as a plugin, which adds a market-analyst skill too:
/plugin install cse-mcp --marketplace lxnid/cse-mcp Cursor, VS Code, Windsurf, Claude Desktop (manual), and other MCP apps Add this to the app's MCP config:
{ "mcpServers": { "cse": { "command": "uvx", "args": ["cse-mcp"] } } } This needs uv, the fast Python package manager (brew install uv, or see the link for Windows). Python itself is downloaded automatically.
It's also listed in the official MCP Registry as io.github.lxnid/cse-mcp, so apps that browse the registry can find it.
Not yet. Web and mobile apps can only reach servers hosted on the internet, and this one runs on your computer. You can host it yourself with uvx cse-mcp --http behind an HTTPS URL (see Development below), then add that URL as a custom connector.
All tools are read-only. They can't place trades or change anything.
💡 Tickers are forgiving: jkh, JKH and JKH.N0000 all work. Non-voting shares use X0000 (e.g. JKH.X0000).
Your AI ──MCP──▶ cse-mcp (on your computer) ──HTTPS──▶ www.cse.lk/api/* │ └─ tidies the JSON: readable names, rounded numbers, Sri Lanka time, 15-min bars, PDF links, 30s cache src/cse_mcp/client.py: talks to cse.lk (timeouts, errors, a 30-second cache) src/cse_mcp/server.py: the MCP tools (one function each, easy to read) tests/: offline tests with fake API responses, plus an opt-in live test Endpoint reference: the community CSE API documentation.
git clone https://github.com/lxnid/cse-mcp.git && cd cse-mcp uv sync uv run pytest # offline tests (fast, no internet) uv run pytest -m live # hit the real cse.lk API uv run cse-mcp --http # serve over HTTP at http://127.0.0.1:8000/mcp uv run mcp dev src/cse_mcp/server.py # poke the tools in the MCP Inspector (needs Node.js) To run your local copy in Claude Desktop, use "command": "uv", "args": ["--directory", "/ABSOLUTE/PATH/TO/cse-mcp", "run", "cse-mcp"].
Ideas, bug reports and PRs are welcome. See CONTRIBUTING.md.
mcp mcp-server colombo-stock-exchange cse sri-lanka stocks claude llm
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




