π¦ Saqr-MCP
About
Saqr-MCP is a powerful Python application that implements the Model Context Protocol (MCP) to enable advanced AI assistant capabilities. It supports both local models through Ollama and cloud models through Groq, providing a flexible client-server architecture
Details
- Author
- ahmedhassan456
- GitHub stars
- 2
- Downloads
- 163
- Categories
- AI
Jump to
- Interactive chat interface for querying models
- Support for local models (Ollama) and cloud models (Groq)
- Advanced web search capabilities using Tavily API
- Word document generation from markdown content
- Comprehensive memory management system using mem0
- Advanced reasoning and thought process tracking
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
π¦ Saqr-MCPCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install dependencies with UV, configure environment variables (API keys for Tavily, Groq, Mem0; Ollama model name), and run python main.py. Type queries in the interactive console; use quit to exit. To use Groq instead of Ollama, modify main.py to import from src.groq_client.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"\ud83e\udd85 saqr-mcp": {
"Saqr-MCP": {
"command": "uv",
"args": [
"venv"
]
}
}
}
}
McpServers
{
"Saqr-MCP": {
"command": "uv",
"args": [
"venv"
]
}
}
<div align="center">
<h1>π¦
Saqr-MCP</h1>
<p align="left">
Saqr-MCP is a powerful Python application that implements the Model Context Protocol (MCP) to enable advanced AI assistant capabilities. It supports both local models through Ollama and cloud models through Groq, providing a flexible client-server architecture. The server component offers a rich set of tools including web search, memory management, document generation, and advanced reasoning capabilities.</p>
</div>
β¨ Features
- π€ Interactive chat interface for querying models
- π Support for both local models (Ollama) and cloud models (Groq)
- π Advanced web search capabilities using Tavily API
- π Word document generation from markdown content
- π§ Comprehensive memory management system using mem0
- π Advanced reasoning and thought process tracking
- β‘ Async architecture for efficient processing
- π¨ Visual loading animations for better user experience
- π Session-based thought logging and analysis
- π Document generation with markdown support
π Prerequisites
- π Python 3.11 or higher
- π¦ Ollama installed with local models (for local model usage)
- π¦ UV package manager (recommended)
π Installation
1. Clone this repository:
git clone https://github.com/ahmedhassan456/Saqr-MCP.git
cd saqr-mcp
2. Create and activate a virtual environment (optional but recommended):
uv venv
# On Windows
.venv\Scripts\activate
# On Unix or MacOS
source venv/bin/activate
3. Install dependencies:
uv add -r requirements.txt
4. Set up environment variables:
- Copy .env.example to .env
- Configure the following variables:
- π MODEL_NAME: Your preferred Ollama model (e.g., qwen3:1.7b)
- π TAVILY_API_KEY: Your Tavily API key from Tavily website
- β‘ GROQ_MODEL_NAME: Your preferred Groq model name
- π GROQ_API_KEY: Your Groq API key from Groq website
- π§ MEM0_API_KEY: Your Mem0 API key from Mem0 website
π» Usage
1. For local model usage, ensure Ollama is running with your chosen model available
2. Configure the client:
- By default, the application uses Ollama client (from src.ollama_client import SaqrMCPClient)
- To use Groq instead, modify main.py to use from src.groq_client import SaqrMCPClient
3. Run the client:
python main.py
4. Type your queries in the interactive console:
MCP Client Started!
Type your queries or 'quit' to exit.
Query:
5. Type quit to exit the application
π Project Structure
- π main.py - Entry point that starts the MCP client
- π src/
- π ollama_client.py - MCP client implementation for Ollama models
- β‘ groq_client.py - MCP client implementation for Groq models
- π οΈ server.py - MCP server implementation with all tools
- π logger.py - Custom logging utilities with visual animations
π οΈ Available Tools
The server implements a comprehensive set of tools for various functionalities:
π Web Search and Document Generation
- web_search: Performs real-time web searches using Tavily API to retrieve up-to-date information - word_file_generator: Creates Microsoft Word documents from markdown content with proper formattingπ§ Memory Management
- add_memory: Stores new memories with specified types and content in mem0 - get_all_memories: Retrieves all stored memories, optionally filtered by type - search_memories: Performs semantic search through stored memories to find relevant informationπ Reasoning and Thought Process
- think: Records thoughts and reasoning processes for complex problem-solving - get_thoughts: Retrieves all thoughts recorded in the current session - clear_thoughts: Clears all recorded thoughts from the current session - get_thought_stats: Provides detailed statistics about recorded thoughtsβοΈ Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| π OLLAMA_MODEL_NAME | The name of the Ollama model to use (e.g., qwen3:1.7b) | None |
| π TAVILY_API_KEY | Tavily API Key for web search capabilities | None |
| β‘ GROQ_MODEL_NAME | The name of the Groq model to use | None |
| π GROQ_API_KEY | Groq API Key for cloud model access | None |
| π§ MEM0_API_KEY | Mem0 API Key for memory management | None |
π¦ Dependencies
- π mcp[cli] - Model Context Protocol implementation
- π httpx - HTTP client for Python
- π loguru - Python logging made simple
- β‘ groq - Groq API client
- π¦ ollama - Interface to Ollama for local models
- π tavily-python - Search Engine tailored for AI agents
- π fastapi - Web framework for building APIs
- β‘ uvicorn - ASGI server implementation
- π htmldocx - HTML to DOCX converter
- π duckduckgo-search - Search engine integration
- π python-docx - DOCX file handling
- π markdown - Markdown processing
- π§ mem0 - Memory management system
π License
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. π΄ Fork the repository
2. πΏ Create your feature branch (git checkout -b feature/amazing-feature)
3. πΎ Commit your changes (git commit -m 'Add some amazing feature')
4. π€ Push to the branch (git push origin feature/amazing-feature)
5. π Open a Pull Request
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
