Logo van Connapse

Connapse

Community
Destrayon

Open-source, self-hosted knowledge backend for AI agents — hybrid search (vector + keyword), MCP server, 5 connectors, Docker-ready

UitgeverDestrayon
RepositoryConnapse
TaalC#
Forks
6
Sterren
18
Beschikbare tools
0
Transporttypestdio, streamable-http
Categorieën
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    Connapse biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    18 sterren en 6 forks in de gekoppelde repository.

Your AI agents forget everything between sessions. Connapse fixes that.

Every time you start a new conversation, your AI agent starts from zero — no memory of past research, no access to your documents, no accumulated knowledge. Connapse is an open-source knowledge backend that gives agents persistent, searchable memory. Upload documents or point it at your existing Amazon S3 buckets or local filesystems. Agents query and build their own research corpus via 11 MCP tools, REST API, or CLI. Container-isolated, hybrid search (vector + keyword), self-hosted and private. Deploy in 60 seconds with Docker. Built on .NET 10.

AI agents query your knowledge base through the MCP server, receiving structured answers with source citations from your documents.

Switch embedding providers, tune chunking parameters, and configure search — all at runtime, without restarting.


📦 Quick Start

bash
git clone https://github.com/Destrayon/Connapse.git && cd Connapse && docker-compose up -d
# Open http://localhost:5001

Prerequisites

Run with Docker Compose

bash
# Clone the repository
git clone https://github.com/Destrayon/Connapse.git
cd Connapse

# Set required auth environment variables (or use a .env file)
export CONNAPSE_ADMIN_EMAIL=admin@example.com
export CONNAPSE_ADMIN_PASSWORD=YourSecurePassword123!
export Identity__Jwt__Secret=$(openssl rand -base64 64)

# Start all services (PostgreSQL, MinIO, Web App)
docker-compose up -d

# Open http://localhost:5001 — log in with the admin credentials above

The first run will:

  1. Pull Docker images (~2-5 minutes)
  2. Initialize PostgreSQL with pgvector extension and run EF Core migrations
  3. Create MinIO buckets
  4. Seed the admin account (from env vars) and start the web application

Development Setup

bash
# Start infrastructure only (database + object storage)
docker-compose up -d postgres minio

# Run the web app locally
dotnet run --project src/Connapse.Web

# Run all tests
dotnet test

# Run just unit tests
dotnet test --filter "Category=Unit"

Command-line client

The connapse CLI is published separately at Destrayon/connapse-cli.

Install:

bash
dotnet tool install -g Connapse.CLI
# or: download a binary from https://github.com/Destrayon/connapse-cli/releases/latest

Get started:

bash
connapse auth login --server https://localhost:5001
connapse --help

Using with Claude (MCP)

Connapse includes a Model Context Protocol (MCP) server for integration with Claude and any MCP client.

Setup: Create an agent API key via the web UI (Settings → Agent API Keys), then add the config snippet for your client:

bash
claude mcp add connapse --transport streamable-http http://localhost:5001/mcp --header "X-Agent-Api-Key: YOUR_API_KEY"

Add to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "connapse": {
      "transport": "streamable-http",
      "url": "http://localhost:5001/mcp",
      "headers": {
        "X-Agent-Api-Key": "YOUR_API_KEY"
      }
    }
  }
}

Add to your .vscode/settings.json (VS Code) or Cursor MCP config:

json
{
  "mcp": {
    "servers": {
      "connapse": {
        "transport": "streamable-http",
        "url": "http://localhost:5001/mcp",
        "headers": {
          "X-Agent-Api-Key": "${input:connapseApiKey}"
        }
      }
    }
  }
}

VS Code will prompt for the API key on first use.

The MCP server exposes:

ToolDescription
container_createCreate a new container for organizing files
container_listList all containers with document counts
container_deleteDelete a container
container_statsGet container statistics (documents, chunks, storage, embeddings)
upload_fileUpload a single file to a container
bulk_uploadUpload up to 100 files in one operation
list_filesList files and folders at a path
get_documentRetrieve full parsed text content of a document
delete_fileDelete a single file from a container
bulk_deleteDelete up to 100 files in one operation
search_knowledgeSemantic, keyword, or hybrid search within a container

