Skip to main content
Glama
lupuletic
by lupuletic

Onyx MCP Server

Lizenz: MIT npm-Version npm-Downloads Schmiedeabzeichen PRs willkommen

Ein Model Context Protocol (MCP)-Server für die nahtlose Integration mit Onyx AI-Wissensdatenbanken.

Dieser MCP-Server verbindet jeden MCP-kompatiblen Client mit Ihrer Onyx-Wissensdatenbank und ermöglicht Ihnen die Suche und den Abruf relevanter Kontexte in Ihren Dokumenten. Er bildet eine Brücke zwischen MCP-Clients und der Onyx-API und ermöglicht leistungsstarke semantische Such- und Chatfunktionen.

Merkmale

  • Erweiterte Suche : Semantische Suche in Ihren Onyx-Dokumentensätzen mit LLM-Relevanzfilterung

  • Kontextfensterabruf : Rufen Sie Blöcke oberhalb und unterhalb des passenden Blocks ab, um einen besseren Kontext zu erhalten

  • Vollständiger Dokumentabruf : Option zum Abrufen ganzer Dokumente statt nur von Teilen

  • Chat-Integration : Nutzen Sie die leistungsstarke Chat-API von Onyx mit LLM + RAG für umfassende Antworten

  • Konfigurierbare Dokumentsatzfilterung : Zielen Sie auf bestimmte Dokumentsätze, um relevantere Ergebnisse zu erzielen

Related MCP server: atlas_mcp

Installation

Installation über Smithery

So installieren Sie Onyx MCP Server für Claude Desktop automatisch über Smithery :

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

Voraussetzungen

  • Node.js (v16 oder höher)

  • Eine Onyx-Instanz mit API-Zugriff

  • Ein Onyx-API-Token

Aufstellen

  1. Klonen Sie das Repository:

    git clone https://github.com/lupuletic/onyx-mcp-server.git
    cd onyx-mcp-server
  2. Installieren Sie Abhängigkeiten:

    npm install
  3. Erstellen Sie den Server:

    npm run build
  4. Konfigurieren Sie Ihr Onyx-API-Token:

    export ONYX_API_TOKEN="your-api-token-here"
    export ONYX_API_URL="http://localhost:8080/api"  # Adjust as needed
  5. Starten Sie den Server:

    npm start

Konfigurieren von MCP-Clients

Für Claude Desktop App

Zu ~/Library/Application Support/Claude/claude_desktop_config.json hinzufügen:

{
  "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": []
    }
  }
}

Für Claude in VSCode (Cline)

Fügen Sie Ihrer Cline MCP-Einstellungsdatei Folgendes hinzu:

{
  "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": []
    }
  }
}

Für andere MCP-Clients

Informationen zum Hinzufügen eines benutzerdefinierten MCP-Servers finden Sie in der Dokumentation Ihres MCP-Clients. Sie benötigen Folgendes:

  • Der Befehl zum Ausführen des Servers ( node )

  • Der Pfad zur erstellten Serverdatei ( /path/to/onyx-mcp-server/build/index.js )

  • Umgebungsvariablen für ONYX_API_TOKEN und ONYX_API_URL

Verfügbare Tools

Nach der Konfiguration hat Ihr MCP-Client Zugriff auf zwei leistungsstarke Tools:

1. Suchwerkzeug

Das Tool search_onyx bietet direkten Zugriff auf die Suchfunktionen von Onyx mit erweiterter Kontextabfrage:

<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>

Parameter:

  • query (erforderlich): Das zu suchende Thema

  • documentSets (optional): Liste der Dokumentsatznamen, in denen gesucht werden soll (für alle leer)

  • maxResults (optional): Maximale Anzahl der zurückzugebenden Ergebnisse (Standard: 5, Max: 10)

  • chunksAbove (optional): Anzahl der Chunks, die über dem passenden Chunk eingefügt werden sollen (Standard: 1)

  • chunksBelow (optional): Anzahl der Chunks, die unterhalb des passenden Chunks eingefügt werden sollen (Standard: 1)

  • retrieveFullDocuments (optional): Ob vollständige Dokumente statt nur Teile abgerufen werden sollen (Standard: „false“)

