bharatstock-mcp 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +4 -0
- package/dist/{chunk-RPAWW7CN.js → chunk-LW5UFTIW.js} +29 -1
- package/dist/http.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `bharatstock-mcp` are documented here (newest first).
|
|
4
4
|
|
|
5
|
+
## 0.1.2 (2026-10-05)
|
|
6
|
+
|
|
7
|
+
- Bumped the `bharatstock` JS SDK dependency to ^0.1.11, which made paginated
|
|
8
|
+
responses forward-compatible: every top-level envelope field and every row
|
|
9
|
+
field the API returns now passes through unchanged. As a result the MCP
|
|
10
|
+
tools surface any new/modified API field (e.g. a scheme portfolio's
|
|
11
|
+
`coveragePct`) with no tool or schema change here.
|
|
12
|
+
|
|
13
|
+
## 0.1.1 (2026-09-20)
|
|
14
|
+
|
|
15
|
+
- Added two mutual-fund portfolio tools: `list_mutual_fund_portfolios`
|
|
16
|
+
(discover the schemes we hold monthly portfolio data for, keyed by the
|
|
17
|
+
holdings scheme-name) and `get_mutual_fund_portfolio_holdings` (a scheme's
|
|
18
|
+
equity portfolio for a month, with month-over-month quantity change). These
|
|
19
|
+
are the inverse of `get_mutual_fund_holdings` and are keyed by the holdings
|
|
20
|
+
scheme-name string, not the AMFI scheme_code.
|
|
21
|
+
|
|
5
22
|
## 0.1.0 (2026-09-22)
|
|
6
23
|
|
|
7
24
|
- Initial release.
|
package/README.md
CHANGED
|
@@ -72,6 +72,8 @@ Each tool wraps a consumer-facing BharatStock endpoint. Your model picks the rig
|
|
|
72
72
|
- `get_mutual_fund_nav` — daily NAV history
|
|
73
73
|
- `get_mutual_fund_returns` — trailing returns (1m…5y, CAGR)
|
|
74
74
|
- `get_mutual_fund_holdings` — which funds hold a given stock
|
|
75
|
+
- `list_mutual_fund_portfolios` — discover schemes we have portfolios for (by scheme name)
|
|
76
|
+
- `get_mutual_fund_portfolio_holdings` — a scheme's equity portfolio for a month (inverse of holdings)
|
|
75
77
|
|
|
76
78
|
**Platform**
|
|
77
79
|
- `get_data_status` — public data-integrity/freshness report
|
|
@@ -126,4 +128,6 @@ MIT
|
|
|
126
128
|
|
|
127
129
|
## Changelog
|
|
128
130
|
|
|
131
|
+
- **0.1.2** (2026-10-05): picks up `bharatstock` JS SDK 0.1.11, whose paginated responses now pass through every API field (new or modified) with no SDK change — so every field the API returns (e.g. a scheme portfolio's `coveragePct`, and anything added later) now flows through to the MCP tool output. No tool/schema change.
|
|
132
|
+
- **0.1.1** (2026-09-20): added two mutual-fund portfolio tools — `list_mutual_fund_portfolios` (discover the schemes we hold monthly portfolio data for, by scheme name) and `get_mutual_fund_portfolio_holdings` (a scheme's equity portfolio for a month, with month-over-month quantity change). These are the inverse of `get_mutual_fund_holdings` and are keyed by the holdings scheme-name string, not the AMFI scheme_code.
|
|
129
133
|
- **0.1.0** (2026-09-22): initial release. Local stdio server (`bharatstock-mcp`) + remote Streamable HTTP server (`bharatstock-mcp-http`, multi-tenant, Bearer/X-API-Key auth). MCP is a Developer/Pro feature, gated via `/v1/mcp/authorize`. Tools for stocks (quote, profile, prices, financials, fundamentals, technicals, shareholding, corporate actions, deals, insider trades, peer compare), discovery (search, movers, price shockers, screener), indices, market-wide (FII/DII, deals, insider), and mutual funds (schemes, scheme, NAV, returns, holdings), plus data status.
|
|
@@ -43,7 +43,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
43
43
|
import { BharatStock } from "bharatstock";
|
|
44
44
|
import { z } from "zod";
|
|
45
45
|
var SERVER_NAME = "bharatstock";
|
|
46
|
-
var SERVER_VERSION = "0.1.
|
|
46
|
+
var SERVER_VERSION = "0.1.2";
|
|
47
47
|
async function run(fn) {
|
|
48
48
|
try {
|
|
49
49
|
const data = await fn();
|
|
@@ -436,6 +436,34 @@ function buildServer(options = {}) {
|
|
|
436
436
|
},
|
|
437
437
|
async ({ ticker: ticker2, month, page, pageSize }) => run(() => client.stocks.mfHoldings(ticker2, { month, page, pageSize }))
|
|
438
438
|
);
|
|
439
|
+
server.registerTool(
|
|
440
|
+
"list_mutual_fund_portfolios",
|
|
441
|
+
{
|
|
442
|
+
title: "List / search mutual-fund portfolios",
|
|
443
|
+
description: "List/search the mutual-fund schemes we hold monthly PORTFOLIO data for (scheme discovery, to populate a picker). This is the INVERSE of get_mutual_fund_holdings: that answers 'which funds own stock X', this answers 'which schemes do we have portfolios for'. Each row is keyed by the holdings scheme-NAME string (NOT the AMFI scheme_code used by the scheme/NAV tools) and has no Direct/Regular distinction, since AMFI publishes monthly portfolios at the scheme level. Use the returned scheme_name with get_mutual_fund_portfolio_holdings.",
|
|
444
|
+
inputSchema: {
|
|
445
|
+
q: z.string().optional().describe("Substring match on scheme name."),
|
|
446
|
+
fundHouse: z.string().optional().describe("Filter by fund house (substring)."),
|
|
447
|
+
limit: z.number().int().positive().max(200).optional(),
|
|
448
|
+
offset: z.number().int().nonnegative().optional()
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
async ({ q, fundHouse, limit, offset }) => run(() => client.mutualFunds.listPortfolios({ q, fundHouse, limit, offset }))
|
|
452
|
+
);
|
|
453
|
+
server.registerTool(
|
|
454
|
+
"get_mutual_fund_portfolio_holdings",
|
|
455
|
+
{
|
|
456
|
+
title: "Get a mutual-fund scheme's portfolio holdings",
|
|
457
|
+
description: "One scheme's equity PORTFOLIO for a month (the stocks it holds) with month-over-month quantity change. The INVERSE of get_mutual_fund_holdings (which funds own a stock). schemeName must match the stored holdings name exactly, as returned by list_mutual_fund_portfolios \u2014 it is the scheme-NAME string, NOT the AMFI scheme_code. month is 'YYYY-MM' (latest if omitted). An unknown scheme name returns an empty portfolio, not an error.",
|
|
458
|
+
inputSchema: {
|
|
459
|
+
schemeName: z.string().describe("Holdings scheme name, exactly as returned by list_mutual_fund_portfolios."),
|
|
460
|
+
month: z.string().optional().describe("Portfolio month YYYY-MM. Latest if omitted."),
|
|
461
|
+
page: z.number().int().positive().optional(),
|
|
462
|
+
pageSize: z.number().int().positive().max(100).optional()
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
async ({ schemeName, month, page, pageSize }) => run(() => client.mutualFunds.getPortfolioHoldings(schemeName, { month, page, pageSize }))
|
|
466
|
+
);
|
|
439
467
|
server.registerTool(
|
|
440
468
|
"get_data_status",
|
|
441
469
|
{
|
package/dist/http.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { BharatStockOptions } from 'bharatstock';
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
declare const SERVER_NAME = "bharatstock";
|
|
17
|
-
declare const SERVER_VERSION = "0.1.
|
|
17
|
+
declare const SERVER_VERSION = "0.1.2";
|
|
18
18
|
/**
|
|
19
19
|
* Construct the MCP server and register all tools against a BharatStock
|
|
20
20
|
* client. Exposed separately from the stdio wiring so tests can build a
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bharatstock-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Official Model Context Protocol (MCP) server for the BharatStock API - reliable Indian stock market data (NSE/BSE) as AI-agent tools.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
38
|
-
"bharatstock": "^0.1.
|
|
38
|
+
"bharatstock": "^0.1.11",
|
|
39
39
|
"zod": "^3.23.8"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|