Full reference: See docs/mcp-tools.md for parameter tables, return formats, error cases, and usage examples.

Containers and sources: container_list tags each scope managed or source. A source is an external system Connapse mirrors read-only — searchable, but never browsable and never writable. list_files and every write tool resolve containers only; pass a source id and they report it as not found. See docs/connectors.md.

  • "Create a container called 'project-research' for my architecture notes"
  • "Upload all the PDFs in my downloads folder to the project-research container"
  • "Search my project-research container for information about rate limiting strategies"
  • "List all files in the /notes/ folder of my project-research container"
  • "Get the full text of distributed-systems-notes.md from project-research"
  • "Delete meeting-2026-03-14.md from project-research and upload this updated version"
  • "Delete all files in the /drafts/ folder of project-research"
  • "How many documents and chunks are in my project-research container?"

Connection refused on localhost:5001 — Docker not running or port conflict. Check docker compose ps and docker compose logs web.

401 Unauthorized / API key not working — Verify the key in Settings > Agent API Keys. Keys are shown once at creation.

Tools not appearing in Claude — Restart your MCP client after config changes. Verify endpoint with curl http://localhost:5001/mcp.

Uploads failing or timing out — Check file type is in the allowlist. Max file size depends on server config.

Search returns no results — Documents need time to embed after upload. Check container stats for embedding progress.


🚀 Features

  • 🗂️ Container-Isolated Knowledge — Each project gets its own vector index, storage connector, and search configuration. No cross-contamination between projects, teams, or clients.
  • 🔍 Hybrid Search — Vector similarity + keyword full-text with configurable fusion (convex combination, DBSF, AutoCut). Get results that pure vector search misses.
  • 🧠 Multi-Provider AI — Swap between Ollama, OpenAI, Azure OpenAI, and Anthropic for both embeddings and LLM — at runtime, per container, without restarting.
  • 🔌 Index Your Existing Storage — Connect MinIO, local filesystem (live file watching), or Amazon S3 (IAM auth). Your files stay where they are.
  • 🤖 4 Access Surfaces — Web UI, REST API, CLI (native binaries), and MCP server for Claude. Built for humans, scripts, and AI agents equally.
  • 🔐 Enterprise Auth — Multi-tier RBAC (Cookie + OAuth 2.1 + PAT + JWT) with AWS identity linking. Per-user filtering of search results by AWS permissions is enforced once identity linking is configured (opt-in; unrestricted until then).
  • 🐳 One-Command Deploy — Docker Compose with PostgreSQL + pgvector, MinIO, and optional Ollama. Structured audit logging and rate limiting built in.
  • 📄 Multi-Format Ingestion: PDF, Office documents, Markdown, plain text — parsed, chunked, and embedded automatically
  • ⚡ Real-Time Processing: Background ingestion with live progress updates via SignalR
  • 🎛️ Runtime Configuration: Change chunking strategy, embedding model, and search settings per container without restart
  • ☁️ Cloud Identity Linking: AWS IAM Identity Center (SAML) identity linking. Per-user AWS permission filtering is enforced once configured (opt-in; unrestricted until then)
  • 👥 Invite-Only Access: Admin-controlled user registration with four roles (Admin / Editor / Viewer / Agent)
  • 🤖 Agent Management: Dedicated agent entities with API key lifecycle, scoped permissions, and audit trails
  • 📋 Audit Logging: Structured audit trail for uploads, deletes, container operations, and auth events
  • 📦 CLI Distribution: Native self-contained binaries (Windows/Linux/macOS) and .NET global tool via NuGet
  • 🔄 Cross-Model Search: Switch embedding models mid-project — automatic Semantic→Hybrid fallback for legacy vectors

