astra-knowledge-base-mcp
Provides a persistent, searchable knowledge base using PostgreSQL with tsvector full-text search and optional pgvector for embeddings.
Provides a persistent, searchable knowledge base using SQLite with FTS5 for full-text search and automatic content chunking.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@astra-knowledge-base-mcpsearch my knowledge bases for 'API authentication'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
astra-knowledge-base-mcp
MCP (Model Context Protocol) server for managing and searching multi-tenant knowledge bases.
Part of Astra AI Agent Infrastructure
Overview
Astra Knowledge Base MCP provides AI agents with persistent, searchable knowledge bases backed by SQLite + FTS5 — zero external dependencies, one file per deployment.
Each knowledge base is an isolated namespace with full-text search. Content is auto-chunked on ingestion using recursive text splitting.
Related MCP server: agent-memory
Prerequisites
Python 3.11+
uv — Python package manager (
pip install uv)
Setup
1. Install dependencies
uv sync2. Start
uv run server.pyThe database file is created at ~/.astra/knowledge-base.db by default. Override with the ASTRA_KB_PATH environment variable.
Configuration
Variable | Default | Description |
|
| Backend: |
|
| PostgreSQL DSN (only used with |
|
| Path to the SQLite database file |
|
| Embedding backend: |
|
| URL for local llama.cpp embedding server |
|
| Embedding vector dimension |
|
| API key for siliconflow/API embedding backend |
|
| API endpoint URL (OpenAI-compatible |
|
| Model name for the API embedding backend |
Usage
MCP Tools
Tool | Description |
| List all knowledge bases with enable/disable status |
| Create a new empty knowledge base |
| Permanently delete a knowledge base and all its content |
| Enable a knowledge base (include in search results) |
| Disable a knowledge base (exclude from search) |
| Add text content to a knowledge base (auto-chunked) |
| Search across enabled (or specified) knowledge bases |
| List chunks in a knowledge base (paginated) |
| Update a chunk (replace or append mode) |
| Delete a single chunk by ID |
| List mgmt schema tables (services, health_log, api_keys) |
| Query operational data from mgmt tables |
Registering in Hermes Agent
Add to your Hermes config.yaml:
mcp_servers:
astra-knowledge-base:
command: /path/to/astra-knowledge-base-mcp/scripts/run.sh
enabled: trueThen restart Hermes Agent. The tools (kb_list, kb_search, etc.) become available automatically.
Architecture
AI Agent (Hermes)
│ MCP stdio protocol
▼
astra-knowledge-base-mcp (Python, uv run)
│
├── SQLite (stdlib) → ~/.astra/knowledge-base.db
│ ├── kb_registry ← KB metadata & status
│ ├── chunks ← Content storage
│ └── chunks_fts ← FTS5 virtual table
│
└── PostgreSQL (psycopg2) → astra_kb
├── kb_registry ← KB metadata & status
├── kb_*.chunks ← Per-KB schema (tsvector FTS)
└── mgmt ← Operational data (services, health_log, api_keys)Switch backends via ASTRA_KB_BACKEND=postgres or ASTRA_KB_BACKEND=sqlite (default).
Agent Guide
See AGENTS.md for AI-agent-oriented documentation (entry points, workflows, Hermes integration).
Related
astra-aiagent-infra — ecosystem portal
Hermes Agent — AI agent framework
MCP — Model Context Protocol
Dependencies
This service has no external dependencies. The SQLite database is managed entirely via Python stdlib (sqlite3).
License
MIT — see LICENSE.
CI/CD: coming soon — see astra-aiagent-infra for ecosystem-wide pipeline plans.
中文版
概述
Astra Knowledge Base MCP 为 AI Agent 提供基于 SQLite + FTS5 的持久化、可搜索知识库——零外部依赖,每个部署一个文件。
每个知识库是一个隔离的命名空间,支持全文搜索。内容引入时自动进行递归文本分块。
依赖关系
此服务无外部 astra 生态依赖。SQLite 数据库完全通过 Python 标准库 sqlite3 管理。
<p align="center">
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/alrcatraz/astra-knowledge-base-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server