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 分