Logo von Context9 - Bring Live Doc into Your Agent Context

Context9 - Bring Live Doc into Your Agent Context

Organisation
Prism-Shadow

Your personal knowledge MCP engine. Up-to-date, local-first, low-hallucination.

HerausgeberPrism-Shadow
Repositorycontext9
SpracheTypeScript
Forks
2
Sterne
31
Verfügbare Tools
0
Transporttypstdio, streamable-http
Kategorien
LizenzApache-2.0
Links
  • Tools mit KI-Workflows verbinden

    Context9 - Bring Live Doc into Your Agent Context stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • 0 verfügbare Tools

    Sehen Sie sich unten die aufrufbaren Aktionen an, einschließlich Namen und Beschreibungen, sofern der Server diese bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    31 Sterne und 2 Forks im verlinkten Repository.

Cover

Context9 - Bring Live Doc into Your Agent Context

X · Discord · Issues

Apache 2.0 licensed MCP

简体中文 繁體中文 日本語 한국어 문서


https://github.com/user-attachments/assets/553ab8a2-5227-42fa-a8bd-692cd13c0b96

Why Context9?

  • 🎯 Up-to-date knowledge: Real-time knowledge synchronization and reduce AI agent hallucinations.
  • 🔐 Local-first: Fully open sourced and deploy on your own server, safely access your private knowledge.
  • ⚙️ Easy-to-use Web UI: Easily manage your repositories and API-key permissions through the Context9 Panel.

What Context9 Actually Does

Context9 (Context Mine) is an MCP (Model Context Protocol) server. With local deployment, Context9 securely feeds agents with the most up-to-date documentation, reducing LLM hallucinations.

Install Context9

Run Context9 server

shell
docker run -d \
    --name context9 \
    -p 8011:8011 \
    --restart unless-stopped \
    ghcr.io/prism-shadow/context9:latest \
    python -m context9.server --github_sync_interval 600

Or you can specify the port on which Context9 runs.

shell
docker run -d \
    --name context9 \
    -e CONTEXT9_PORT=<port> \
    -p <port>:<port> \
    --restart unless-stopped \
    ghcr.io/prism-shadow/context9:latest \
    python -m context9.server --github_sync_interval 600

Configure Context9

Login to Context9

Visit http://<server_ip>:8011/ to login to Context9

  • Default username: ctx9-admin
  • Default password: 88888888

Remember to change the default password when you first log in to Context9.

login

Add repositories

Add the repositories you need in Context9 by filling in the repository owner, repository name, and branch.

  • For private repositories, you also need to provide a GitHub Token

Export & Import Repos using the Context9 template

  • Export Repos: You can click the Export Repos button to export the current repository configuration as a local template, making it easy to reuse later.
  • Import Repos: You can click the Import Repos button to import a Context9 template into your repository configuration. Context9 also provides several templates for reference and use.

repo

Add API Keys

Generate an API key that can be used to access Context9.

api_key

After generating the API key, you need to configure which repositories the API key is allowed to access.

key2repo

Test Context9 (Optional)

You can test your configured Context9 instance by simply entering the current Context9 Server IP and API key in the MCP Inspector.

inspector

Integrate Context9 with Agent

After deploying the Context9 service, you can seamlessly integrate both private and public real-time code documentation into your agents. You can connect to the Context9 MCP service using tools such as Cursor and Claude Code.

Install in Cursor

Go to: Settings ->Cursor Settings -> Tools & MCP -> Add a Custom MCP Server

Paste the configuration below into ~/.cursor/mcp.json. If you want to configure Context9 for a specific project only, create .cursor/mcp.json in the project directory and paste the configuration there.

json
{
  "mcpServers": {
    "Context9": {
      "url": "http://<server_ip>:8011/api/mcp/",
      "headers": {
        "Authorization": "Bearer <CTX9_API_KEY>"
      }
    }
  }
}

Install in Claude Code

Run the following command to add Context9 to Claude Code.

