
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@gajarthan/cse-mcp
Advanced tools
@gajarthan/cse-mcp is a TypeScript Model Context Protocol server for the Colombo Stock Exchange. It gives MCP-compatible clients a clean way to search listed companies, fetch normalized single-stock quotes, and retrieve market-wide snapshots such as status, summary, top gainers, top losers, and index data. It is built for developers, analysts, and AI-tool builders who want fast access to CSE data through a stable MCP tool surface instead of scraping raw website responses inside prompts.
companyInfoSummerymarketStatus, marketSummery, topGainers, topLooses, aspiData, and snpDatastdio-based MCP clientshttps://www.cse.lk/api/. Response shapes may change without notice.stdio transport only. It does not yet expose a remote HTTP or SSE MCP endpoint.https://www.cse.lkstdio serversBuild locally:
npm install
npm run build
Minimum local MCP config:
{
"mcpServers": {
"cse": {
"command": "node",
"args": ["C:/absolute/path/to/cse-mcp/dist/index.js"]
}
}
}
If you are developing locally, MCP Inspector is the fastest smoke test:
npm run inspector
If the package is published to npm, the fastest install path becomes:
{
"mcpServers": {
"cse": {
"command": "npx",
"args": ["@gajarthan/cse-mcp"]
}
}
}
Use search_company to find John Keells Holdings, then call get_stock_quote for the correct symbol.
This server supports local stdio usage only. In most clients, you can configure it in one of two ways:
node C:/absolute/path/to/cse-mcp/dist/index.jsnpx @gajarthan/cse-mcpstdio vs remote HTTPstdio MCP clients that launch a process with command and argsClaude Code documents MCP support and works well with local stdio servers.
Add the server directly:
claude mcp add-json cse "{\"type\":\"stdio\",\"command\":\"node\",\"args\":[\"C:/absolute/path/to/cse-mcp/dist/index.js\"]}"
Published-package variant:
claude mcp add-json cse "{\"type\":\"stdio\",\"command\":\"npx\",\"args\":[\"@gajarthan/cse-mcp\"]}"
Or use .mcp.json:
{
"mcpServers": {
"cse": {
"command": "node",
"args": ["C:/absolute/path/to/cse-mcp/dist/index.js"]
}
}
}
If Claude Desktop is already configured, you can also import those MCP entries into Claude Code:
claude mcp add-from-claude-desktop
OpenAI documents MCP configuration in ~/.codex/config.toml, and the Codex CLI and IDE extension share it.
CLI setup:
codex mcp add cse -- node C:/absolute/path/to/cse-mcp/dist/index.js
Published-package CLI setup:
codex mcp add cse -- npx @gajarthan/cse-mcp
config.toml setup:
[mcp_servers.cse]
command = "node"
args = ["C:/absolute/path/to/cse-mcp/dist/index.js"]
Published-package config.toml setup:
[mcp_servers.cse]
command = "npx"
args = ["@gajarthan/cse-mcp"]
Cursor MCP support is version-dependent. In versions that support local MCP servers, use a config equivalent to:
{
"mcpServers": {
"cse": {
"command": "node",
"args": ["C:/absolute/path/to/cse-mcp/dist/index.js"]
}
}
}
If the client supports npx, you can usually replace the command with:
{
"mcpServers": {
"cse": {
"command": "npx",
"args": ["@gajarthan/cse-mcp"]
}
}
}
Verify the exact config path and UI flow in your installed Cursor version.
VS Code and GitHub Copilot MCP support is version-dependent. In builds that support local MCP servers, the common pattern is a workspace or user mcp.json-style config using command and args:
{
"servers": {
"cse": {
"command": "node",
"args": ["C:/absolute/path/to/cse-mcp/dist/index.js"]
}
}
}
Verify the exact file location and schema for your VS Code or Copilot version before relying on this example.
Cline MCP support is version-dependent. In versions that support local MCP stdio servers, use the same process-launch pattern:
{
"mcpServers": {
"cse": {
"command": "node",
"args": ["C:/absolute/path/to/cse-mcp/dist/index.js"]
}
}
}
Verify the current config file name and location in the Cline docs or extension UI.
Continue support is version-dependent and may be configured through its YAML or UI-based MCP settings. The practical local setup is still the same:
mcpServers:
cse:
command: node
args:
- C:/absolute/path/to/cse-mcp/dist/index.js
Verify the current Continue config format for your installed version.
Roo Code MCP support is version-dependent. Use the same local stdio command pattern in the version-specific MCP settings:
{
"mcpServers": {
"cse": {
"command": "node",
"args": ["C:/absolute/path/to/cse-mcp/dist/index.js"]
}
}
}
TODO: verify and document the exact current Roo Code config path.
Gemini CLI MCP support is version-dependent. For versions that support local MCP servers, configure this server as a local stdio process:
{
"mcpServers": {
"cse": {
"command": "node",
"args": ["C:/absolute/path/to/cse-mcp/dist/index.js"]
}
}
}
Verify the current Gemini CLI config path and schema in the version you are using.
search_companySearch the local CSV catalog by company name or ticker symbol.
Input:
{
"query": "john keells"
}
Returns:
get_stock_quoteFetch a normalized quote for a valid CSE symbol.
Input:
{
"symbol": "JKH.N0000"
}
Returns:
get_market_statusFetch the current market session string from CSE and normalize it to a status plus inferred open/closed signal.
Input:
{}
get_market_summaryFetch market-wide turnover, share volume, trade count, and trade date.
Input:
{}
get_top_gainersFetch the top market gainers.
Input:
{
"limit": 10
}
Notes:
limit is 10limit is 25get_top_losersFetch the top market losers.
Input:
{
"limit": 10
}
Notes:
limit is 10limit is 25get_index_summaryFetch one or both supported index summaries.
Input:
{
"index": "all"
}
Allowed values:
aspisnpallstdio only10000ms2This project does not currently expose custom CLI flags. Run it with:
node dist/index.js
This project does not currently require or document custom environment variables.
If timeout, retry count, base URL override, or CSV path override should become user-configurable, they should be added explicitly and documented here rather than inferred from source code.
stdio MCP serversargs is absolutenpm run build before pointing the client at dist/index.jsnpx @gajarthan/cse-mcp works from your terminalRun the server directly to inspect stderr:
node dist/index.js
Check:
dist/index.js existssearch_company first to confirm the exact CSE symbolcse_companies.csvsrc/services/cseApi.tsThat is expected for now. This server is stdio-only, while ChatGPT's documented remote MCP flow expects SSE or streaming HTTP.
Use an absolute path and forward slashes in JSON config when possible:
{
"command": "node",
"args": ["C:/absolute/path/to/cse-mcp/dist/index.js"]
}
If you do not want to deal with local paths, prefer the published package form:
{
"command": "npx",
"args": ["@gajarthan/cse-mcp"]
}
Install and build:
npm install
npm run build
Useful scripts:
npm run dev - watch-mode development with tsxnpm run build - compile TypeScript to dist/npm run typecheck - run TypeScript checks without emitting filesnpm run start - start the compiled servernpm run inspector - launch MCP Inspector against the local buildRecommended local workflow:
npm installnpm run typechecknpm run buildnpm run inspectorsearch_companyget_stock_quoteget_market_summaryget_index_summaryProject layout:
src/index.ts - MCP server bootstrap and stdio transportsrc/services/companyLookup.ts - CSV-backed symbol and company searchsrc/services/cseApi.ts - CSE API HTTP calls, validation, retries, and normalizationsrc/tools/*.ts - individual MCP tool definitionssrc/utils/errors.ts - safe error handling and stderr loggingsrc/utils/formatters.ts - output formatting and normalization helpersFormal changelog management is not set up yet.
TODO:
CHANGELOG.mdThis is an open source project, and contributions are welcome.
Suggested contribution flow:
npm installnpm run typechecknpm run buildHigh-value contribution areas:
chartData, allSectors, and announcementsIf you discover a changed CSE response shape, include a sanitized example payload in the issue or PR whenever possible.
FAQs
Production-oriented MCP server for the Colombo Stock Exchange
The npm package @gajarthan/cse-mcp receives a total of 28 weekly downloads. As such, @gajarthan/cse-mcp popularity was classified as not popular.
We found that @gajarthan/cse-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.