Back to MCP Servers

Connapse

Self-hosted knowledge backend for AI agents with hybrid vector + keyword search, container-isolated indexes, and 11 MCP tools. .NET, Docker-ready.

knowledge-memorydockeraiagent
By Destrayon
134Updated 3 weeks agoC#MIT

Installation

npx -y Connapse

Configuration

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

How to use

  1. Run the installation command above (if needed)
  2. Open your Claude Code settings file (~/.claude/settings.json)
  3. Add the configuration to the mcpServers section
  4. Restart Claude Code to apply changes
<p align="center"> <img src="connapse-logo-v27-teal.svg" alt="Connapse logo" width="375" /> </p> <p align="center"> <em>Stop losing context between AI sessions. Give your agents persistent, searchable memory.</em> </p> <p align="center"> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a> <a href="https://dotnet.microsoft.com/"><img src="https://img.shields.io/badge/.NET-10.0-512BD4" alt=".NET"></a> <a href="https://github.com/Destrayon/Connapse/actions"><img src="https://img.shields.io/github/actions/workflow/status/Destrayon/Connapse/ci.yml?branch=main&label=build" alt="Build"></a> <a href="https://github.com/Destrayon/Connapse/actions"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Destrayon/Connapse/badges/tests.json" alt="Tests"></a> <a href="CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a> <a href="https://github.com/Destrayon/Connapse/issues"><img src="https://img.shields.io/github/issues/Destrayon/Connapse" alt="GitHub Issues"></a> <a href="https://github.com/Destrayon/Connapse/stargazers"><img src="https://img.shields.io/github/stars/Destrayon/Connapse?style=social" alt="GitHub Stars"></a> <a href="https://glama.ai/mcp/servers/Destrayon/Connapse"><img src="https://glama.ai/mcp/servers/Destrayon/Connapse/badges/score.svg" alt="Connapse MCP server"></a> <a href="https://github.com/Destrayon/Connapse#-quick-start"><img src="https://img.shields.io/badge/Docker-ready-2496ED?logo=docker" alt="Docker"></a> </p> <p align="center"> <img src="docs/demos/hero-upload-search.gif" alt="Connapse demo — upload a PDF, search with hybrid vector and keyword search, get results with source citations in seconds" width="720" /> </p>

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, Azure Blob Storage containers, 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.

<details> <summary><strong>🤖 AI Agent Integration</strong> — Claude queries and builds your knowledge base via MCP</summary> <br> <p align="center"> <img src="docs/demos/mcp-agent-integration.gif" alt="Claude querying Connapse knowledge base via MCP server — asks about preventing cascading failures in microservices, gets structured answer with circuit breaker pattern details cited from distributed-systems-notes.md" width="720" /> </p>

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

</details> <details> <summary><strong>🎛️ Your Knowledge, Your Rules</strong> — Runtime configuration without restarting</summary> <br> <p align="center"> <img src="docs/demos/settings-providers.gif" alt="Connapse settings panel — switching embedding providers, adjusting chunking parameters, and configuring search settings at runtime without restart" width="720" /> </p>

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

</details>

📦 Quick Start

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

Prerequisites

Run with Docker Compose

# 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

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

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

Get started:

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:

<details> <summary><strong>Claude Code (CLI)</strong></summary>
claude mcp add connapse --transport streamable-http http://localhost:5001/mcp --header "X-Agent-Api-Key: YOUR_API_KEY"
</details> <details> <summary><strong>Claude Desktop</strong></summary>

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "connapse": {
      "transport": "streamable-http",
      "url": "http://localhost:5001/mcp",
      "headers": {
        "X-Agent-Api-Key": "YOUR_API_KEY"
      }
    }
  }
}
</details> <details> <summary><strong>VS Code / Cursor</strong></summary>

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

{
  "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.

</details>

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.

Write guards: Amazon S3 and Azure Blob Storage containers are read-only (synced from source). Filesystem containers respect per-container permission flags. Upload and delete tools will return an error for containers that block writes.

<details> <summary><strong>Example prompts</strong> — what to ask your agent</summary>
  • "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?"
</details> <details> <summary><strong>Troubleshooting</strong></summary>

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.

</details>

🚀 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), Amazon S3 (IAM auth), or Azure Blob Storage (managed identity). 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 IAM Identity Center and Azure AD identity linking. Cloud permissions are the source of truth.
  • 🐳 One-Command Deploy — Docker Compose with PostgreSQL + pgvector, MinIO, and optional Ollama. Structured audit logging and rate limiting built in.
<details> <summary><strong>See all features</strong></summary>
  • 📄 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 (device auth flow) + Azure AD (OAuth2+PKCE) with IAM-derived scope enforcement
  • 👥 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
</details>

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

View source on GitHub