mcpField
πŸ¦…
πŸ¦… Saqr-MCP

πŸ¦… Saqr-MCP

Local
github.com/ahmedhassan456AI & Agents2Updated 72w ago

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

  1. 01Ollama and Groq model support
  2. 02Tavily web search
  3. 03Word document generation from Markdown
  4. 04mem0 memory storage and search
  5. 05Session thought logging and statistics

Use cases

  1. 01Searching for current web information
  2. 02Creating Word files from Markdown
  3. 03Saving and retrieving memory by type
  4. 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.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

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

Python Version License UV Package Manager

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.

image

✨ 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

VariableDescriptionDefault
πŸ”‘ OLLAMA_MODEL_NAMEThe name of the Ollama model to use (e.g., qwen3:1.7b)None
πŸ” TAVILY_API_KEYTavily API Key for web search capabilitiesNone
⚑ GROQ_MODEL_NAMEThe name of the Groq model to useNone
πŸ” GROQ_API_KEYGroq API Key for cloud model accessNone
🧠 MEM0_API_KEYMem0 API Key for memory managementNone

πŸ“¦ 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

MIT

🀝 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

Comments

Markdown supported

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.