niahub-mcp
NiaHub — Nia 索引市场
一次索引,一行订阅。 这是一个预索引 Nia 知识包的市场,任何兼容 MCP 的代理(Cursor、Claude Code、Codex)只需粘贴一行代码即可订阅。Stripe、React、Next.js、Postgres、AWS、Tailwind、MCP、Nozomio — 预索引、每小时刷新、基于引用。
为 Nozomio 黑客松构建 · 2026 年 5 月 9 日 · 旧金山
核心痛点
每一位 Cursor 用户都希望他们的代理基于真实的文档,而不是 2022 年的训练数据。 他们想要 Nia。但是:
每个人都在自己的笔记本电脑上从头开始重新索引相同的 Stripe / React / Postgres / S3 文档
没有人维护这些索引 — 它们在一周内就会过时
选择正确的 URL、分支和刷新频率才是真正的难点
设置的阻力足以让大多数团队望而却步
NiaHub 改变了这一点。一次索引,一行订阅。八个首发包,由 Tensorlake 每小时刷新,由 Codex 每晚审计,通过快照优先的网关在 <300 毫秒内提供服务,并直接调用真实的 Nia。
// ~/.cursor/mcp.json — that's the whole install
{
"mcpServers": {
"niahub-stripe": {
"command": "npx",
"args": ["-y", "niahub-mcp@latest"],
"env": {
"NIAHUB_PACK": "stripe-api-current",
"NIAHUB_TOKEN": "tok_…"
}
}
}
}重启 Cursor。提问:“为带有 14 天试用的订阅创建一个 Stripe Checkout 会话。” Cursor 调用 niahub_search_pack,网关返回来自当前 Stripe 文档的真实片段,gpt-5-mini 编写“为什么是这个答案”的追踪记录,Cursor 生成带有指向实时 docs.stripe.com URL 引用的正确代码。
Related MCP server: local-rag-core
架构
flowchart TD
classDef client fill:#1d1d28,stroke:#666,color:#f8fafc
classDef gateway fill:#1f9eff,stroke:#1f9eff,color:#fff
classDef nia fill:#0e5497,stroke:#1f9eff,color:#fff
classDef sponsor fill:#16161e,stroke:#a855f7,color:#f8fafc
classDef store fill:#161620,stroke:#34d399,color:#f8fafc
Cursor["Cursor / Claude Code / Codex<br/><sub>any MCP-compatible agent</sub>"]:::client
Browser["niahub.dev<br/><sub>marketplace · /playground · /me · /about</sub>"]:::client
Aside["Aside (Chrome)<br/><sub>docs.stripe.com → install offer</sub>"]:::client
Gateway{{"NiaHub Gateway · apps/web<br/>/api/mcp/[pack_id] · /api/playground · /api/recommend · /api/curator"}}:::gateway
Snapshots[("snapshots.json<br/><sub>17 frozen-real responses</sub>")]:::store
Nia["Nia /v2<br/><sub>POST /search · /oracle/jobs · /contexts</sub>"]:::nia
Codex["OpenAI /v1/responses<br/><sub>gpt-5-mini · why-this-answer + audit</sub>"]:::sponsor
Tensorlake["Tensorlake Sandbox<br/><sub>µVM refresh · GitHub webhook</sub>"]:::sponsor
Hyperspell["Hyperspell<br/><sub>private company packs</sub>"]:::sponsor
Devin["Devin Sessions<br/><sub>autonomous pack curator</sub>"]:::sponsor
Postgres[("InsForge Postgres<br/><sub>packs · subs · query_events · refresh_runs</sub>")]:::store
Convex[("Convex feed_events<br/><sub>reactive query · live ticker</sub>")]:::store
Cursor -->|stdio MCP| MCP[niahub-mcp<br/>npm forwarder]:::client
MCP -->|HTTPS JSON-RPC| Gateway
Browser -->|fetch| Gateway
Aside -->|webhook| Gateway
Gateway -->|snapshot-first| Snapshots
Gateway -->|real path| Nia
Gateway --> Codex
Gateway -->|nightly cron| Tensorlake
Gateway -->|/create| Devin
Gateway -->|/api/hyperspell| Hyperspell
Gateway -->|writes| Postgres
Gateway -->|push| Convex
Browser -.->|reactive subscribe| Convex三条演示路径,全部实时:
/playground(仅浏览器)— 选择一个包,点击建议,在 <5 秒内显示并排幻觉对比。无需 Cursor 设置。Cursor MCP — 粘贴
~/.cursor/mcp.json,重启,提问。真实的代理,真实的片段,真实的引用。首次用户端到端约 60 秒。/recommend— 描述你的技术栈或粘贴package.json。Nia Oracle 会挑选出最好的 3 个包,并为你提供一个组合安装片段。
赞助商堆栈 — 每个组件的实际作用
赞助商 | 角色 | 本仓库中的触点 | |
🏆 | Nia (Nozomio) | 索引基底 · | |
🚀 | InsForge | 认证 + Postgres + 边缘 — 包注册表、订阅、查询日志 | |
🛰 | Tensorlake | 沙箱隔离刷新 · Webhook 索引 | |
🎯 | OpenAI Codex |
| |
▲ | Vercel | Next.js 16 / Turbopack · 市场界面 | |
⚡ | Convex | 响应式 | |
🎓 | Devin | 自主包策展人 · 真实的 | |
🧠 | Hyperspell | 专业版 — 来自 Slack/Gmail/Drive/GitHub 的私有“公司大脑”包 | |
🔍 | Aside | 浏览器伴侣 — 检测文档域名,提供一键安装 |
演示期间每一个组件都会被实时调用。 一个 52 项检查的端到端套件 (scripts/e2e.ps1) 验证了每一条路径:
pwsh -NoProfile -File scripts/e2e.ps1
# → 52 / 52 passed
# → All sponsors live, end-to-end.仓库内容
niahub/
├─ apps/
│ ├─ web/ Next.js 16 marketplace + MCP gateway
│ │ ├─ app/
│ │ │ ├─ page.tsx homepage (grid · ticker · diff feed)
│ │ │ ├─ packs/[id]/page.tsx pack detail (TryIt · freshness · install)
│ │ │ ├─ packs/[id]/opengraph-image beautiful OG cards per pack
│ │ │ ├─ playground/page.tsx in-browser chat to any pack
│ │ │ ├─ recommend/page.tsx intent + package.json → Oracle picks
│ │ │ ├─ create/page.tsx Devin curator wizard
│ │ │ ├─ about/page.tsx pitch · how it works · arch diagram
│ │ │ ├─ me/page.tsx your subs + 14-day query sparkline
│ │ │ └─ api/
│ │ │ ├─ mcp/[pack_id]/route.ts MCP gateway (JSON-RPC, real Nia + Codex)
│ │ │ ├─ playground/route.ts browser equivalent + with/without compare
│ │ │ ├─ subscriptions/route.ts mint per-pack tokens + install snippet
│ │ │ ├─ recommend/route.ts Nia Oracle wrapper + ranker fallback
│ │ │ ├─ recommend/from-package package.json → tailored picks
│ │ │ ├─ curator/route.ts dispatch real Devin session
│ │ │ ├─ refresh/route.ts spin Tensorlake sandbox per pack
│ │ │ ├─ benchmark/route.ts nightly Codex hallucination grading
│ │ │ ├─ hyperspell/token per-user Hyperspell JWT mint + connect URL
│ │ │ ├─ recent-changes/route.ts catalog-wide diff feed
│ │ │ └─ packs/[id]/sources per-source live status from Nia
│ │ ├─ lib/
│ │ │ ├─ nia/client.ts real /v2/search query mode + snapshot-first
│ │ │ ├─ nia/snapshots.json 17 preloaded responses, all 8 packs
│ │ │ ├─ codex/auditor.ts gpt-5-mini benchmark + trace
│ │ │ ├─ tensorlake/indexer.ts Sandbox.create() refresh runner
│ │ │ ├─ convex/{feed,server}.ts useQuery + ConvexHttpClient.mutation
│ │ │ ├─ devin/curator.ts real /v1/sessions dispatch + polling
│ │ │ ├─ hyperspell.ts auth.userToken + collections.list
│ │ │ ├─ insforge.ts SDK auth + raw pg for SQL
│ │ │ ├─ env.ts per-sponsor demo flags
│ │ │ └─ install-snippet.ts single source of truth for mcp.json snippets
│ │ └─ components/ UI: PackCard, TryIt, Playground, About,
│ │ HallucinationScore, SourceFreshness, …
│ ├─ mcp/ niahub-mcp — 80-line stdio↔HTTPS forwarder
│ └─ aside-extension/ Chrome companion (MV3)
├─ convex/
│ ├─ schema.ts feed_events table
│ └─ feed.ts latest query + record mutation
├─ db/
│ ├─ schema.sql 6 tables (packs, subs, query_events, …)
│ └─ seed.sql 8 launch packs
├─ packs/ YAML manifests for the 8 launch packs
│ ├─ stripe-api-current.yaml
│ ├─ react-core.yaml
│ ├─ nextjs-app-router.yaml
│ ├─ postgres-17.yaml
│ ├─ aws-s3.yaml
│ ├─ tailwind-v4.yaml
│ ├─ mcp-protocol.yaml
│ └─ nozomio-self.yaml
├─ scripts/
│ ├─ bootstrap-pack.ts manifest YAML → real Nia category + sources
│ ├─ capture-snapshots.mjs hit live Nia, freeze responses
│ ├─ recapture-failures.mjs re-capture only ready sources
│ ├─ seed-missing-snapshots.mjs hand-written demo-grade snapshots
│ ├─ smoke-tensorlake.mjs isolated SDK smoke
│ ├─ smoke-codex.mjs inspect /v1/responses shape
│ ├─ db-migrate.ts apply schema + seed
│ ├─ patch-stripe-sources.mjs one-off DB patch helper
│ ├─ push-vercel-env.ps1 push .env.local to Vercel project
│ └─ e2e.ps1 52-check end-to-end suite
└─ docs/
├─ spec.md file-level implementation index
├─ demo.md 3-minute demo script
└─ pitch.md slide-deck-style pitch outline运行指南
前置条件
Node 20+
一个免费的 Postgres(InsForge CLI 可通过
npx @insforge/cli signup提供)来自 trynia.ai 的 Nia API 密钥
(可选) 用于完整赞助商界面的 Tensorlake、Devin、OpenAI、Hyperspell、Convex 密钥
快速启动
git clone https://github.com/<you>/niahub
cd niahub
npm install
cp apps/web/.env.example apps/web/.env.local
# fill at minimum NIA_API_KEY + DATABASE_URL — every other sponsor falls back gracefully
npm run db:migrate -- --seed # apply schema + seed 8 packs
npm run dev # http://localhost:3000这将为你提供市场、所有 8 个包页面、游乐场、推荐流程以及在本地运行的 MCP 网关 — 采用快照优先查找,即使实时 Nia API 被限流,规范的演示问题也能立即回答。
引导真实的 Nia 索引(可选)
种子数据附带了合成的 Nia 分类 ID。要将每个包连接到真实的 Nia:
node scripts/bootstrap-pack.ts packs/stripe-api-current.yaml
# repeat per pack, then:
node scripts/capture-snapshots.mjs位于 apps/web/lib/nia/snapshots.json 的快照文件提交了 17 个演示级响应 — 11 个捕获自真实的 Nia,6 个使用公共文档作为来源手动编写。
NiaHub 如何在故障时保持演示就绪
黑客松演示的全部意义在于不让现场演示崩溃。NiaHub 对每一个外部依赖的宕机都进行了加固:
如果演示中途此项宕机 | 用户看到的内容 |
Nia 限流 / 宕机 | 快照路径在 <300 毫秒内提供所有 17 个规范问题 |
OpenAI 宕机 | “为什么是这个答案”追踪回退到主机列表摘要 |
两者都宕机 | 快照答案 + 回退追踪,约 270 毫秒 |
Postgres 宕机 | 市场从内存镜像渲染 8 个包 |
Convex 宕机 | 实时记录静默回退到合成 Feed |
Cursor 输入意外内容 | 回退到实时 Nia → 如果也宕机,则显示有用的演示占位符 |
Oracle 日配额耗尽 |
|
随时运行套件进行验证:
pwsh -NoProfile -File scripts/e2e.ps13 分钟演示
完整步骤请见 docs/demo.md。摘要:
0:00 – 0:10 进入 niahub.dev。实时记录滚动。
0:10 – 0:55 点击 Stripe 包。点击“14 天 Checkout 试用”建议。切换并排视图。观察原始
gpt-5-mini在引用的 NiaHub 答案旁产生的幻觉。0:55 – 1:35 Cursor 时刻 — 粘贴问题,获取带有指向
stripe-nodeGitHub issues #2231, #1418, #2274 引用的真实 Stripe Checkout 代码。点击引用。它会打开真实的 Stripe 文档页面。1:35 – 2:05
/about架构选项卡 — 30 秒内列出所有 8 个赞助商。2:05 – 2:35
/recommend→ 粘贴 package.json 选项卡。放入依赖。获取带有理由 + 组合片段的定制推荐。2:35 – 2:55
/create— 解释 Devin 策展人 + Hyperspell 专业包。“今天:8 个包。八周后:800 个。”2:55 – 3:00 结束。硬切回主页。记录仍在滚动。
可引用的数据
52 | 端到端检查通过,每个赞助商实时验证 |
8 | 第一方首发包 |
17 | 预加载查询(真实的 Nia 捕获 + 演示级快照) |
8 | 已连接的赞助商,7 个具有可访问的实时 API 界面 |
<5 s | 进入 → |
<60 s | 进入 → 编辑器(Cursor)中的工作答案 |
每小时 | 通过 Tensorlake 对每个包进行刷新 |
gpt-5-mini | 审计 + “为什么是这个答案”追踪背后的模型 |
许可证
Apache-2.0 — 与 Nia 的 MCP 服务器相同,这是故意的。易于采用。
为 Nozomio 黑客松 构建,2026 年 5 月 9 日,旧金山。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceProvides AI agents with persistent knowledge storage, enabling them to store, search, and retrieve text, documents, and files using semantic and keyword search via MCP tools.31Apache 2.0
- Alicense-qualityAmaintenanceA headless local knowledge library and RAG substrate that enables LLM clients to search, retrieve chunks, and list documentation packs through read-only MCP tools.MIT
- Alicense-qualityBmaintenanceProvides up-to-date documentation for AI agents by locally querying a community-driven registry of pre-built docs packages.Apache 2.0
- Alicense-qualityFmaintenanceRemote MCP server enabling agents to search, buy, and publish reusable knowledge via nine agent-native tools without API keys or custodied wallets.MIT
Related MCP Connectors
Curated knowledge API for AI agents - skill packs, semantic search, validated patterns.
Shared, peer-validated knowledge archive for AI agents — search, contribute, and validate via MCP
Shared knowledge base for AI agents. Semantic search across agents, no setup required — just a URL.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kush614/niahub'
If you have feedback or need assistance with the MCP directory API, please join our Discord server