🎯 Who Is Connapse For?

  • AI agent developers who need a knowledge backend their agents can both query and build — upload research, curate a corpus, and search it via MCP or REST API
  • .NET / Azure teams who want a RAG platform that fits their existing stack and cloud identity
  • Enterprise teams who need project-isolated knowledge bases with proper RBAC and audit trails
  • Anyone tired of re-uploading files — point Connapse at your existing Amazon S3/filesystem storage

This project is in active development (v0.3.2) and approaching production-readiness.

v0.3.x adds cloud connector architecture, multi-provider embeddings and LLM support, cloud identity linking, and rate limiting.

  • ✅ Authentication and authorization (v0.2.0)
  • ✅ Role-based access control (Admin / Editor / Viewer / Agent)
  • ✅ Audit logging
  • ✅ Cloud identity linking — AWS IAM Identity Center (SAML)
  • ✅ Per-user search filtering (opt-in) — enforced once AWS identity linking is configured (AWS S3 Access Grants, fail-closed); unconfigured deployments have no per-user filtering, see SECURITY.md
  • ✅ Rate limiting — built-in ASP.NET Core middleware with per-user and per-IP policies (v0.3.2)
  • ⚠️ Set a strong Identity__Jwt__Secret in production — see deployment guide

See SECURITY.md for the full security policy.


🏗️ Architecture

┌──────────────────────────────────────────────────────────────────────┐
│                         Access Surfaces                              │
│  Web UI (Blazor)  │  REST API  │  CLI  │  MCP Server                │
└─────────────┬────────────────────────────────────────────────────────┘
              │
┌─────────────▼────────────────────────────────────────────────────────┐
│                       Core Services Layer                            │
│  Document Store  │  Vector Store  │  Search  │  Ingestion           │
└─────────────┬────────────────────────────────────────────────────────┘
              │
┌─────────────▼────────────────────────────────────────────────────────┐
│                        Connectors Layer                              │
│  MinIO  │  Filesystem  │  Amazon S3  │                               │
└─────────────┬────────────────────────────────────────────────────────┘
              │
┌─────────────▼────────────────────────────────────────────────────────┐
│                        Infrastructure                                │
│  PostgreSQL+pgvector  │  MinIO (S3)  │  Ollama (optional)           │
└──────────────────────────────────────────────────────────────────────┘

Data Flow: Upload → Search

[Upload] → [Parse] → [Chunk] → [Embed] → [Store] → [Searchable]
              ↓
         [Metadata]
              ↓
        [Document Store]

Target: < 30 seconds from upload to searchable.

Key Technologies:

  • Database: PostgreSQL 17 + pgvector for vector embeddings
  • Object Storage: Managed Storage abstraction — MinIO (S3-compatible) by default, overridable per deployment
  • Backend: ASP.NET Core 10 Minimal APIs
  • Frontend: Blazor Server (interactive mode)
  • Embeddings: Ollama (default), OpenAI, Azure OpenAI (configurable)
  • LLM: Ollama, OpenAI, Azure OpenAI, Anthropic (configurable)
  • Search: Hybrid vector + keyword with convex combination fusion
  • Connectors: Managed Storage (MinIO default), Filesystem, Amazon S3

📚 Documentation


🗺️ Roadmap

Connapse is pre-1.0. Major design work is tracked in Discussions.

v0.1.0 — Foundation (Complete)

  • ✅ Document ingestion pipeline (PDF, Office, Markdown, text)
  • ✅ Hybrid search (vector + keyword with convex combination fusion)
  • ✅ Container-based file browser with folders
  • ✅ Web UI, REST API, CLI, MCP server

v0.2.0 — Security & Auth (Complete)

  • ✅ Three-tier auth: Cookie + Personal Access Tokens + JWT (HS256)
  • ✅ Role-based access control (Admin / Editor / Viewer / Agent)
  • ✅ Invite-only user registration (admin-controlled)
  • ✅ First-class agent entities with API key lifecycle
  • ✅ Agent management UI + PAT management UI
  • ✅ Audit logging (uploads, deletes, container operations)
  • ✅ CLI auth commands (auth login, auth whoami, auth pat)
  • ✅ GitHub Actions release pipeline (native binaries + NuGet tool)
  • ✅ 256 passing tests (unit + integration)

