Skip to main content
Glama

Hebline MCP 服务器

您的智能体在每次 API 调用上都支付了过高的费用。我们来解决这个问题。

Hebline 将每一次 API 调用(包括 LLM 调用)引导至性价比最高的合适服务。够用时选择免费,必要时选择付费。它懂得如何区分。

其他所有路由服务都会从您的付费调用中赚取差价。将您引导至免费替代方案会损害他们的收入。您的 API 调用绝无差价。永远不会。

为什么选择 Hebline?

您的智能体正在流失资金。一个任务可能会触发跨不同提供商的 5–10 次付费 API 调用。没有透明度,没有成本控制。Hebline 解决了这个问题:

  • 优先路由至免费服务 — 大多数调用不需要最好的模型。Hebline 能精确判断何时需要,并随着市场变化不断学习。

  • 无差价。诚实的路由。 — 我们不会在您支付更多费用时获利。因此,我们是唯一真正旨在为您节省资金的路由服务。

  • 提供商抽象 — 您的智能体只需说明它需要什么(“对这个地址进行地理编码”),而无需指定使用哪个服务。无需更改智能体代码即可切换提供商。

  • 成本透明度 — 每次调用都会记录所使用的服务、延迟和成本。确切了解您的智能体花费了多少。

  • 从使用中学习 — 赫布学习(Hebbian learning)会强化有效的路径,削弱无效的路径。您的代理每天都在变得更聪明。

  • BYOK(自带密钥) — 付费服务通过环境变量使用您的 API 密钥。没有密钥?该服务将自动从路由中排除。

  • 符合 GDPR — 仅记录匿名化的元数据。不存储 API 调用内容。提供自托管选项,确保数据不出您的网络。

  • 开源 — 核心 MCP 服务器采用 MIT 许可。社区驱动的适配器系统。

工作原理

Your AI Agent ←→ Hebline MCP Server ←→ Best API (Nominatim, DeepL, Google Maps, ...)
                        │
                   Smart Routing
                   Cost Logging
                   Provider Scoring

您的智能体作为 MCP 服务器连接到 Hebline。它不再直接调用 API,而是使用 Hebline 的工具——executecomparecategories。Hebline 对所有可用服务进行评分,选择最佳服务,进行调用,并返回带有完整元数据的结果。

可用 MCP 工具

工具

描述

execute

路由至最佳服务并进行 API 调用。返回结果 + 元数据(服务、成本、延迟)。

compare

显示具有特定功能的所有可用服务及其评分。在提交前查看可用选项。

categories

列出所有支持的功能及其服务。

快速入门

添加到 Claude Desktop

添加到 claude_desktop_config.json

{
  "mcpServers": {
    "hebline": {
      "command": "npx",
      "args": ["-y", "-p", "@hebline.ai/mcp-server", "hebline-mcp"]
    }
  }
}

添加到 Claude Code

添加到 .mcp.json

{
  "mcpServers": {
    "hebline": {
      "command": "hebline-mcp"
    }
  }
}

添加到 Cursor

添加到 .cursor/mcp.json

{
  "mcpServers": {
    "hebline": {
      "command": "npx",
      "args": ["-y", "-p", "@hebline.ai/mcp-server", "hebline-mcp"]
    }
  }
}

添加到 Windsurf

添加到 ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "hebline": {
      "command": "npx",
      "args": ["-y", "-p", "@hebline.ai/mcp-server", "hebline-mcp"]
    }
  }
}

添加到 VS Code (Copilot)

添加到 .vscode/mcp.json

{
  "servers": {
    "hebline": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "-p", "@hebline.ai/mcp-server", "hebline-mcp"]
    }
  }
}

全局安装

npm install -g @hebline.ai/mcp-server

使用付费服务(可选)

为您想要使用的任何付费提供商设置环境变量:

GOOGLE_MAPS_API_KEY=your-key-here
DEEPL_API_KEY=your-key-here
LIBRETRANSLATE_API_KEY=your-key-here

没有密钥?没问题——Hebline 会自动路由至免费替代方案。

支持的服务

类别

免费

付费 (BYOK)

LLMs

Groq (Llama 3.3 70B), Google Gemini Flash

OpenAI GPT-4o-mini (OPENAI_API_KEY)

