TxtAI Assistant MCP
About
Model Context Protocol (MCP) server implementation for semantic vector search and memory management using TxtAI. This server provides a robust API for storing, retrieving, and managing text-based memories with semantic vector database search capabilities. You can use Claude and C
Explore
- 🔍 Semantic search across stored memories
- 💾 Persistent storage with file-based backend
- 🏷️ Tag-based memory organization and retrieval
- 📊 Memory statistics and health monitoring
- 🔄 Automatic data persistence
- 📝 Comprehensive logging
- 🔒 Configurable CORS settings
- 🤖 Integration with Claude and Cline AI
- Python 3.8 or higher
- pip (Python package installer)
- virtualenv (recommended)
HOST=0.0.0.0
PORT=8000
CORS_ORIGINS=*
LOG_LEVEL=DEBUG
MAX_MEMORIES=0
To use this server with Claude, add it to Claude's MCP configuration file (typically located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
json{
"mcpServers": {
"txtai-assistant": {
"command": "path/to/txtai-assistant-mcp/scripts/start.sh",
"env": {}
}
}
}
To use with Cline, add the server configuration to Cline's MCP settings file (typically located at ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):
json{
"mcpServers": {
"txtai-assistant": {
"command": "path/to/txtai-assistant-mcp/scripts/start.sh",
"env": {}
}
}
}
In Claude or Cline, you can use these tools through the MCP protocol:
pythonOnce configured, the following tools become available to Claude and Cline:
1. store_memory: Store new memory content with metadata and tags
{
"content": "Memory content to store",
"metadata": {
"source": "conversation",
"timestamp": "2023-01-01T00:00:00Z"
},
"tags": ["important", "context"],
"type": "conversation"
}
2. retrieve_memory: Retrieve memories based on semantic search
{
"query": "search query",
"n_results": 5
}
3. search_by_tag: Search memories by tags
{
"tags": ["important", "context"]
}
4. delete_memory: Delete a specific memory by content hash
{
"content_hash": "hash_value"
}
5. get_stats: Get database statistics
{}
6. check_health: Check database and embedding model health
{}
A Model Context Protocol (MCP) server implementation for semantic search and memory management using txtai. This server provides a robust API for storing, retrieving, and managing text-based memories with semantic search capabilities.
About txtai
This project is built on top of txtai, an excellent open-source AI-powered search engine created by NeuML. txtai provides:
- 🔍 All-in-one semantic search solution
- 🧠 Neural search with transformers
- 💡 Zero-shot text classification
- 🔄 Text extraction and embeddings
- 🌐 Multi-language support
- 🚀 High performance and scalability
We extend txtai's capabilities by integrating it with the Model Context Protocol (MCP), enabling AI assistants like Claude and Cline to leverage its powerful semantic search capabilities. Special thanks to the txtai team for creating such a powerful and flexible tool.
Features
- 🔍 Semantic search across stored memories
- 💾 Persistent storage with file-based backend
- 🏷️ Tag-based memory organization and retrieval
- 📊 Memory statistics and health monitoring
- 🔄 Automatic data persistence
- 📝 Comprehensive logging
- 🔒 Configurable CORS settings
- 🤖 Integration with Claude and Cline AI
Prerequisites
- Python 3.8 or higher
- pip (Python package installer)
- virtualenv (recommended)
Installation
1. Clone this repository:
git clone https://github.com/yourusername/txtai-assistant-mcp.git
cd txtai-assistant-mcp
2. Run the start script:
./scripts/start.sh
The script will:
- Create a virtual environment
- Install required dependencies
- Set up necessary directories
- Create a configuration file from template
- Start the server
Configuration
The server can be configured using environment variables in the .env file. A template is provided at .env.template:
```ini
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