v0.3.0 — Connector Architecture (Complete)

  • ✅ 3 connector types: Managed Storage (MinIO default, provider-abstracted), Filesystem (FileSystemWatcher), Amazon S3 (IAM-only)
  • ↩️ Azure Blob Storage connector (managed identity) — shipped in v0.3.0, since removed (#476): it was unverified and torn down for a clean rebuild
  • ✅ Per-container settings overrides (chunking, embedding, search, upload)
  • ↩️ Cloud identity linking: Azure AD (OAuth2+PKCE) — shipped in v0.3.0, since removed (#476) alongside the Azure Blob connector
  • ↩️ AWS IAM Identity Center (device auth flow) — shipped in v0.3.0, since removed (#435): the device flow could not carry a per-user identity through to a token
  • ⚠️ IAM-derived scope enforcement — the v0.3.0 CloudScopeService was built but never wired into search (#422) and has since been removed; per-user AWS search filtering was rebuilt on ISearchScopeResolver + AWS S3 Access Grants (epic #436) — opt-in, fail-closed once AWS identity linking is configured
  • ✅ Multi-provider embeddings: Ollama, OpenAI, Azure OpenAI
  • ✅ Multi-provider LLM: Ollama, OpenAI, Azure OpenAI, Anthropic
  • ✅ Multi-dimension vector support with partial IVFFlat indexes per model
  • ✅ Cross-model search: automatic Semantic→Hybrid fallback for legacy vectors
  • ✅ Background sync: FileSystemWatcher for local, 5-min polling for cloud containers
  • ✅ Connection testing for all providers (Amazon S3, MinIO, LLM, embeddings)
  • ✅ 457 passing tests (unit + integration)

v0.3.2 — Hardening & Polish (Complete)

  • ✅ Input validation hardening: filename length, path depth, control characters, search params, agent fields
  • ✅ Security fixes: empty API key auth bypass, path traversal, security headers middleware
  • ✅ Unified upload pipeline (IUploadService) shared by API and MCP
  • ✅ File type allowlist for uploads
  • ✅ Rate limiting middleware (per-user and per-IP)
  • ✅ Bulk MCP tools: bulk_upload and bulk_delete
  • ✅ CLI improvements: files commands, container stats, --pre updates, --help flags
  • ✅ Self-hosted fonts (no CDN dependencies)
  • ✅ Docker release package on ghcr.io

Future

  • v0.4.0: Communication connectors (Slack, Discord). (Per-user AWS search permissions — epic #436, via IAM Identity Center SAML identity linking, not Cognito — has already shipped.)
  • v0.5.0: Knowledge platform connectors (Notion, Confluence, GitHub)
  • v1.0.0: Production-ready stable release

❓ FAQ

Does Connapse require internet access? — No. Use Ollama for fully offline embeddings and search.

How many documents can it handle? — Thousands per container. Built on PostgreSQL + pgvector.

Which MCP clients work with Connapse? — Any client supporting Streamable HTTP transport — Claude Desktop, Claude Code, VS Code, Cursor, and others.

Is my data private? — Fully self-hosted. With Ollama, nothing leaves your machine. Cloud providers (OpenAI, Azure) are optional.

What embedding providers are supported? — Ollama (local), OpenAI, and Azure OpenAI. Switch at runtime without re-deploying.


🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Quick contribution checklist:

  • Fork the repo and create a feature branch
  • Follow code conventions in CONTRIBUTING.md
  • Write tests for new features (xUnit + FluentAssertions)
  • Ensure all tests pass: dotnet test
  • Update documentation if needed
  • Submit a pull request

Good first issues: Check issues labeled good-first-issue


📄 License

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

You are free to:

  • ✅ Use commercially
  • ✅ Modify
  • ✅ Distribute
  • ✅ Sublicense
  • ✅ Use privately

The only requirement is to include the copyright notice and license in any substantial portions of the software.


💬 Support & Community


🙏 Acknowledgments

Built with:


⭐ If you find this project useful, please star the repository to show your support!

Installatie

TypingMind
Vereisten:

Node.js 18+

{
  "mcpServers": {
    "destrayon-connapse": {
      "command": "npx",
      "args": [
        "-y",
        "Connapse"
      ]
    }
  }
}

Gebruik Connapse MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra Connapse is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Je kunt MCP lokaal op je apparaat uitvoeren of verbinding maken met de URL van een externe MCP-server.

Optie 1: Gebruik de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg Connapse toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van Connapse.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "destrayon-connapse": {
      "command": "npx",
      "args": [
        "-y",
        "Connapse"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van Connapse in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van Connapse in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Connapse gebruiken om me hiermee te helpen?
Connapse
Zeker. Ik heb het gelezen.
Dit vond ik met Connapse.

Optie 2: Voeg een MCP-server-URL toe

Gebruik dit als Connapse al extern wordt gehost of als je team één gedeelde connector wil die meerdere gebruikers kunnen gebruiken.

1

Open MCP-connectoren

Ga in TypingMind naar Plug-ins, open MCP-connectoren en kies URL toevoegen.

  1. Open TypingMind in je browser.
  2. Ga naar Plug-ins.
  3. Open MCP-connectoren.
  4. Klik op URL toevoegen.
TypingMind-formulier om een eigen MCP-server-URL toe te voegen
2

Plak de server-URL

Voer je server-URL in het veld Server-URL in. Voeg een verbindingsnaam, beschrijving, icoon, aangepaste HTTP-headers of OAuth-clientinstellingen toe als de server die vereist.

  1. Plak je server-URL in het veld Server-URL.
  2. Voer een verbindingsnaam in voor Connapse.
  3. Voeg een beschrijving en een icoon toe om de verbinding makkelijker te herkennen.
  4. Voeg aangepaste HTTP-headers of OAuth-clientgegevens toe als de server authenticatie vereist.
3

Maak de verbinding

Klik op Verbinding maken, ga terug naar de lijst met plug-ins en controleer of de nieuwe MCP-verbinding actief is.

  1. Klik op Verbinding maken.
  2. Ga terug naar de lijst met MCP-connectoren.
  3. Controleer of de verbinding met Connapse als actief wordt weergegeven.
  4. Vernieuw de lijst met plug-ins als de verbinding niet meteen verschijnt.
4

Wissel van model zonder opnieuw verbinding te maken

Start een chat met je favoriete model, schakel de tools van Connapse in via Plug-ins en wissel van model wanneer dat nodig is. De MCP-verbinding blijft beschikbaar in de TypingMind-werkruimte.

  1. Start een nieuwe chat in TypingMind.
  2. Selecteer het AI-model dat je wilt gebruiken.
  3. Schakel de tools van Connapse in via Plug-ins.
  4. Vraag het model om de tool te gebruiken wanneer dat nodig is.
  5. Schakel over naar een ander AI-model en gebruik dezelfde MCP-verbinding opnieuw.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Connapse gebruiken om me hiermee te helpen?
Connapse
Zeker. Ik heb het gelezen.
Dit vond ik met Connapse.

Veelgestelde vragen

Waarvoor wordt de MCP-server Connapse gebruikt?

Connapse is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik Connapse MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je Connapse gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom Connapse MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als Connapse verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik Connapse MCP met TypingMind?

Je kunt Connapse met TypingMind verbinden via de lokale MCP-connector of door de URL van een externe MCP-server toe te voegen. Gebruik de lokale connector als de server toegang nodig heeft tot bestanden, apps of privébronnen op je apparaat. Gebruik een server-URL als de MCP-server extern wordt gehost.

Welke tools biedt Connapse MCP in TypingMind?

Connapse biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om Connapse MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als Connapse authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