About π¦ Saqr-MCP
Saqr-MCP is a Python MCP application for interactive use with Ollama local models or Groq cloud models. Its server provides tools for web search, document creation, memory, and session-based reasoning records.
Key features
- 01Ollama and Groq model support
- 02Tavily web search
- 03Word document generation from Markdown
- 04mem0 memory storage and search
- 05Session thought logging and statistics
Use cases
- 01Searching for current web information
- 02Creating Word files from Markdown
- 03Saving and retrieving memory by type
- 04Recording and reviewing reasoning during a session
MCP support
The application includes an MCP client for Ollama or Groq and an MCP server exposing search, document, memory, and reasoning tools.
Configuration
Local server config is the same for every client. Copy it into your clientβs MCP config file.
We havenβt collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEπ¦ Saqr-MCP
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.
β¨ 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
-
Clone this repository:
git clone https://github.com/ahmedhassan456/Saqr-MCP.git cd saqr-mcp -
Create and activate a virtual environment (optional but recommended):
uv venv # On Windows .venv\Scripts\activate # On Unix or MacOS source venv/bin/activate -
Install dependencies:
uv add -r requirements.txt -
Set up environment variables:
- Copy
.env.exampleto.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
- π
- Copy
π» Usage
-
For local model usage, ensure Ollama is running with your chosen model available
-
Configure the client:
- By default, the application uses Ollama client (
from src.ollama_client import SaqrMCPClient) - To use Groq instead, modify
main.pyto usefrom src.groq_client import SaqrMCPClient
- By default, the application uses Ollama client (
-
Run the client:
python main.py -
Type your queries in the interactive console:
MCP Client Started! Type your queries or 'quit' to exit. Query: -
Type
quitto 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.
- π΄ Fork the repository
- πΏ Create your feature branch (
git checkout -b feature/amazing-feature) - πΎ Commit your changes (
git commit -m 'Add some amazing feature') - π€ Push to the branch (
git push origin feature/amazing-feature) - π Open a Pull Request
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.