MarketDocs India
An MIT-licensed MCP server that provides access to a rolling 24-month corpus of NSE/BSE company documents (concall transcripts, annual reports, investor presentations) with provenance, deduplication, and rights management. It enables searching companies, finding documents, retrieving document content, and checking coverage through a stateless Streamable HTTP MCP endpoint.
README
MarketDocs India
MarketDocs India is an MIT-licensed, agent-first metadata index for NSE/BSE company documents. It indexes a rolling five years of concall transcripts, annual reports, and investor presentations, deduplicates companies by ISIN, and exposes provenance through server-rendered HTML, REST, and a stateless Streamable HTTP MCP server. This edition never stores or republishes source documents.
The Worker is deployed as a D1-only starter index. Its initial seed contains three verified company identities and two source-only records; it makes no claim of complete market coverage. Expanding to the requested ~5,000-company / ~70,000-document five-year index requires a licensed exchange dataset, issuer-approved feeds, or a user-supplied registry—none of those records are fabricated by this project.
What is implemented
- Cloudflare Worker serving SSR HTML, REST v1, OpenAPI, MCP,
llms.txt,llms-full.txt, robots, and partitionable sitemaps. - D1 schema for companies, aliases, source health, documents, revisions, tombstones, and takedown audits.
- D1-only metadata records with official source URLs, provenance, quality, and rights state.
- SQLite Durable Object daily anonymous rate limiter with tighter content/MCP budgets.
- ISIN-first company identity, document classification, fiscal-period parsing, checksum deduplication, revisions, and rolling five-year retention.
- Issuer RSS, sitemap, and investor-relations adapters with conditional HTTP support. Exchange collection is hard-disabled; licensed NSE/BSE interfaces are explicit extension points.
- Public GitHub Actions boundary for future source discovery and validation; the live edition writes metadata only to D1.
- Deployment guard that refuses to run unless the supplied Cloudflare account ID exactly matches the separately supplied expected account ID.
- Provenance-first, no-JavaScript UI with explicit partial coverage, quality, rights, source, checksum, extraction, and freshness.
Local development
Requirements: Node.js 22+ and Python 3.11+.
npm install
npm run db:migrate:local
npm run db:seed:local
npm run dev
Then open http://localhost:8787. The seed is metadata-only: it does not republish issuer documents.
Run all Worker/domain tests:
npm run check
Run ingestion tests without installing Docling:
python -m venv ingest/.venv
ingest/.venv/bin/python -m pip install -e './ingest[test]'
ingest/.venv/bin/python -m pytest ingest/tests
Docling conversion is installed in public CI with ./ingest[conversion,test]. Source PDFs live only in a temporary directory during validation/conversion.
Public surfaces
| Surface | Route |
|---|---|
| Search/latest | / |
| Company | /companies/:slug |
| Document provenance | /companies/:slug/documents/:id |
| Canonical Markdown | /documents/:id.md |
| Coverage/freshness | /coverage |
| Rights/takedowns | /rights |
| REST | /api/v1/* |
| OpenAPI/docs | /openapi.json, /api/docs |
| Remote MCP | /mcp |
| Agent guides | /llms.txt, /llms-full.txt |
MCP tools are search_companies, find_documents, get_document, and get_coverage. get_document returns bounded sections with continuation cursors; resource templates expose company and document provenance records.
Source and rights policy
Do not scrape NSE or BSE websites. Their public sites are not production inputs. Add only reviewed issuer-controlled feeds/pages to registry/sources.json, or implement the LicensedExchangeAdapter boundary after obtaining suitable rights.
Full text can become public only when rights_status is cleared and quality is provisional or verified. Other records are source-only. Revocation requires immediate R2 deletion, a source_only transition, and a takedown audit entry.
The software is MIT-licensed. Source documents remain subject to their owners’ terms. See /rights in the app.
Real-time ingestion
“Real-time” begins when an issuer publishes a document. Hourly Cloudflare Cron dispatches the public GitHub workflow; GitHub’s hourly schedule is the fallback. The workflow reads the reviewed issuer registry, discovers supported links, validates and hashes PDFs, publishes metadata for all rights states, and publishes Markdown only for cleared records. Configured live sources target p90 provisional availability within 60 minutes; /coverage reports actual freshness.
The workflow promotes provisional text immediately after the fast text-layer pass, then lets Docling replace it with verified output after layout/OCR checks. Protected GitHub production environments keep both publication steps behind the separate-account secrets.
Separate Cloudflare account deployment
Verify the active Wrangler account before deployment. Create the D1 resource in the separate account, replace placeholder IDs/names in wrangler.jsonc, configure GitHub’s protected production environment, and use a narrowly scoped API token for automation.
export CLOUDFLARE_ACCOUNT_ID="separate-account-id"
export EXPECTED_CLOUDFLARE_ACCOUNT_ID="separate-account-id"
export CLOUDFLARE_API_TOKEN="scoped-token"
npm run deploy
The guard fails closed if any value is absent or the IDs differ. Initially retain the configurable PUBLIC_ORIGIN workers.dev URL. After buying a domain, update PUBLIC_ORIGIN; canonical links, OpenAPI, MCP examples, sitemaps, and agent files derive from it.
Free-tier budgets
- Warn at 350 MB D1, below 500 MB per database.
- Store metadata and source URLs only; do not retain source files.
- Bound API/MCP pages and apply daily hashed-IP rate limits.
- Keep the public source registry and coverage denominator honest as issuer permissions expand.
Relevant primary documentation: Workers limits, R2 pricing, D1 limits, Cloudflare remote MCP, GitHub Actions billing, NSE terms, and Docling.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。