能力标签
开源MCP代理
🔌
MCP工具

开源MCP代理

基于 JavaScript · 让 AI 助手直接操作你的系统与工具
英文名:opencode-llm-proxy
⭐ 33 Stars 🍴 10 Forks 💻 JavaScript 📄 MIT 🏷 AI 8.0分
8.0AI 综合评分
mcpai-gatewayjavascript
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,开源MCP代理 获评「强烈推荐」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.0 分,适合有一定技术背景的用户使用。

📚 深度解析

开源MCP代理 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 开源MCP代理,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。开源MCP代理 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 开源MCP代理 评为 AI 评分 8.0 分,属于同类工具中的优质选择。

📋 工具概览

开源MCP代理 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 33
开发语言
JavaScript
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
MIT
AI 综合评分
8.0 分
工具类型
MCP工具
Forks
10

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

开源MCP代理 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/KochC/opencode-llm-proxy

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "--mcp--": {
      "command": "npx",
      "args": ["-y", "opencode-llm-proxy"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 开源MCP代理 执行以下任务...
Claude: [自动调用 开源MCP代理 MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "__mcp__": {
      "command": "npx",
      "args": ["-y", "opencode-llm-proxy"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 69/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

opencode-llm-proxy

npm npm downloads CI License: MIT

One local endpoint. Every model you have access to. Any API format. Parallel tool calling included.

opencode-llm-proxy is an OpenCode plugin that starts a local HTTP server on http://127.0.0.1:4010. It translates between the API format your tool speaks and whichever LLM provider OpenCode has configured — so you never reconfigure the same models twice.

Your tool (OpenAI / Anthropic / Gemini SDK, coding agent, etc.)
         │
         ▼  http://127.0.0.1:4010
  opencode-llm-proxy
         │
         ▼  OpenCode SDK
  GitHub Copilot · Anthropic · Gemini · Ollama · OpenRouter · Bedrock · …

Supported API formats — all with streaming and tool/function calling:

FormatEndpoint
OpenAI Chat CompletionsPOST /v1/chat/completions
OpenAI Responses APIPOST /v1/responses
Anthropic Messages APIPOST /v1/messages
Google GeminiPOST /v1beta/models/:model:generateContent

✨ Tool calling works with all four formats — including parallel tool calls. Point a coding agent (Claude Code, Cursor, Continue, Cline, your own agent loop, ...) at the proxy and its tools/tool_choice calls are translated through to whatever model OpenCode has configured, with a real tool_calls / tool_use / functionCall response handed back — one call or several in a single turn. See Tool calling.

---

Install

Quickstart

npm install opencode-llm-proxy

Add to opencode.json:

{
  "plugin": ["opencode-llm-proxy"]
}

Start OpenCode — the proxy starts automatically:

opencode

This package is an OpenCode plugin, not a standalone server. It intentionally has no npm start command; load it through OpenCode as shown above.

Send a request:

curl http://127.0.0.1:4010/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "github-copilot/claude-sonnet-4.6",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

---

Configuration

VariableDefaultDescription
OPENCODE_LLM_PROXY_HOST127.0.0.1Bind address. 0.0.0.0 to expose on LAN or Docker.
OPENCODE_LLM_PROXY_PORT4010TCP port.
OPENCODE_LLM_PROXY_TOKEN_(unset)_Single accepted bearer token. A token is required when binding beyond loopback.
OPENCODE_LLM_PROXY_TOKENS[]JSON array of additional accepted bearer-token strings.
OPENCODE_LLM_PROXY_CORS_ORIGINS[]JSON array of allowed browser origins. Browser cross-origin requests are denied by default; use "*" explicitly to allow all.
OPENCODE_LLM_PROXY_CORS_ORIGIN_(unset)_Legacy single origin appended to the CORS allowlist.
OPENCODE_LLM_PROXY_ALLOW_PRIVATE_NETWORKfalseSet to true to allow browser Private Network Access preflights.
OPENCODE_LLM_PROXY_REQUEST_TIMEOUT_MS120000Total request timeout, from 1 to 3,600,000 ms.
OPENCODE_LLM_PROXY_MAX_REQUEST_BYTES1048576Maximum JSON request body and embedded data-URL size, up to 100 MiB.
OPENCODE_LLM_PROXY_MAX_CONCURRENT_REQUESTS8Maximum active POST requests.
OPENCODE_LLM_PROXY_MAX_QUEUED_REQUESTS32Maximum POST requests waiting for capacity; excess requests receive 503.
OPENCODE_LLM_PROXY_TOOL_BRIDGE_POOL_SIZE8Max concurrent in-flight requests using [tool calling](#tool-calling).
OPENCODE_LLM_PROXY_TOOL_BRIDGE_ACQUIRE_TIMEOUT_MS10000Maximum wait for a tool-bridge slot, from 1 to 3,600,000 ms.
OPENCODE_LLM_PROXY_TOOL_BRIDGE_MAX_QUEUE32Maximum tool-calling requests waiting for a bridge slot, from 0 to 10,000; excess requests receive 429.
OPENCODE_LLM_PROXY_KEEP_SESSIONSfalseSet to true to retain temporary OpenCode sessions; otherwise they are deleted after use.
OPENCODE_LLM_PROXY_MODEL_ALIASES{}JSON object mapping aliases to a model ID string or ordered array of fallback model IDs.
OPENCODE_LLM_PROXY_METRICS_ENABLEDfalseSet to true to expose the authenticated Prometheus endpoint at GET /metrics.
OPENCODE_LLM_PROXY_REMOTE_MEDIA_ENABLEDfalseSet to true to fetch remote media URLs and convert them to embedded data URLs. Leave disabled unless required.
OPENCODE_LLM_PROXY_REMOTE_MEDIA_ALLOWED_SCHEMES["https"]JSON array of allowed remote URL schemes (https and, if explicitly enabled, http). HTTPS-only is strongly recommended.
OPENCODE_LLM_PROXY_REMOTE_MEDIA_MAX_BYTESvalue of OPENCODE_LLM_PROXY_MAX_REQUEST_BYTES (1048576 by default)Maximum downloaded bytes per remote media item, up to 100 MiB.
OPENCODE_LLM_PROXY_REMOTE_MEDIA_MAX_ITEMS4Maximum remote media downloads in one request, from 0 to 10,000.
OPENCODE_LLM_PROXY_MAX_MEDIA_ITEMS64Maximum total embedded and remote media items in one request.
OPENCODE_LLM_PROXY_REMOTE_MEDIA_MAX_REDIRECTS3Maximum redirects per remote media download, from 0 to 100.
OPENCODE_LLM_PROXY_REMOTE_MEDIA_TIMEOUT_MS10000Total remote-media preparation timeout, including DNS and all items, from 1 to 3,600,000 ms.

Use x-opencode-variant to select an OpenCode model variant for a request. The proxy accepts multimodal image, document, and file inputs in each API's native content shape, using embedded data URLs and validating model capabilities. Remote URLs are rejected unless the SSRF-safe remote-media fetcher is explicitly enabled; fetched content is converted to a data URL before it reaches OpenCode. Structured JSON output is supported through OpenAI response_format.json_schema, Responses API text.format.schema, and Gemini generationConfig.responseSchema.

Generation temperature, top-p (top_p/topP), and top-k (topK) values are validated and applied through the plugin's chat.params hook. Maximum-token fields (max_tokens, max_completion_tokens, max_output_tokens, and Gemini maxOutputTokens) are accepted where clients require them, but the current OpenCode SDK cannot enforce them. OpenAI and Anthropic requests reject unsupported controls (stop, seed, frequency_penalty, presence_penalty, logprobs, and n) with 400 instead of silently ignoring them.

OPENCODE_LLM_PROXY_HOST=0.0.0.0 \
OPENCODE_LLM_PROXY_TOKEN=my-secret \
opencode

---

SDKs & clients

ClientEndpoint typeStreamingTool callingNotes
OpenAI SDK (JS/TS)Chat Completions / ResponsesyesyesSet baseURL: ".../v1"
OpenAI SDK (Python)Chat Completions / ResponsesyesyesSet base_url=".../v1"
Anthropic SDK (JS/TS)MessagesyesyesSet baseURL to the proxy root (no /v1)
Anthropic SDK (Python)MessagesyesyesSet base_url to the proxy root (no /v1)
Google Generative AI (JS)Gemini /v1betayesyesSet baseUrl to the proxy root
LangChainOpenAI / Anthropic wrappersyesyes.bind_tools() supported. See [recipe](docs/recipes/langchain.md)
n8nOpenAI / AnthropicyesyesNative Chat Model + AI Agent nodes. See [recipe](docs/recipes/n8n.md)
Open WebUIOpenAI-compatibleyespartialDepends on Open WebUI feature support. See [recipe](docs/recipes/open-webui.md)
ContinueOpenAI-compatibleyesnot primaryEditor chat/edit. See [recipe](docs/recipes/continue.md)
ZedOpenAI-compatibleyesnot primaryEditor chat/edit. See [recipe](docs/recipes/zed.md)

See also: Security · Comparisons · All recipes

---

Using with SDKs and tools

OpenAI SDK (JS/TS)

import OpenAI from "openai"

const client = new OpenAI({
  baseURL: "http://127.0.0.1:4010/v1",
  apiKey: "unused",
})

const response = await client.chat.completions.create({
  model: "github-copilot/claude-sonnet-4.6",
  messages: [{ role: "user", content: "Explain recursion." }],
})

OpenAI SDK (Python)

from openai import OpenAI

client = OpenAI(base_url="http://127.0.0.1:4010/v1", api_key="unused")

response = client.chat.completions.create(
    model="ollama/qwen2.5-coder",
    messages=[{"role": "user", "content": "Write a Python function to reverse a string."}],
)
print(response.choices[0].message.content)

Anthropic SDK (Python)

import anthropic

client = anthropic.Anthropic(
    base_url="http://127.0.0.1:4010",
    api_key="unused",
)

message = client.messages.create(
    model="anthropic/claude-3-5-sonnet",
    max_tokens=1024,
    messages=[{"role": "user", "content": "What is the Pythagorean theorem?"}],
)
print(message.content[0].text)

Anthropic SDK (JS/TS)

import Anthropic from "@anthropic-ai/sdk"

const client = new Anthropic({
  baseURL: "http://127.0.0.1:4010",
  apiKey: "unused",
})

const message = await client.messages.create({
  model: "anthropic/claude-opus-4",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Explain async/await." }],
})

Google Generative AI SDK (JS/TS)

import { GoogleGenerativeAI } from "@google/generative-ai"

const genAI = new GoogleGenerativeAI("unused", {
  baseUrl: "http://127.0.0.1:4010",
})

const model = genAI.getGenerativeModel({ model: "google/gemini-2.0-flash" })
const result = await model.generateContent("What is machine learning?")
console.log(result.response.text())

API reference

Continue (VS Code / JetBrains)

In ~/.continue/config.json:

{
  "models": [
    {
      "title": "Claude via OpenCode",
      "provider": "openai",
      "model": "anthropic/claude-3-5-sonnet",
      "apiBase": "http://127.0.0.1:4010/v1",
      "apiKey": "unused"
    }
  ]
}
🇨🇳 中文文档镜像 AI 翻译 2026-07-08
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

opencode-llm-proxy 是一个专为 OpenCode 环境设计的轻量级 LLM 代理工具。它能够作为一个中间层,帮助开发者更灵活地调用各种大语言模型,实现请求的转发与统一管理,是构建智能化开发工作流的重要组件。

🛠 安装步骤(Docker/pip/源码)

您可以通过 npm 包管理器快速安装此工具。只需在您的项目目录或全局环境中运行 `npm install opencode-llm-proxy` 即可完成安装,确保您的开发环境已配置好 Node.js 运行环境。

🚀 使用教程

安装完成后,请在 `opencode.json` 配置文件中添加 "plugin": ["opencode-llm-proxy"]。启动 OpenCode 后,代理服务会自动运行。您可以使用 curl 命令向 `http://127.0.0.1:4010/v1/chat/completions` 发送请求,通过指定不同的 model 参数(如 Claude 系列)来实现模型调用。

⚙️ 配置说明(含 MCP / env)

可以通过环境变量对代理进行精细化配置。您可以设置 `OPENCODE_LLM_PROXY_HOST` 来绑定地址(若需在 Docker 或局域网中使用,请设为 `0.0.0.0`),使用 `OPENCODE_LLM_PROXY_PORT` 指定 TCP 端口,并通过 `OPENCODE_LLM_PROXY_TOKEN` 配置 Bearer token 以实现身份验证,同时支持 `OPENCODE_LLM_PROXY_CORS_ORIGIN` 进行跨域控制。

🔌 API 说明

opencode-llm-proxy 完全兼容 OpenAI API 标准。开发者可以无缝使用 OpenAI SDK (JS/TS 或 Python) 进行集成。只需将 `baseURL` 修改为代理服务的地址(如 `http://127.0.0.1:4010/v1`),并将 `apiKey` 设为任意值,即可通过标准化的接口调用各类模型,极大降低了迁移成本。

🔄 工作流/模块

推荐使用 npm plugin 模式进行集成。您可以将配置写入全局配置文件 `~/.config/opencode/opencode.json` 以实现全局生效,也可以仅在特定项目的 `opencode.json` 中进行配置。这种插件化的工作流确保了代理服务能随 OpenCode 自动启动,实现开箱即用的开发体验。

🎯 aiskill88 AI 点评 A 级 2026-07-05

开源MCP工具,支持多模型调用,开发便捷

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
  • 跨境业务、多语言内容运营团队
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
  • 本地部署优先选 GGUF 量化模型,节省显存并保持响应速度
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
  • 显存不足直接 OOM — 优先降低 context 或换更小的量化模型
部署方案
  • Docker:opencode-llm-proxy 提供官方镜像,docker compose up 一键启动
  • 本地部署:CPU 8GB 起,GPU 推荐 16GB+ 显存
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
opencode-llm-proxy 中文教程opencode-llm-proxy 安装报错怎么办opencode-llm-proxy MCP 配置opencode-llm-proxy Docker 部署opencode-llm-proxy Agent 工作流opencode-llm-proxy 与同类工具对比opencode-llm-proxy 最佳实践opencode-llm-proxy 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
  • 跨境业务、多语言内容运营团队
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
  • 本地部署优先选 GGUF 量化模型,节省显存并保持响应速度
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
  • 显存不足直接 OOM — 优先降低 context 或换更小的量化模型

👥 适合人群

Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师

🎯 使用场景

  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站

⚖️ 优点与不足

✅ 优点
  • +MIT 协议,可免费商用
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐

📚 相关教程推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

opencode-llm-proxy 是一款JavaScript开发的AI辅助工具。开源MCP工具:Local AI gateway for OpenCode with tool/function calling — use any model via Ope。⭐33 · JavaScript 主要应用场景包括:本地AI模型调用。
💡 AI Skill Hub 点评

AI Skill Hub 点评:开源MCP代理 的核心功能完整,质量优秀。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ MIT 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 开源MCP代理
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 opencode-llm-proxy
原始描述 开源MCP工具:Local AI gateway for OpenCode with tool/function calling — use any model via Ope。⭐33 · JavaScript
Topics mcpai-gatewayjavascript
GitHub https://github.com/KochC/opencode-llm-proxy
License MIT
语言 JavaScript
🔗 原始来源
🐙 GitHub 仓库  https://github.com/KochC/opencode-llm-proxy 🌐 官方网站  https://www.npmjs.com/package/opencode-llm-proxy

收录时间:2026-07-05 · 更新时间:2026-07-11 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。

📺 订阅 AI Skill Hub Daily Telegram 频道
每天 8 条精选 AI Skill、MCP、Agent 与自动化工具推送
加入频道 →