dse-stock-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dse-stock-mcpWhich DSE shares gained the most today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dse-stock-mcp
Ask your AI assistant about the Dhaka Stock Exchange and get live numbers back — every listed share, today's gainers and losers, market breadth, turnover.
An MCP server built with FastMCP.
⚠️ Not investment advice. This tool reports publicly published prices. It does not analyse, recommend, or predict. Figures are last-traded values and may lag the live market. Verify anything you intend to act on against dsebd.org directly.
Unofficial. Not affiliated with or endorsed by the Dhaka Stock Exchange.
Tools
Tool | What it does |
| How many shares rose, fell, held flat or never traded, plus total turnover. |
| Biggest movers — |
| Prices for specific trading codes, e.g. |
| Find trading codes by substring, e.g. |
Covers all ~395 listed instruments. One request to the exchange serves each call.
Related MCP server: Baguskto Saham
Install
Requires uv and Python 3.12+.
git clone https://github.com/Claudefarid/dse-stock-mcp.git
cd dse-stock-mcp
uv sync
uv run fastmcp install claude-code server.py:mcpRestart your client, then ask "Which DSE shares gained the most today?" No API key, no login, no paid data feed.
Verify with uv run python test_server.py.
Two things that will bite you if you build this yourself
Both are handled here, and both produce wrong answers rather than errors if you miss them.
1. Untraded shares look like a -100% crash.
A share that did not trade is listed with LTP = 0 and TRADE = 0 — the exchange prints --
for its change. Compute percent change naively and you get −100%, so your "biggest losers" list
fills up with shares that simply never traded. On the day this was written, 11 of 395 shares were
untraded, and they crowded out every genuine decline. This server marks them traded: false,
excludes them from movers, and counts them separately in market_summary.
2. dsebd.org serves an incomplete TLS certificate chain.
The leaf certificate is signed by a Sectigo intermediate that the server never sends. Browsers
and curl recover by fetching it via AIA; Python's certifi bundle cannot, so httpx fails with
CERTIFICATE_VERIFY_FAILED.
The fix is not verify=False. That disables verification entirely — a bad trade anywhere,
and a worse one for financial data. This server verifies against the operating system's trust
store via truststore, which resolves the missing
intermediate and keeps verification fully intact.
import ssl, truststore
ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
httpx.AsyncClient(verify=ctx)Please be considerate
Prices are published by the Dhaka Stock Exchange. Requests identify themselves by User-Agent. Each call is a single page fetch — don't poll it in a tight loop.
License
MIT — see LICENSE. Covers this code only, not the exchange's data.
Available Tools
4 toolsget_stockGet StockA
Look up current prices for specific DSE trading codes.
Codes are the exchange's short symbols, e.g. ['GP', 'BEXIMCO', 'SQURPHARMA']. Case-insensitive. Use search_stock if you only know part of a name.
| Name | Required | Description | Default |
|---|---|---|---|
| codes | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It adds useful behavioral detail beyond the schema: codes are exchange short symbols, examples are provided, and matching is case-insensitive. It does not mention edge cases like invalid codes or data freshness, but for a simple lookup tool these are minor.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three tight sentences with no filler. The core purpose is front-loaded in the first sentence, followed by necessary code-format guidance and a sibling routing tip. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter tool with an output schema, the description is nearly complete. It covers input semantics, examples, and when to use the sibling tool. It could briefly mention behavior for unknown codes, but this is a minor gap given the simplicity and existing output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It does so thoroughly: it defines what 'codes' means, gives concrete examples, and clarifies case-insensitivity, which is essential for correct invocation. This far exceeds the bare schema definition.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Look up'), resource ('current prices'), and scope ('specific DSE trading codes'). It also differentiates from siblings by naming search_stock as the tool for partial-name lookups, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear when-to-use context: when you have specific DSE trading codes. It explicitly names an alternative and the condition for using it: 'Use search_stock if you only know part of a name.' This provides actionable routing without ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
market_summaryMarket SummaryA
Overall market breadth — how many shares rose, fell, or held flat today.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden. It discloses the output concept (daily breadth counts) and the temporal scope ('today'), but does not mention whether the operation is read-only, requires authentication, or has any latency or side effects. This is minimal behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence with no filler, front-loading the core concept ('overall market breadth') and then defining it concretely. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter tool with an output schema, the description covers the essential purpose and return concept. It is adequate, though without annotations it omits any caveats about data scope, update frequency, or interpretation of 'today' — but these are minor given the simplicity of the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema is empty (0 parameters), so the baseline is 4. The description does not need to explain parameters because there are none, and it does not introduce any implicit parameter confusion.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific resource ('overall market breadth') and a clear metric (counts of shares rose/fell/flat). It is easily distinguished from siblings like get_stock, top_movers, and search_stock, which focus on individual stocks or rankings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use guidance or mention of alternative tools. The description implies usage through the phrase 'overall market breadth,' but it does not state when to choose this over top_movers or get_stock.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_stockSearch StockA
Find DSE trading codes containing a substring, e.g. 'PHARMA' or 'BANK'.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It clearly indicates a read-only substring search, which is straightforward, but it does not disclose details like case sensitivity, match limits, or empty-result behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence with examples conveys the tool's purpose without wasted words. The key scoping information ('DSE trading codes', 'containing a substring') is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter search tool with an output schema, the description is mostly complete. It could add a brief note on return format or matching behavior, but those are minor given the tool's simplicity and the presence of an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema only defines 'query' as a string with 0% schema description coverage. The description adds the essential meaning: the query is a substring matched against DSE trading codes, and the examples illustrate expected input values.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Find'), a clear resource ('DSE trading codes'), and a precise matching rule ('containing a substring') with concrete examples. This distinguishes it from sibling tools like get_stock, top_movers, and market_summary.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool: when you have a partial stock code and need matching codes. However, it does not explicitly mention alternatives or state when not to use it, such as when an exact code is already known.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
top_moversTop MoversA
Biggest percentage movers of the session.
direction is 'gainers', 'losers', 'volume' (most shares traded) or
'value' (most taka traded). Ranking uses percent change, not absolute taka,
so cheap and expensive shares compare fairly.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| direction | No | gainers |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral burden. It usefully discloses that ranking uses percent change rather than absolute taka and defines each direction mode. However, it does not mention ordering behavior, session semantics, or limits, leaving some behavior to be inferred.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded, with the core purpose stated first. The ranking rationale is a valuable clarification rather than filler, and every sentence contributes to correct invocation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter read-only screener, the description covers the critical semantics: valid directions and the ranking methodology. The output schema covers the return shape, and the main remaining gap is the lack of explicit sibling differentiation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage and no enums, so the description adds significant meaning by enumerating all valid direction values and clarifying what each represents. The 'limit' parameter is not described in prose, but its name and integer default are sufficiently self-explanatory.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Biggest percentage movers of the session,' which clearly defines the tool's resource and scope. The enumerated direction modes ('gainers', 'losers', 'volume', 'value') make it unmistakable that this is a market-wide screener, distinct from siblings like get_stock or search_stock which target individual tickers.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given about when to prefer this tool over market_summary or the stock-specific siblings. The usage is implied by the name and purpose, but there are no explicit conditions, exclusions, or alternative routing instructions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
get_stock - First observed
market_summary - First observed
search_stock - First observed
top_movers
TDQS
Each tool has a clearly distinct purpose: exact price lookup, ranked movers, market breadth, and code search. Even get_stock and search_stock are disambiguated by the explicit guidance to use search_stock for partial names.
Names are all lowercase snake_case and readable, but the pattern is mixed: get_stock and search_stock follow verb_noun, while top_movers and market_summary are noun phrases. This is not a consistent convention.
Four tools is well-scoped for a focused stock market data server. Each tool provides a distinct, valuable capability without redundancy or bloat.
The toolset covers the core read-only workflows: looking up prices, finding movers, understanding market breadth, and discovering trading codes. Historical data or detailed company information would be nice but are not essential to the apparent purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Read-only China A-share data for AI agents: market, limit-up, capital flow and disclosures.
Look up the latest stock prices by ticker symbol across global markets. Get current price and esse…
Fetch current stock prices and key data for symbols across global markets. Look up companies like…
Provide access to Chinese stock market data including historical prices, real-time data, news, and…
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides real-time stock market data and company search functionality for the Colombo Stock Exchange (CSE). It enables AI assistants to retrieve current prices, change percentages, and ticker information for Sri Lankan listed companies.271513ISC
- AlicenseAqualityCmaintenanceEnables AI assistants to access Indonesian stock market data, including real-time quotes, historical data from 2019, and technical analysis for 958 IDX-listed stocks.940MIT
- FlicenseNot gradedqualityDmaintenanceEnables 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.1-
- FlicenseNot gradedqualityDmaintenanceEnables real-time and historical Indian stock market data retrieval, including prices, news, recommendations, and top gainers/losers.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Claudefarid/dse-stock-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server