Logo de Connapse

Connapse

Comunidade
Destrayon

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

Publicado porDestrayon
RepositórioConnapse
IdiomaC#
Forks
6
Estrelas
18
Ferramentas disponíveis
0
Tipo de transportestdio, streamable-http
Categorias
LicençaMIT
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    Connapse disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 0 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    18 estrelas e 6 forks no repositório vinculado.

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!

Instalação

TypingMind
Pré-requisitos:

Node.js 18+

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

Use o MCP de Connapse com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar Connapse, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. É possível executar o MCP localmente no seu dispositivo ou se conectar à URL de um servidor MCP remoto.

Opção 1: use o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, vá até Configurações, Configurações avançadas e depois Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Ajustes.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione Connapse como servidor

Quando o status do conector for Pronto, clique em Editar e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar.
  3. Cole a configuração do servidor MCP de Connapse.
  4. Salve a lista de servidores.
  5. Atualize para confirmar se o conector ainda está pronto para uso.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar
{
  "mcpServers": {
    "destrayon-connapse": {
      "command": "npx",
      "args": [
        "-y",
        "Connapse"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de Connapse, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de Connapse.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar Connapse para me ajudar nesta tarefa?
Connapse
Claro. Já li.
Veja o que encontrei usando Connapse.

Opção 2: Adicione a URL de um servidor MCP

Use esta opção quando Connapse já estiver hospedado remotamente ou quando sua equipe quiser um conector compartilhado que vários usuários possam acessar.

1

Abra Conectores MCP

No TypingMind, vá até Plugins, abra Conectores MCP e selecione Adicionar URL.

  1. Abra o TypingMind no navegador.
  2. Acesse Plugins.
  3. Abra Conectores MCP.
  4. Clique em Adicionar URL.
Formulário do TypingMind para adicionar a URL de um servidor MCP personalizado
2

Cole a URL do servidor

Insira URL do seu servidor no campo URL do servidor. Adicione um nome para a conexão, uma descrição, um ícone, cabeçalhos HTTP personalizados ou configurações do cliente OAuth se o servidor exigir.

  1. Cole URL do seu servidor no campo URL do servidor.
  2. Digite um nome para a conexão de Connapse.
  3. Adicione uma descrição e um ícone para facilitar a identificação.
  4. Adicione cabeçalhos HTTP personalizados ou dados do cliente OAuth se o servidor exigir autenticação.
3

Crie a conexão

Clique em Criar conexão, volte à lista de Plugins e confirme que a nova conexão MCP está ativa.

  1. Clique em Criar conexão.
  2. Volte à lista de conectores MCP.
  3. Confirme que a conexão de Connapse aparece como ativa.
  4. Atualize a lista de plugins se a conexão não aparecer imediatamente.
4

Troque de modelo sem reconectar

Inicie um chat com seu modelo preferido, ative as ferramentas de Connapse em Plugins e mude para outro modelo sempre que necessário. A conexão MCP continua disponível no espaço de trabalho do TypingMind.

  1. Inicie um novo chat no TypingMind.
  2. Selecione o modelo de IA que deseja usar.
  3. Ative as ferramentas de Connapse em Plugins.
  4. Peça ao modelo para usar a ferramenta quando necessário.
  5. Mude para outro modelo de IA e reutilize a mesma conexão MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar Connapse para me ajudar nesta tarefa?
Connapse
Claro. Já li.
Veja o que encontrei usando Connapse.

Perguntas frequentes

Para que serve o servidor MCP Connapse?

Connapse é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP Connapse com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar Connapse com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP Connapse com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com Connapse conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP Connapse ao TypingMind?

É possível conectar Connapse ao TypingMind com o conector MCP local ou adicionando a URL de um servidor MCP remoto. Use o conector local quando o servidor precisar acessar arquivos, apps ou recursos privados no seu dispositivo, e use uma URL de servidor quando o servidor MCP estiver hospedado remotamente.

Quais ferramentas o MCP Connapse oferece no TypingMind?

Connapse disponibiliza recursos MCP que podem ser ativados na página Plugins do TypingMind e usados no chat ou atribuídos a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP Connapse?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se Connapse exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