2. Chat-Tool

Das Tool chat_with_onyx nutzt die leistungsstarke Chat-API von Onyx mit LLM + RAG für umfassende Antworten:

<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>

Parameter:

  • query (erforderlich): Die Frage, die Onyx gestellt werden soll

  • personaId (optional): Die ID der zu verwendenden Persona (Standard: 15)

  • documentSets (optional): Liste der Dokumentsatznamen, in denen gesucht werden soll (für alle leer)

  • chatSessionId (optional): Vorhandene Chat-Sitzungs-ID zum Fortsetzen einer Unterhaltung

Chat-Sitzungen

Das Chat-Tool unterstützt die Aufrechterhaltung des Konversationskontexts über mehrere Interaktionen hinweg. Nach dem ersten Aufruf enthält die Antwort eine chat_session_id in den Metadaten. Sie können diese ID in nachfolgenden Aufrufen weitergeben, um den Kontext beizubehalten.

Auswählen zwischen Suche und Chat

  • Verwenden Sie die Suche, wenn : Sie bestimmte, zielgerichtete Informationen aus Dokumenten benötigen und genau steuern möchten, wie viel Kontext abgerufen wird.

  • Verwenden Sie den Chat, wenn : Sie umfassende Antworten benötigen, die Informationen aus mehreren Quellen kombinieren, oder wenn Sie möchten, dass der LLM Informationen für Sie zusammenfasst.

Die besten Ergebnisse erzielen Sie, wenn Sie beide Tools in Kombination verwenden: Suchen Sie nach bestimmten Details und chatten Sie, um ein umfassendes Verständnis zu erhalten.

Anwendungsfälle

  • Wissensmanagement : Greifen Sie über jede MCP-kompatible Schnittstelle auf die Wissensdatenbank Ihres Unternehmens zu

  • Kundensupport : Helfen Sie Supportmitarbeitern, schnell relevante Informationen zu finden

  • Recherche : Führen Sie eine gründliche Recherche der Dokumente Ihrer Organisation durch

  • Schulung : Gewähren Sie Zugriff auf Schulungsmaterialien und Dokumentation

  • Richtlinieneinhaltung : Stellen Sie sicher, dass die Teams Zugriff auf die neuesten Richtlinien und Verfahren haben

Entwicklung

Ausführen im Entwicklungsmodus

npm run dev

Änderungen übernehmen

Dieses Projekt setzt die Conventional-Commits -Spezifikation für alle Commit-Nachrichten um. Um dies zu vereinfachen, stellen wir ein interaktives Commit-Tool zur Verfügung:

npm run commit

Dies führt Sie durch die Erstellung einer korrekt formatierten Commit-Nachricht. Alternativ können Sie Ihre eigenen Commit-Nachrichten im herkömmlichen Format verfassen:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Wobei type einer der folgenden ist: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

Bauen für die Produktion

npm run build

Testen

Führen Sie die Testsuite aus:

npm test

Führen Sie Tests mit Abdeckung durch:

npm run test:coverage

Fusseln

npm run lint

Beheben Sie Linting-Probleme:

npm run lint:fix

Kontinuierliche Integration

Dieses Projekt nutzt GitHub Actions für kontinuierliche Integration und Bereitstellung. Die CI-Pipeline wird bei jedem Push in den Hauptzweig und bei Pull Requests ausgeführt. Sie führt die folgenden Prüfungen durch:

  • Fusseln

  • Gebäude

  • Testen

  • Berichterstellung zur Codeabdeckung

Automatisiertes Versions-Bumping und -Publizieren

