Logotipo de Onyx Knowledge Base

Onyx Knowledge Base

Comunidad
lupuletic

This MCP server connects any MCP-compatible client to your Onyx knowledge base, allowing you to search and retrieve relevant context from your documents. It provides a bridge between MCP clients and…

Editorlupuletic
Repositorioonyx-mcp-server
IdiomaTypeScript
Forks
12
Estrellas
28
Herramientas disponibles
0
Tipo de transportestdio
Categorías
LicenciaMIT
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    Onyx Knowledge Base ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 0 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés en el código abierto

    28 estrellas y 12 forks en el repositorio enlazado.

MseeP.ai Security Assessment Badge

Onyx MCP Server

License: MIT npm version npm downloads smithery badge PRs Welcome

A Model Context Protocol (MCP) server for seamless integration with Onyx AI knowledge bases.

This MCP server connects any MCP-compatible client to your Onyx knowledge base, allowing you to search and retrieve relevant context from your documents. It provides a bridge between MCP clients and the Onyx API, enabling powerful semantic search and chat capabilities.

Features

  • Enhanced Search: Semantic search across your Onyx document sets with LLM relevance filtering
  • Context Window Retrieval: Retrieve chunks above and below the matching chunk for better context
  • Full Document Retrieval: Option to retrieve entire documents instead of just chunks
  • Chat Integration: Use Onyx's powerful chat API with LLM + RAG for comprehensive answers
  • Configurable Document Set Filtering: Target specific document sets for more relevant results

Installation

Installing via Smithery

To install Onyx MCP Server for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install @lupuletic/onyx-mcp-server --client claude

Prerequisites

  • Node.js (v16 or higher)
  • An Onyx instance with API access
  • An Onyx API token

Setup

  1. Clone the repository:

    bash
    git clone https://github.com/lupuletic/onyx-mcp-server.git
    cd onyx-mcp-server
  2. Install dependencies:

    bash
    npm install
  3. Build the server:

    bash
    npm run build
  4. Configure your Onyx API Token:

    bash
    export ONYX_API_TOKEN="your-api-token-here"
    export ONYX_API_URL="http://localhost:8080/api"  # Adjust as needed
  5. Start the server:

    bash
    npm start

Configuring MCP Clients

