光大MCP(aetheranalysis.com)
此仓库将EverLight上下文日志打包为MCP兼容服务,包括:
- 静态人类可读日志
mcp.aetheranalysis.com/everlight-context/logs. - MCP API位于
api.aetheranalysis.com/mcp/{model}暴露resources,resource/{id},tools/search,每种型号manifest.json. - Cloudflare Vectorize支持的矢量搜索使用
@cf/baai/bge-base-en-v1.5嵌入模型。
组件
everlight-context/logs:Markdown+HTML日志(约800条)。everlight-context/build_index.py:生成index.json和chunks.jsonl(分块文本)。everlight-context/ingest_vectorize.py:嵌入块并向Cloudflare Vectorize升级(还支持NDJSON导出)。api/worker.js:Cloudflare Worker服务于MCP端点(资源+搜索+清单)。wrangler.mcp.toml:Worker配置(绑定、路由)。
域/路由
- 人工日志(静态):
https://mcp.aetheranalysis.com/everlight-context/logs/{filename} - MCP API根(每个型号):
https://api.aetheranalysis.com/mcp/{model} GET /resources--KV列表index.jsonGET /resource/{id}--从R2流降价POST /tools/search--语义搜索(矢量化)GET /manifest.json--每种型号的MCP清单(资源+搜索工具)
认证
- 工人期望
Authorization: Bearer当API_TOKENS秘密已经设定。 - 本地环境导出(参见
omni-env.sh): MCP_API_TOKEN(面向客户)CF_API_TOKEN,CLOUDFLARE_ACCOUNT_ID(用于部署+矢量化)OPEN_AI_API_KEY(保留用于其他工具;默认情况下搜索使用CF BGE)- 设置/旋转令牌:
wrangler secret put API_TOKENS --config wrangler.mcp.toml
构建和摄取
- 生成索引+块(基本URL可能被覆盖):```bash
cd everlight-context
python3 build_index.py --base-url https://mcp.aetheranalysis.com/everlight-context/logs
1. 嵌入并生成NDJSON(Cloudflare BGE):```bash
source /mnt/aether_vault/omni-stack/omni-env.sh
EMBEDDINGS_URL="https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/@cf/baai/bge-base-en-v1.5" \
EMBEDDINGS_KEY="$CF_API_TOKEN" \
python3 ingest_vectorize.py --index everlight-memory-context-bge --batch 64 --sleep 0.05 --out-file vectors.ndjson
- 将向量进行矢量化:```bash
wrangler vectorize upsert everlight-memory-context-bge \
--file everlight-context/vectors.ndjson \
--config wrangler.mcp.toml \
--batch-size 2000
1. (可选)升级后清理NDJSON:```bash
rm everlight-context/vectors.ndjson
部署(工作者)```bash
source /mnt/aether_vault/omni-stack/omni-env.sh
wrangler deploy --config wrangler.mcp.toml
绑定(in `wrangler.mcp.toml`):
- KV: `INDEX_KV` (b0d040fcab004a8b92d98337e19e38)
- R2: `LOG_BUCKET` (everlight mcp日志)
- 矢量化: `VECTORIZE` (everlight记忆上下文bge)
- 时间 : `INDEX_URL`, `LOG_BASE_URL`, `API_BASE`
## MCP清单(每种型号)
服务于 `https://api.aetheranalysis.com/mcp//manifest.json`。清单中的端点以模型为前缀。工具:
- `search` 输入架构: `{ query: string, top_k?: int (1-20, default 5), accounts?: string[], tags?: string[] }`
## 客户端使用示例
- 列出资源:```bash
curl -H "Authorization: Bearer $MCP_API_TOKEN" \
https://api.aetheranalysis.com/mcp/claude/resources
- 获取资源:```bash
curl -H "Authorization: Bearer $MCP_API_TOKEN" \
https://api.aetheranalysis.com/mcp/claude/resource/10-legal-placeholder-meaning-6843065f-eda8-8011-88fe-1dbc795cbbc8
- 搜索:```bash
curl -H "Authorization: Bearer $MCP_API_TOKEN" \
-H "Content-Type: application/json" \
-X POST https://api.aetheranalysis.com/mcp/claude/tools/search \
-d '{"query":"everlight codex federation diagram","top_k":5,"accounts":["Account1_exports"]}'
备注
- 矢量索引使用BGE(1024 dims);Worker处理Cloudflare AI运行响应。
ingest_vectorize.py如果您想通过CLI而不是直接的API调用来追加启动,则返回NDJSON导出。- 避免泄露秘密;令牌生活在牧马人的秘密和
omni-env.sh.