Wenn ein PR mit dem Hauptzweig zusammengeführt wird, ermittelt das Projekt automatisch den entsprechenden Versionstyp und veröffentlicht ihn in npm. Das System analysiert sowohl PR-Titel als auch Commit-Nachrichten, um den Versionstyp zu bestimmen.

  1. PR-Titelvalidierung : Alle PR-Titel werden anhand der Spezifikation „Conventional Commits“ validiert:

    • PR-Titel müssen mit einem Typ beginnen (z. B. feat:``fix:``docs:

    • Diese Validierung erfolgt automatisch, wenn ein PR erstellt oder aktualisiert wird.

    • PRs mit ungültigen Titeln schlagen bei der Validierungsprüfung fehl

  2. Validierung von Commit-Nachrichten : Alle Commit-Nachrichten werden auch anhand des herkömmlichen Commit-Formats validiert:

    • Commit-Nachrichten müssen mit einem Typ beginnen (z. B. feat: , fix: , docs: )

    • Dies wird durch Git-Hooks erzwungen, die ausgeführt werden, wenn Sie committen

    • Commits mit ungültigen Nachrichten werden abgelehnt

    • Verwenden Sie npm run commit für ein interaktives Tool zur Erstellung von Commit-Nachrichten

  3. Bestimmung der Versionserhöhung : Das System analysiert sowohl den PR-Titel als auch die Commit-Nachrichten, um die entsprechende Versionserhöhung zu bestimmen:

    • PR-Titel, die mit feat beginnen oder neue Funktionen enthalten → geringfügige Versionsverbesserung

    • PR-Titel, die mit fix beginnen oder Fehlerbehebungen enthalten → Patch-Versionserhöhung

    • PR-Titel mit BREAKING CHANGE oder mit einem Ausrufezeichen → wichtiger Versionssprung

    • Wenn der PR-Titel keinen bestimmten Bump-Typ angibt, analysiert das System Commit-Nachrichten

    • Es wird der Bump-Typ mit der höchsten Priorität verwendet, der in einer Commit-Nachricht gefunden wurde (Major > Minor > Patch).

    • Wenn keine herkömmlichen Commit-Präfixe gefunden werden, führt das System automatisch einen Patch-Versions-Bump aus, ohne dass es zu einem Fehler kommt.

  4. Versionsaktualisierung und Veröffentlichung :

    • Erhöht die Version in package.json entsprechend der semantischen Versionierung

    • Committet und pusht die Versionsänderung

    • Veröffentlicht die neue Version auf npm

Dieser automatisierte Prozess gewährleistet eine konsistente Versionierung basierend auf der Art der Änderungen, folgt den Prinzipien der semantischen Versionierung und macht die manuelle Versionsverwaltung überflüssig.

Beitragen

Beiträge sind willkommen! Weitere Informationen finden Sie in unserem Leitfaden für Beiträge .

Sicherheit

Wenn Sie eine Sicherheitslücke entdecken, befolgen Sie bitte unsere Sicherheitsrichtlinie .

Lizenz

Dieses Projekt ist unter der MIT-Lizenz lizenziert – Einzelheiten finden Sie in der Datei LICENSE .

Available Tools

2 tools
chat_with_onyxC

Chat with Onyx to get comprehensive answers

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesThe question to ask Onyx
personaIdNoThe ID of the persona to use (default: 15)
chatSessionIdNoExisting chat session ID to continue a conversation (optional)
documentSetsNoList of document set names to search within (empty for all)
enableAutoDetectFiltersNoWhether to enable auto-detection of filters (default: true)

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'comprehensive answers' but fails to describe key traits such as whether this is a read-only operation, if it requires authentication, rate limits, or how chat sessions are managed. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It is appropriately sized and front-loaded, clearly stating the tool's core function without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a chat tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It does not explain return values, error handling, or how the tool integrates with the sibling 'search_onyx', leaving the agent with insufficient context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, so the schema fully documents all 5 parameters. The description adds no additional meaning beyond what the schema provides, such as explaining how parameters interact or their practical use. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose as 'Chat with Onyx to get comprehensive answers', which identifies the action (chat) and resource (Onyx) but is vague about what distinguishes it from the sibling tool 'search_onyx'. It lacks specificity on how chatting differs from searching, leaving the purpose unclear in context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus the sibling 'search_onyx'. The description does not mention alternatives, exclusions, or contextual usage, leaving the agent without direction on tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_onyxC

Search the Onyx backend for relevant documents

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesThe topic to search for
chunksAboveNoNumber of chunks to include above the matching chunk (default: 1)
chunksBelowNoNumber of chunks to include below the matching chunk (default: 1)
retrieveFullDocumentsNoWhether to retrieve full documents instead of just matching chunks (default: false)
documentSetsNoList of document set names to search within (empty for all)
maxResultsNoMaximum number of results to return (default: 5)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions searching for 'relevant documents' but doesn't describe what constitutes relevance, how results are ranked, whether there are rate limits, authentication requirements, or what the output format looks like. For a search tool with 6 parameters and no annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a tool with a clear primary function and is front-loaded with the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (6 parameters, no annotations, no output schema), the description is inadequate. It doesn't explain what 'relevant' means, how results are returned, or provide any behavioral context. For a search tool that likely returns structured data, more completeness is needed to help an agent use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, meaning all parameters are documented in the schema itself. The description adds no additional parameter semantics beyond what's already in the schema (e.g., it doesn't explain how 'chunksAbove' and 'chunksBelow' work together or what 'documentSets' represent). Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Search') and target ('the Onyx backend for relevant documents'), providing a specific verb+resource combination. However, it doesn't differentiate from its sibling tool 'chat_with_onyx', which appears to be a related but distinct functionality, so it doesn't fully distinguish from alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus the sibling 'chat_with_onyx' or any other alternatives. It lacks context about appropriate use cases, exclusions, or prerequisites, offering only a basic functional statement without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updates
    • First observedchat_with_onyx
    • First observedsearch_onyx

