jiuyan-mcp
Click on "Deploy 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., "@jiuyan-mcpwhat's trending on jiuyangongshe 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.
jiuyan-mcp
MCP server for fetching data from 韭研公社 (jiuyangongshe.com).
Prioritizes login-free access to public featured data (timeline, hot rankings, search, full article text, community sections); "Action Alerts" and "Follow Feed" are site login data, available after configuring the web SESSION cookie.
For personal learning and research only. Please respect the site's terms of service; do not scrape at high frequency or use commercially. This repository has no affiliation with the official 韭研公社.
Tools overview
Tool | Description | Login |
| Timeline: event stream grouped by date (title/rating/theme/related articles) | No |
| Hot rankings: hot search keyword board + popular articles board | No |
| Keyword search for discussion posts/articles (sorted by popularity or time) | No |
| Fetch full article HTML and metadata by article_id | No |
| Community section list (Research Picks/Plaza/Lifestyle × Latest/Hot/Action sorting) | No |
| Action field list for the day (action_field_id) | Yes |
| Individual stock action details under action sectors (limit-up reasons, etc.) | Yes |
| Follow feed: latest posts from people you follow | Yes |
Related MCP server: A-Stock MCP Server
Quick start
git clone <repo-url> && cd jiuyan-mcp
npm installRegister it in your MCP client configuration (e.g., ~/.omp/agent/mcp.json):
{
"mcpServers": {
"jiuyan": {
"type": "stdio",
"command": "node",
"args": ["/绝对路径/jiuyan-mcp/src/index.js"],
"env": {
"JIYAN_SESSION": "<可选:网页 SESSION cookie 值>"
}
}
}
}Obtaining the login cookie (JIYAN_SESSION)
Log in to www.jiuyangongshe.com; in your browser;
F12 → Application/Storage → Cookies →
https://www.jiuyangongshe.com;Copy the value named
SESSIONand fill it intoJIYAN_SESSION;Restart the MCP client. When not configured, anonymous tools work as usual, and login tools return a clear prompt.
Signature mechanism (why this server is needed to run)
The 韭研公社 web API (web-api.jiuyangongshe.com/jystock-app) requires a token + timestamp header on every request. The signing material is embedded in the SSR page ({digest, project, serverTime} under an obfuscated key in window.__NUXT__), and the derivation algorithm is hidden in a VM-obfuscated module bundled by Nuxt. This project harvests the webpack module table inside a node:vm sandbox and initializes that module, directly calling its signing function to generate the headers for each request—no browser needed at any point.
Robustness design:
Both the digest key name and the signing function name are obfuscated artifacts—the digest is extracted with a loose regex, and the signing function is auto-discovered by its "output shape," so it adapts even when the site rotates names on release;
The signing time window is <10 minutes; when the token expires (errCode=110), the page is automatically re-fetched, the sandbox rebuilt, and one retry is attempted;
Chunk files are cached in the system temp directory (7 days) to avoid re-downloading ~1.6MB of static assets;
Adjacent upstream requests are forced to be ≥1s apart—polite rate limiting.
Known limitations
The "Action Alerts" family and the follow feed are confirmed to require a logged-in state (errCode=1); anonymous access cannot bypass this;
No web endpoint for "fetching a specific user's historical posts by user_id" was found in any public project; posts from followed people are currently obtained via the follow feed (
/api/v2/article/newest/list);The old app domain
app.jiuyangongshe.comhas a version gate (errCode=9); this project does not use it;A major frontend version upgrade of the site may change the signing module id, in which case
KNOWN_MODULE_IDSwill need to be updated.
Structure
src/
signer.js # SSR digest 抓取 + vm 沙箱签名函数发现与调用
api.js # HTTP 客户端:鉴权头、限速、errCode 映射、110 自动重试
tools.js # 8 个 MCP 工具定义与入参 schema
index.js # stdio MCP 服务器入口License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Weibo posts, hot search, comments and profiles to JSON. No login or cookies needed.
Provide access to Chinese stock market data including historical prices, real-time data, news, and…
China A-share market data over MCP: 22 tools for quotes, K-line, financials, money flow, top-trader boards, sectors, macro, convertible bonds and factor screening. Five tools need no API key, so you can connect and try it immediately.
Access real-time and historical market data for China A-shares and Hong Kong stocks, along with ne…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables real-time stock market analysis through AKShare API integration. Supports retrieving live stock prices, historical data, technical indicators (MA, MACD, RSI), market sentiment analysis, stock search, and financial news.5-
- AlicenseNot gradedqualityDmaintenanceProvides free Chinese A-share stock data including real-time quotes, historical K-lines, market scanning, and multi-factor stock screening via BaoStock and Sina Finance APIs.MIT
- FlicenseAqualityDmaintenanceEnables searching notes, retrieving note content and comments, and posting comments on Xiaohongshu (Little Red Book) via HTTP API without using Playwright.6-
- FlicenseNot gradedqualityCmaintenanceEnables local scraping and interaction with Douyin (TikTok China) content, including videos, user data, comments, live streams, and private messages, using personal account cookies without official APIs.1-