Onyx MCP

io.github.ByWaleed由 GitHub 账号 ByWaleed 发布v0.2.1更新于 Oct 24, 2026

Secure MCP access to Onyx search, chat, projects, and administration.

已验证STDIO仅桌面效率与工作流知识与记忆

概览

AI 生成的概览

让助手以只读方式访问 Onyx(原 Danswer)实例,进行搜索、查看聊天记录、智能体、项目和连接器状态。

可以做什么
这是一个本地 stdio MCP 服务器,连接 Onyx 部署并开放其搜索、聊天、智能体、项目、文件、文档集、工具、数据源和连接器状态等 API。默认以只读配置启动;写入、管理、破坏性操作、原始 API 和网页抓取均为单独的可选配置。可通过能力工具查看当前生效的配置,另有一个高级原始 API 工具用于特定部署的接口。
适用场景
当助手需要搜索和阅读已有的 Onyx 知识库、查看聊天记录,或检查智能体、项目和连接器状态时适用。若希望以后在不更换服务器的情况下授予写入或管理操作,也适合使用,因为每项能力都由独立开关控制。
运行要求
需要 Node.js 20 或 22 以及 npx 在本地运行 onyx-mcp 包。必须提供 ONYX_API_URL(Onyx API 基础地址)和 ONYX_API_TOKEN(Onyx 个人访问令牌或 API 密钥)。可选设置包括 ONYX_DEFAULT_PERSONA_ID,以及写入、管理、破坏性、原始 API 和网页抓取的启用开关,还有 ONYX_MCP_WEB_FETCH_ALLOWLIST。需要能访问 Onyx 实例的网络。
安装前请注意
ONYX_API_TOKEN 属于机密,包含它的客户端配置文件应视为敏感并限制文件权限。写入、管理、破坏性和原始 API 配置默认关闭,但启用后可创建、修改或删除数据;破坏性工具需要确认,且不提供批量删除。原始 API 工具需要管理权限,非 GET 请求还需写入和破坏性权限。网页抓取默认关闭,且仅允许白名单中的 HTTPS 主机。Onyx 仍会按令牌自身权限进行限制。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Onyx MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Onyx MCP

[CI] [License: MIT]

MCP Registry name: io.github.ByWaleed/onyx-mcp

A comprehensive, secure Model Context Protocol server for Onyx, formerly Danswer.

This project exposes Onyx search, chat, agents, projects, documents, connectors, ingestion, and deployment-specific APIs to MCP clients. It is an independent community project and is not an official Onyx package.

Why This Server

  • Uses the current /chat/send-chat-message contract.
  • Defaults to Onyx's built-in assistant, persona 0.
  • Supports scoped Personal Access Tokens and legacy API keys.
  • Starts read-only.
  • Separately gates writes, administration, destructive actions, and raw API access.
  • Applies request timeouts and response-size limits.
  • Never logs authorization headers or tokens.
  • Includes an advanced raw API tool for deployment-specific endpoints.

Install

The pinned command is recommended for reproducible execution. Use npx -y onyx-mcp@latest only if you intentionally want automatic upgrades.

Versioned tarballs are attached to GitHub Releases. The previous scoped package, @bywaleed/onyx-mcp, is deprecated in favor of onyx-mcp.

Configuration

Required:

VariableDescription
ONYX_API_URLOnyx API base URL, for example https://onyx.example.com/api
ONYX_API_TOKENOnyx PAT or API key

Optional:

VariableDefaultDescription
ONYX_DEFAULT_PERSONA_ID0Default agent used for new chats
ONYX_MCP_ENABLE_WRITEfalseRegisters tools that create or modify data
ONYX_MCP_ENABLE_ADMINfalseRegisters administrative tools
ONYX_MCP_ENABLE_DESTRUCTIVEfalseRegisters destructive tools; write must also be enabled
ONYX_MCP_ENABLE_RAW_APIfalseRegisters the advanced raw API tool; admin access is also required
ONYX_MCP_ENABLE_WEB_FETCHfalseRegisters web search and URL-fetching tools
ONYX_MCP_WEB_FETCH_ALLOWLISTemptyComma-separated hostnames allowed for HTTPS URL fetching
ONYX_MCP_TIMEOUT_MS30000Request timeout
ONYX_MCP_MAX_RESPONSE_BYTES1000000Maximum accepted response body
ONYX_MCP_MAX_CONCURRENCY8Maximum concurrent requests to Onyx
ONYX_MCP_MAX_QUEUE100Maximum requests waiting for a concurrency slot

Onyx still enforces the permissions attached to the supplied token. Enabling a profile cannot grant additional Onyx privileges.

OpenCode

json
{  "mcp": {    "onyx": {      "type": "local",      "command": ["npx", "-y", "[email protected]"],      "environment": {        "ONYX_API_URL": "https://onyx.example.com/api",        "ONYX_API_TOKEN": "{env:ONYX_API_TOKEN}"      },      "enabled": true    }  }}

Claude Desktop

json
{  "mcpServers": {    "onyx": {      "command": "npx",      "args": ["-y", "[email protected]"],      "env": {        "ONYX_API_URL": "https://onyx.example.com/api",        "ONYX_API_TOKEN": "your-token"      }    }  }}

Tool Profiles

The read-only profile includes health, identity, permissions, search, chat history, agents, projects, files, tools, document sets, and connector status.

The write profile adds chat creation, chat messages, feedback, and project updates.

The admin profile adds connector, credential, user, agent, and direct-ingestion administration.

The destructive profile adds individually confirmed deletion tools. Bulk deletion is intentionally not exposed as a first-class tool.

The raw API profile adds onyx_api_request. It covers APIs specific to an Onyx edition or version. Every raw request requires the admin profile. Every non-GET request also requires write and destructive access plus confirmation because arbitrary endpoint semantics cannot be inferred safely.

Tools

The default profile provides health, version, identity, permission, indexed search, agent, chat-history, project, file, document-set, tool, source, and connector-status tools. Write mode adds chat, feedback, and project mutations. Admin mode adds connector, credential, user, agent, and ingestion tools. Web search and URL fetching require a separate web-fetch opt-in. URL fetching accepts only HTTPS destinations matching the configured hostname allowlist; Onyx must also validate redirects and resolved addresses to prevent DNS rebinding.

Run onyx_capabilities to inspect the active profile. MCP clients can also call tools/list for complete machine-readable schemas and safety annotations.

Authentication

Prefer an Onyx PAT with the smallest required scope:

  • read:search for search.
  • read:chat for chat history.
  • write:chat for chat creation and messages.

Some Onyx endpoints still use legacy role checks and need an unrestricted PAT or API key. Use a separate administrative server configuration for those operations.

Treat client configuration files as sensitive when they contain a token. Use a dedicated least-privilege token and restrict file permissions to your user account.

Development

bash
npm cinpm run verify

Compatibility

ComponentSupported
Node.js20 and 22
MCP SDK/protocolTypeScript SDK 1.x, MCP through 2025-11-25
OnyxCurrent community and enterprise APIs; tested against the repository version documented in releases
TransportLocal stdio

The server uses non-streaming Onyx chat responses for a stable MCP result. Onyx editions and releases expose different administrative routes. The raw API tool provides an escape hatch while first-class tools remain curated and safe. MCP SDK 2.x migration is planned as a separate breaking compatibility release.

Support And Security

License

MIT

来源:README.md,提交 36216d8

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分