shell
claude mcp add --transport http Context9 http://<server_ip>:8011/api/mcp/ --header "Authorization: Bearer <CTX9_API_KEY>"

Suggestions for Context9 Usage

To avoid adding extra prompts every time you use Context9, we recommend that you:

  • Use CLAUDE.md in Claude Code.
  • Use AGENTS.md for Cursor, CodeX and other agents.
  • Add rules in Cursor.

Use CLAUDE.md for Claude Code

Add a prompt to CLAUDE.md to enable Context9:

- Always retrieve required documentation via Context9

Use AGENT.md for Cursor, CodeX and other agents

Add rules to AGENTS.md, for example:

text
Rules:
- Always retrieve required documentation via Context9

Add Rule for Cursor

Go to: Setting -> Rules and Commands -> Add Rule

Rule example:

text
Always use Context9 MCP to obtain the necessary documentation, regardless of whether I explicitly ask for it.

Work with Context9

Set up entry documentation

To enable Context9 to correctly discover and index your repository documentation, each repository should provide a Spec document. By default, Context9 expects a file named spec.md at the root of the repository.

text
your-repo/
├── spec.md          ← Specification entry point
├── README.md
├── docs/
│   └── ...
└── ...

If you need to use a different filename or path, remember to update the repository configuration.

Use relative link in documentation

You do not need to think about MCP, indexing, or document resolution. Just maintain documentation links using normal repository-relative paths, exactly as you would for human readers.

Example in documentation.

markdown
## Related Documents
- [Detailed Guide](docs/detailed-guide.md)
- [API Reference](guides/api-reference.md)
- [FAQ](faq.md)

As long as these links are valid within the repository, Context9 will:

  • Discover the documents
  • Index them correctly
  • Make them available to AI agents in real time

Deploy Context9 from source

License

Licensed under the Apache License, version 2.0. See LICENSE for details.

Acknowledge

This repo benefits from context7. Thanks to the authors and contributors for their excellent work and inspiration.

⭐ Star History

Star History Chart

Installation

TypingMind
Voraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "prism-shadow-context9": {
      "command": "npx",
      "args": [
        "-y",
        "Context9"
      ]
    }
  }
}

Context9 - Bring Live Doc into Your Agent Context MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald Context9 - Bring Live Doc into Your Agent Context verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Sie können MCP lokal auf Ihrem Gerät ausführen oder über eine URL eine Verbindung zu einem Remote-MCP-Server herstellen.

Option 1: Lokalen Konnektor verwenden

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor-Setup“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Optionen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor-Setup“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie unter macOS Terminal bzw. unter Windows Windows Terminal.
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