地理编码

Nominatim (OpenStreetMap)

Google Maps (GOOGLE_MAPS_API_KEY)

翻译

MyMemory

DeepL (DEEPL_API_KEY), LibreTranslate (LIBRETRANSLATE_API_KEY)

网页抓取

Fetch Scraper

Firecrawl (FIRECRAWL_API_KEY)

货币

ExchangeRate-API

Fixer.io (FIXER_API_KEY)

OCR

OCR.space

Google Vision (GOOGLE_VISION_API_KEY)

天气

Open-Meteo

OpenWeatherMap (OPENWEATHERMAP_API_KEY)

网络搜索

DuckDuckGo

Brave Search (BRAVE_API_KEY)

新闻

HackerNews

NewsAPI.org (NEWSAPI_KEY)

9 个类别,20 个服务。 免费服务可立即使用——无需 API 密钥。当未设置本地密钥时,LLM 会通过 Hebline 代理进行路由(每天 50 次免费调用)。

示例

智能体询问:“对柏林的勃兰登堡门进行地理编码”

Hebline 接收到:

{
  "capability": "geocoding",
  "input": { "query": "Brandenburger Tor, Berlin" },
  "constraint": "free"
}

Hebline 回应:

{
  "success": true,
  "data": {
    "lat": 52.5163,
    "lon": 13.3777,
    "displayName": "Brandenburger Tor, Pariser Platz, Berlin, 10117, Deutschland"
  },
  "meta": {
    "service": "Nominatim (OpenStreetMap)",
    "costUsd": 0,
    "latencyMs": 258,
    "score": 0.702,
    "free": true
  }
}

智能体获得了坐标,知道它是免费的,并且 Hebline 记录了此次调用以供将来分析。

架构

mcp-server/
├── src/
│   ├── index.ts              # MCP server entry point (stdio transport)
│   ├── types.ts              # Shared TypeScript types
│   ├── registry.ts           # Service definitions (capabilities, costs, scores)
│   ├── router.ts             # Weighted scoring engine (Hopfield-ready)
│   ├── logger.ts             # Append-only JSONL call log (~/.hebline/calls.jsonl)
│   ├── adapters/             # One adapter per service
│   │   ├── nominatim.ts      # Free geocoding
│   │   ├── google-maps.ts    # Paid geocoding (BYOK)
│   │   ├── mymemory.ts       # Free translation
│   │   ├── libretranslate.ts # Paid translation (BYOK)
│   │   └── deepl.ts          # Paid translation (BYOK)
│   └── tools/                # MCP tool definitions
│       ├── execute.ts        # Route + call best service
│       ├── compare.ts        # Score all services
│       └── categories.ts     # List capabilities

调用日志

每次 API 调用都会记录到 ~/.hebline/calls.jsonl

{"timestamp":"2026-03-29T09:36:37Z","capability":"geocoding","serviceId":"nominatim","latencyMs":212,"success":true,"costUsd":0}

不记录任何内容——仅记录元数据。这些数据将为未来版本的赫布学习提供支持。

路线图

  • [x] 带有 stdio 传输的核心 MCP 服务器

  • [x] 加权评分路由器

  • [x] 地理编码适配器 (Nominatim, Google Maps)

  • [x] 翻译适配器 (MyMemory, LibreTranslate, DeepL)

  • [x] BYOK 密钥管理

  • [x] 仅追加调用日志

  • [x] 使用 GitHub Actions 的 CI/CD

  • [ ] 赫布学习 — 路由器从调用历史中学习

  • [ ] Hopfield 网络评分(取代加权评分)

  • [ ] 更多类别(网页抓取、货币、OCR、电子邮件)

  • [ ] 社区适配器系统

  • [ ] 用于远程部署的 SSE 传输

  • [ ] 用于成本分析的 Web 仪表板

  • [ ] 预算提醒和支出限制

  • [ ] 多智能体成本归因

贡献

欢迎贡献!添加新适配器非常简单——实现 ServiceAdapter 接口并注册它。

git clone https://github.com/hebline/mcp-server.git
cd mcp-server
npm install
npm run build
npm test

许可

MIT


Hebline 构建 — 优先路由至免费服务。仅在必要时付费。

-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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/Hebline/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server