GF Realtime Stock
Use this skill to query real-time stock quotes through GF MCP fund_data_test. If the user gives a stock name or abbreviation, resolve it to stock code first through GF MCP news_stock_know_all.
Configuration
Read the MCP token from GF_MCP_AUTH_TOKEN. ClawHub should collect this through its sensitive environment-variable configuration UI.
Never ask the user to paste the token into chat. Never print the token. If the environment variable is missing, tell the user to create a token at:
https://mcp.gf.com.cn/cms/tokens
Then configure it as the sensitive environment variable GF_MCP_AUTH_TOKEN in ClawHub or the host app. Do not paste the token into chat.
Workflow
Use scripts/quote.mjs for real-time quote queries.
node scripts/quote.mjs 000776
node scripts/quote.mjs 腾讯控股 广发证券
If the user gives a stock name or abbreviation, the script calls stk_base_info_get to resolve listed stock codes before querying quotes.
The underlying quote MCP tool supports multiple stock codes and requires SQL-style quoted stock code strings. The script handles this automatically. Do not call the quote tool directly with raw 000776; the MCP argument must be:
{
"stock_code": "'000776'"
}
For multiple stocks, pass one MCP call with a comma-separated quoted value:
{
"stock_code": "'00700','000776'"
}
Call Sequence
For each stock name or abbreviation, call stk_base_info_get on news_stock_know_all:
{
"conditions": [
"contain,abbr_name,'模糊的股票名称'",
"eq,list_stat_cd,'1'"
],
"fields": ["scr_cd"],
"pagesize": "20",
"pageindex": "1"
}
Collect all returned scr_cd values. Preserve multiple listed matches.
Then call news_real_time_stock on fund_data_test once with all resolved codes:
{
"stock_code": "'00700','000776'"
}
Output
The script outputs JSON. Use exact quotes records whose stock_code matches the requested codes. Present only useful quote fields to the user. If a fuzzy name resolves to multiple listed stock codes, show all matching quote records and include the resolution details.
MCP Details
Quote endpoint:
https://mcp-api.gf.com.cn/server/mcp/fund_data_test/sse
Quote tool:
news_real_time_stock
Name lookup endpoint:
https://mcp-api.gf.com.cn/server/mcp/news_stock_know_all/sse
Name lookup tool:
stk_base_info_get
For fuzzy stock name lookup, always use:
{
"conditions": [
"contain,abbr_name,'模糊的股票名称'",
"eq,list_stat_cd,'1'"
],
"fields": ["scr_cd"],
"pagesize": "20",
"pageindex": "1"
}
list_stat_cd = 1 limits results to listed companies.
Safety
- Do not expose
Authorization, bearer tokens, session IDs, raw MCP headers, or raw SSE endpoint query strings. - Do not log tokens.
- Never ask the user to send the token in chat. Use platform-managed secrets.
- If multiple records are returned, select the exact
stock_codematch. - If a fuzzy name resolves to multiple listed stock codes, return all matching quote records and include the resolution details.
- If a fuzzy name resolves to no stock code, report the unresolved input.
- If the MCP returns
401orno allow access, ask the user to verifyGF_MCP_AUTH_TOKENand token permissions. - If the MCP returns
请填写签名认证参数, report that the MCP connected but the downstream API signature configuration is missing.