TDQS

C2.9/5.0

Scored across 2 tools

Disambiguation4/5

The two tools have distinct purposes: one is for interactive chat to get answers, and the other is for searching documents. While both involve querying the Onyx backend, the descriptions clarify that 'chat_with_onyx' provides comprehensive answers through conversation, whereas 'search_onyx' focuses on retrieving relevant documents, reducing ambiguity. However, an agent might still confuse them if the distinction between 'answers' and 'documents' is not clear in practice.

Naming Consistency5/5

Both tool names follow a consistent verb_noun pattern with 'chat_with_onyx' and 'search_onyx', using snake_case throughout. The naming is predictable and readable, with no deviations or mixed conventions, making it easy for agents to understand the action and target.

Tool Count2/5

With only 2 tools, the server feels thin for a general-purpose 'onyx-mcp-server', as it likely covers a limited scope of interaction with the Onyx backend. This minimal set may not support complex workflows or comprehensive operations, suggesting an under-scoped tool surface that could hinder agent capabilities.

Completeness2/5

Inferring the domain as interacting with the Onyx backend, the tool set has significant gaps. It lacks CRUD operations (e.g., create, update, delete documents), management functions, or advanced querying beyond basic search and chat. This incomplete coverage will likely cause agent failures when tasks require more than simple retrieval or conversation.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI applications to access and contextualize organizational knowledge sources including GitHub repositories and internal documentation through standardized MCP protocol integration. Features OAuth 2.1 authentication, vector-based semantic search, and optimized context chunking for enterprise development workflows.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to intelligently search and reference documentation using hybrid semantic + keyword search via MCP protocol.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables document ingestion, semantic search, and retrieval-augmented generation via MCP tools and REST API, using vector embeddings and intelligent chunking.
    MIT