For Claude Desktop App

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{
  "mcpServers": {
    "onyx-search": {
      "command": "node",
      "args": ["/path/to/onyx-mcp-server/build/index.js"],
      "env": {
        "ONYX_API_TOKEN": "your-api-token-here",
        "ONYX_API_URL": "http://localhost:8080/api"
      },
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

For Claude in VSCode (Cline)

Add to your Cline MCP settings file:

json
{
  "mcpServers": {
    "onyx-search": {
      "command": "node",
      "args": ["/path/to/onyx-mcp-server/build/index.js"],
      "env": {
        "ONYX_API_TOKEN": "your-api-token-here",
        "ONYX_API_URL": "http://localhost:8080/api"
      },
      "disabled": false, 
      "alwaysAllow": []
    }
  }
}

For Other MCP Clients

Consult your MCP client's documentation for how to add a custom MCP server. You'll need to provide:

  • The command to run the server (node)
  • The path to the built server file (/path/to/onyx-mcp-server/build/index.js)
  • Environment variables for ONYX_API_TOKEN and ONYX_API_URL

Available Tools

Once configured, your MCP client will have access to two powerful tools:

1. Search Tool

The search_onyx tool provides direct access to Onyx's search capabilities with enhanced context retrieval:

<use_mcp_tool>
<server_name>onyx-search</server_name>
<tool_name>search_onyx</tool_name>
<arguments>
{
  "query": "customer onboarding process",
  "documentSets": ["Company Policies", "Training Materials"],
  "maxResults": 3,
  "chunksAbove": 1,
  "chunksBelow": 1,
  "retrieveFullDocuments": true
}
</arguments>
</use_mcp_tool>

Parameters:

  • query (required): The topic to search for
  • documentSets (optional): List of document set names to search within (empty for all)
  • maxResults (optional): Maximum number of results to return (default: 5, max: 10)
  • chunksAbove (optional): Number of chunks to include above the matching chunk (default: 1)
  • chunksBelow (optional): Number of chunks to include below the matching chunk (default: 1)
  • retrieveFullDocuments (optional): Whether to retrieve full documents instead of just chunks (default: false)

2. Chat Tool

The chat_with_onyx tool leverages Onyx's powerful chat API with LLM + RAG for comprehensive answers:

<use_mcp_tool>
<server_name>onyx-search</server_name>
<tool_name>chat_with_onyx</tool_name>
<arguments>
{
  "query": "What is our company's policy on remote work?",
  "personaId": 15,
  "documentSets": ["Company Policies", "HR Documents"],
  "chatSessionId": "optional-existing-session-id"
}
</arguments>
</use_mcp_tool>

Parameters:

  • query (required): The question to ask Onyx
  • personaId (optional): The ID of the persona to use (default: 15)
  • documentSets (optional): List of document set names to search within (empty for all)
  • chatSessionId (optional): Existing chat session ID to continue a conversation

Chat Sessions

The chat tool supports maintaining conversation context across multiple interactions. After the first call, the response will include a chat_session_id in the metadata. You can pass this ID in subsequent calls to maintain context.

Choosing Between Search and Chat

  • Use Search When: You need specific, targeted information from documents and want to control exactly how much context is retrieved.
  • Use Chat When: You need comprehensive answers that combine information from multiple sources, or when you want the LLM to synthesize information for you.

For the best results, you can use both tools in combination - search for specific details and chat for comprehensive understanding.

Use Cases

  • Knowledge Management: Access your organization's knowledge base through any MCP-compatible interface
  • Customer Support: Help support agents quickly find relevant information
  • Research: Conduct deep research across your organization's documents
  • Training: Provide access to training materials and documentation
  • Policy Compliance: Ensure teams have access to the latest policies and procedures

Development

Running in Development Mode

bash
npm run dev

Committing Changes

This project enforces the Conventional Commits specification for all commit messages. To make this easier, we provide an interactive commit tool:

bash
npm run commit

This will guide you through creating a properly formatted commit message. Alternatively, you can write your own commit messages following the conventional format:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Where type is one of: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

Building for Production

bash
npm run build

Testing

Run the test suite:

bash
npm test

Run tests with coverage:

bash
npm run test:coverage

Linting

bash
npm run lint

Fix linting issues:

bash
npm run lint:fix

Continuous Integration

This project uses GitHub Actions for continuous integration and deployment. The CI pipeline runs on every push to the main branch and on pull requests. It performs the following checks:

  • Linting
  • Building
  • Testing
  • Code coverage reporting

Automated Version Bumping and Publishing

When a PR is merged to the main branch, the project automatically determines the appropriate version bump type and publishes to npm. The system analyzes both PR titles and commit messages to determine the version bump type.

  1. PR Title Validation: All PR titles are validated against the Conventional Commits specification:

    • PR titles must start with a type (e.g., feat:, fix:, docs:)
    • This validation happens automatically when a PR is created or updated
    • PRs with invalid titles will fail the validation check
  2. Commit Message Validation: All commit messages are also validated against the conventional commits format:

    • Commit messages must start with a type (e.g., feat:, fix:, docs:)
    • This is enforced by git hooks that run when you commit
    • Commits with invalid messages will be rejected
    • Use npm run commit for an interactive commit message creation tool
  3. Version Bump Determination: The system analyzes both the PR title and commit messages to determine the appropriate version bump:

    • PR titles starting with feat or containing new features → minor version bump
    • PR titles starting with fix or containing bug fixes → patch version bump
    • PR titles containing BREAKING CHANGE or with an exclamation mark → major version bump
    • If the PR title doesn't indicate a specific bump type, the system analyzes commit messages
    • The highest priority bump type found in any commit message is used (major > minor > patch)
    • If no conventional commit prefixes are found, the system automatically defaults to a patch version bump without failing
  4. Version Update and Publishing:

    • Bumps the version in package.json according to semantic versioning
    • Commits and pushes the version change
    • Publishes the new version to npm

This automated process ensures consistent versioning based on the nature of the changes, following semantic versioning principles, and eliminates manual version management.

Contributing

Contributions are welcome! Please see our Contributing Guide for more details.

Security

If you discover a security vulnerability, please follow our Security Policy.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Instalación

TypingMind
Requisitos:

Node.js 18+

{
  "mcpServers": {
    "onyx-search": {
      "command": "npx",
      "args": [
        "-y",
        "@lupuletic/onyx-mcp-server"
      ],
      "env": {
        "ONYX_API_TOKEN": "your-api-token-here",
        "ONYX_API_URL": "https://your-onyx-api-url.example.com/api"
      }
    }
  }
}

Usa el MCP de Onyx Knowledge Base con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado Onyx Knowledge Base, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade Onyx Knowledge Base como servidor

Cuando el estado del conector sea «Listo», haz clic en «Edita servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en Edita servidores.
  3. Pega la configuración del servidor MCP de Onyx Knowledge Base.
  4. Guarda la lista de servidores.
  5. Actualiza para comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Edita servidores»
{
  "mcpServers": {
    "onyx-knowledge-base": {
      "command": "npx",
      "args": [
        "-y",
        "onyx-mcp-server"
      ]
    }
  }
}
4

Úsala con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de Onyx Knowledge Base y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de Onyx Knowledge Base.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar Onyx Knowledge Base para ayudarme con esta tarea?
Onyx Knowledge Base
Claro. Lo he leído.
Esto he encontrado usando Onyx Knowledge Base.

Preguntas frecuentes

¿Para qué sirve el servidor MCP Onyx Knowledge Base?

Onyx Knowledge Base es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas y contexto externos. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP Onyx Knowledge Base con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar Onyx Knowledge Base con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el conector MCP de Onyx Knowledge Base con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves de API y herramientas MCP en un solo espacio de trabajo. Con Onyx Knowledge Base conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu flujo de trabajo de chat en TypingMind.

¿Cómo conecto el servidor MCP Onyx Knowledge Base a TypingMind?

Onyx Knowledge Base funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP Onyx Knowledge Base en TypingMind?

Onyx Knowledge Base ofrece funciones MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves de API con TypingMind para usar el servidor MCP Onyx Knowledge Base?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves de API, prompts y configuración MCP. Si Onyx Knowledge Base requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