io.github.lnanology/xfinlab

السجل الرسمي الذكاء الاصطناعي والوكلاء

Financial intelligence for AI agents: market events, sentiment, technicals, news feed.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

Remote (streamable-http)
Claude Code
claude mcp add --transport http xfinlab 'https://api.xfinlab.com/api/mcp' --header 'X-API-Key: <XFINLAB API key. Get a free key at https://www.xfinlab.com/intelligence-api.html>'
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "xfinlab": {
            "type": "http",
            "url": "https://api.xfinlab.com/api/mcp",
            "headers": {
                "X-API-Key": "<XFINLAB API key. Get a free key at https://www.xfinlab.com/intelligence-api.html>"
            }
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. XFINLAB
  2. Quick start (API)
  3. MCP server (for Claude and other AI agents)
  4. Production usage
  5. SDKs & examples
  6. Consumer product
  7. Local development
  8. More docs

XFINLAB

Financial Intelligence Infrastructure — APIs, SDKs, and an MCP server for developers and AI agents, plus a consumer research platform built on the same backend.

Real market events, FinBERT sentiment, technical/market-structure analysis, SEC/CFTC/FDIC/USDA/CBOE official data, and Monte Carlo stress testing. Every field is traceable to a real computation or an official data source — nothing fabricated or interpolated.

Architecture · Get a free API key · API docs · llms.txt · Consumer product

Quick start (API)

pip install "git+https://github.com/lnanology/Xfinlab.git#subdirectory=sdk/python"
from xfinlab_intelligence import XfinlabClient

client = XfinlabClient(api_key="xfl_...")  # free tier, issued instantly
sentiment = client.sentiment("AAPL")
technical = client.technical("AAPL", period="6mo")
fundamentals = client.fundamentals("AAPL")

Or JavaScript/Node:

npm install "github:lnanology/Xfinlab#path:sdk/js"
const { XfinlabClient } = require('xfinlab-intelligence');
const client = new XfinlabClient('xfl_...');
const sentiment = await client.sentiment('AAPL');

19 endpoints total — market events, sentiment, AI debate, technical/market-structure, Monte Carlo stress testing, insider trading, institutional ownership, short interest, SEC XBRL fundamentals, CBOE VIX term structure, FDIC bank health, USDA agriculture, EIA energy, crypto, cross-region market map, and Pro-tier webhooks. Full reference: intelligence-api.html.

MCP server (for Claude and other AI agents)

Every field this server returns is either a real computation/real official-source value, or null with an explanation — the MCP ecosystem has a lot of servers now, few of them say anything about the actual quality of the data behind the tool calls. This one does, in public: xfinlab.com/trust.html shows every underlying data collector's live/down status in real time.

Already live in production — no setup needed, just point an MCP-compatible client at it:

{
  "mcpServers": {
    "xfinlab": {
      "url": "https://api.xfinlab.com/api/mcp",
      "headers": { "X-API-Key": "xfl_..." }
    }
  }
}

Hosted service (the server implementation is proprietary and runs at api.xfinlab.com). Tools (6): get_market_events, get_sentiment, get_technical_analysis, get_intelligence_feed, get_global_market_map, get_fundamentals_as_of (point-in-time SEC fundamentals). Same auth and free tier as the REST API. Docs: intelligence-api.html#mcp.

Production usage

Early-stage, honest numbers — pulled from the platform's own admin metrics on 2026-09-22, not curated for effect. Individual emails aren't published here even though they're visible in the admin panel — no reason to expose real people's addresses in a public README.

  • 15 API keys issued (14 active, 1 revoked) since the self-serve free tier launched, to roughly 13 distinct outside developers/researchers — not counting the operator's own test key, which shows 0 calls, so none of the volume below is self-generated traffic.
  • 669 weighted API calls served all-time, concentrated in a small number of real integrations: the single heaviest account alone accounts for more than half of all-time volume, the second-heaviest for roughly another fifth.
  • One signup used a .edu email address — an early, small signal of academic/research interest rather than only casual trials.
  • 5 organic accounts on the consumer research site (xfinlab.com), separate from the API-only signups above. Of 7 total registered accounts, 2 are the operator's own account and an internal LINE-bot integration, not external users — excluded from that count.
  • No response-time or uptime SLA number is published here — it isn't actually measured yet, and this project holds itself to the same zero-fabrication policy it markets to users, so an unmeasured number doesn't get invented for a case study either. Per-data-source status (not per-request latency) is live on that same page.

Two real bugs this surfaced, fixed the same day each was found:

  • SEC Form 4 false positives (Sept 2026). SEC EDGAR's own browse-edgar type filter turned out to behave as a prefix wildcard, not an exact match — type=4 was silently matching unrelated 424B-series filings as "insider trading" activity. Caught by the platform's own data-source health alerting (not a user bug report), confirmed against SEC's live responses — its own pagination link rewrites type=4 to type=4%25, which is what gave the bug away.
  • Point-in-time/vintage data store (Sept 2026). A quant researcher's comment on r/quant pointed out that treating a filing's period-end date as "known on that date" ignores real filing lag and later restatements — a classic look-ahead-bias source in backtests. Built a dedicated (proprietary) store where every fundamentals value carries a real filing-availability timestamp instead of the period it describes, and a restated value is stored as a new immutable row rather than overwriting the original — so "what did we know on date X" and "what's the latest known value" are two different, both-correct queries.

SDKs & examples

Both SDKs are MIT-licensed (sdk/LICENSE) and have zero required dependencies beyond the standard library / native fetch.

Consumer product

The same backend also powers xfinlab.com, a retail investment-research platform:

ModulePath
Homepageindex.html
AI Market Research™ai-analysis.html
Chart Research™chart-analysis.html
Company Compare™company-compare.html
Event Intelligence™news-denoise.html
Risk Engine™stress-lab.html

Local development

python3 mock-server.py

Then open http://localhost:8080. The production backend is a separate, private service (deployed as api.xfinlab.com); the static site above deploys separately on Vercel as xfinlab.com.

More docs

الأسئلة الشائعة

ما هو io.github.lnanology/xfinlab؟

Financial intelligence for AI agents: market events, sentiment, technicals, news feed.

كيف أثبّت io.github.lnanology/xfinlab؟

يعمل كخادم بعيد. في Claude Code: claude mcp add --transport http xfinlab 'https://api.xfinlab.com/api/mcp' --header 'X-API-Key: <XFINLAB API key. Get a free key at https://www.xfinlab.com/intelligence-api.html>'. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.lnanology/xfinlab إلى مفتاح API؟

نعم. يتطلب X-API-Key، وتضبطها في إعداداته.

هل io.github.lnanology/xfinlab مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون io.github.lnanology/xfinlab؟

ينشره lnanology. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.