
Onyx MCP
io.github.ByWaleed由 GitHub 账号 ByWaleed 发布v0.2.1更新于 Oct 24, 2026
Secure MCP access to Onyx search, chat, projects, and administration.
概览
让助手以只读方式访问 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 实例的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Onyx MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Onyx MCP
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-messagecontract. - 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:
Optional:
Onyx still enforces the permissions attached to the supplied token. Enabling a profile cannot grant additional Onyx privileges.
OpenCode
Claude Desktop
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:searchfor search.read:chatfor chat history.write:chatfor 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
Compatibility
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
- Usage questions: GitHub Discussions
- Bugs and feature requests: GitHub Issues
- Vulnerabilities: private security advisory
- Release history: CHANGELOG.md
- Maintainer release process: RELEASING.md
- MCP Registry metadata: server.json
License
MIT
来源:README.md,提交 36216d8
工具
0版本历史
1- v0.2.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分