Context9 - Bring Live Doc into Your Agent Context als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server ändern“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server ändern“.
  3. Fügen Sie die MCP-Server-Konfiguration für Context9 - Bring Live Doc into Your Agent Context ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server ändern“
{
  "mcpServers": {
    "prism-shadow-context9": {
      "command": "npx",
      "args": [
        "-y",
        "Context9"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von Context9 - Bring Live Doc into Your Agent Context. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von Context9 - Bring Live Doc into Your Agent Context.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit Context9 - Bring Live Doc into Your Agent Context bei dieser Aufgabe helfen?
Context9 - Bring Live Doc into Your Agent Context
Gerne. Ich habe es gelesen.
Das habe ich mit Context9 - Bring Live Doc into Your Agent Context gefunden.

Option 2: Eine MCP-Server-URL hinzufügen

Nutzen Sie diese Option, wenn Context9 - Bring Live Doc into Your Agent Context bereits auf einem Remote-Server gehostet wird oder Ihr Team einen gemeinsamen Konnektor für mehrere Benutzer benötigt.

1

MCP-Konnektoren öffnen

Gehen Sie in TypingMind zu „Plugins“, öffnen Sie „MCP-Konnektoren“ und wählen Sie dann „URL hinzufügen“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Gehen Sie zu „Plugins“.
  3. Öffnen Sie „MCP-Konnektoren“.
  4. Klicken Sie auf „Neue URL“.
TypingMind-Formular zum Hinzufügen einer benutzerdefinierten MCP-Server-URL
2

Server-URL einfügen

Geben Sie Ihre Server-URL in das Feld „Server-URL“ ein. Fügen Sie einen Verbindungsnamen, eine Beschreibung, ein Symbol, benutzerdefinierte HTTP-Header oder OAuth-Client-Einstellungen hinzu, falls der Server diese erfordert.

  1. Fügen Sie Ihre Server-URL in das Feld „Server-URL“ ein.
  2. Geben Sie einen Verbindungsnamen für Context9 - Bring Live Doc into Your Agent Context ein.
  3. Fügen Sie bei Bedarf eine Beschreibung und ein Symbol hinzu, um die Verbindung leichter zu erkennen.
  4. Fügen Sie benutzerdefinierte HTTP-Header oder OAuth-Client-Daten hinzu, falls der Server eine Authentifizierung erfordert.
3

Verbindung erstellen

Klicken Sie auf „Verbindung erstellen“, kehren Sie dann zur Plugin-Liste zurück und prüfen Sie, ob die neue MCP-Verbindung aktiv ist.

  1. Klicken Sie auf „Verbindung erstellen“.
  2. Kehren Sie zur Liste der MCP-Konnektoren zurück.
  3. Prüfen Sie, ob die Verbindung zu Context9 - Bring Live Doc into Your Agent Context als aktiv angezeigt wird.
  4. Aktualisieren Sie die Plugin-Liste, falls die Verbindung nicht sofort angezeigt wird.
4

Modelle ohne erneuten Verbindungsaufbau wechseln

Starten Sie einen Chat mit Ihrem bevorzugten Modell, aktivieren Sie unter „Plugins“ die Tools von Context9 - Bring Live Doc into Your Agent Context und wechseln Sie bei Bedarf zu einem anderen Modell. Die MCP-Verbindung bleibt im TypingMind-Arbeitsbereich verfügbar.

  1. Starten Sie einen neuen Chat in TypingMind.
  2. Wählen Sie das KI-Modell, das Sie verwenden möchten.
  3. Aktivieren Sie die Tools von Context9 - Bring Live Doc into Your Agent Context unter „Plugins“.
  4. Bitten Sie das Modell, das Tool bei Bedarf zu verwenden.
  5. Wechseln Sie zu einem anderen KI-Modell und verwenden Sie dieselbe MCP-Verbindung weiter.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit Context9 - Bring Live Doc into Your Agent Context bei dieser Aufgabe helfen?
Context9 - Bring Live Doc into Your Agent Context
Gerne. Ich habe es gelesen.
Das habe ich mit Context9 - Bring Live Doc into Your Agent Context gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server Context9 - Bring Live Doc into Your Agent Context verwendet?

Context9 - Bring Live Doc into Your Agent Context ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich Context9 - Bring Live Doc into Your Agent Context MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie Context9 - Bring Live Doc into Your Agent Context mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum Context9 - Bring Live Doc into Your Agent Context MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald Context9 - Bring Live Doc into Your Agent Context verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich Context9 - Bring Live Doc into Your Agent Context MCP mit TypingMind?

Sie können Context9 - Bring Live Doc into Your Agent Context in TypingMind über den lokalen MCP-Konnektor oder durch Hinzufügen der URL eines entfernten MCP-Servers verbinden. Verwenden Sie den lokalen Konnektor, wenn der Server auf Dateien, Apps oder private Ressourcen auf Ihrem Gerät zugreifen muss. Nutzen Sie eine Server-URL, wenn der MCP-Server extern gehostet wird.

Welche Tools stellt Context9 - Bring Live Doc into Your Agent Context MCP in TypingMind bereit?

Context9 - Bring Live Doc into Your Agent Context stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um Context9 - Bring Live Doc into Your Agent Context MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal, sodass Sie die Kontrolle über Ihre Modellanbieter, API-Schlüssel, Prompts und MCP-Konfiguration behalten. Falls Context9 - Bring Live Doc into Your Agent Context eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