Skip to main content

A templated MCP server for demonstration and quick start.

Project description

sokrates-mcp

A MCP server offering tools for prompt refinement and execution workflows using the FastMCP framework and the sokrates python library.

Features

  • Multiple provider/APU support
  • Available Model/Provider listing
  • Prompt refinement with different types (code/default)
  • External LLM processing
  • Task breakdown into sub-tasks
  • Create code reviews for Python source files
  • Generate random ideas
  • Generate ideas to a topic

Have a look at the sokrates library.

Installation & Setup

Prerequisites

Ensure you have:

  • Python 3.10+
  • uv (fast package installer)

Install from PyPi

pip install sokrates-mcp

# or using uv (recommended)
## basic version: 
uv pip install sokrates-mcp

Alternative - Local Configuration from git

  1. Clone the repository if hosted:
git clone https://github.com/Kubementat/sokrates-mcp.git
cd sokrates-mcp
  1. Install dependencies using pyproject.toml:
uv sync

Setup Server Configuration File

Via git installed version

mkdir $HOME/.sokrates-mcp
cp config.yml.example $HOME/.sokrates-mcp/config.yml
# edit the according endpoints to your use case
vim $HOME/.sokrates-mcp/config.yml

From scratch

Create the configuration file:

mkdir $HOME/.sokrates-mcp
vim $HOME/.sokrates-mcp/config.yml

Then use this as template and adjust it to your use case:

refinement_prompt_filename: refine-prompt.md
refinement_coding_prompt_filename: refine-coding-v3.md

# providers
default_provider: local
providers:
  - name: local
    type: openai
    api_endpoint: http://localhost:1234/v1
    api_key: "not-required"
    default_model: "qwen/qwen3-4b-2507"
  - name: external
    type: openai
    api_endpoint: http://CHANGEME/v1
    api_key: CHANGEME
    default_model: CHANGEME

Setup as mcp server in other tools (Example for LM Studio)

For local Git installed version

{
  "mcpServers": {
    "sokrates": {
      "command": "uv",
      "args": [
        "run",
        "sokrates-mcp"
      ],
      "cwd": "YOUR_PATH_TO_sokrates-mcp",
      "timeout": 600000
    }
  }
}

via uvx

{
  "mcpServers": {
    "sokrates": {
      "command": "uvx",
      "args": [
        "sokrates-mcp"
      ]
    }
  }
}

Usage Examples

Starting the Server

# from local git repo
uv run sokrates-mcp

# without checking out the git repo
uvx sokrates-mcp

Listing available command line options

# from local git repo
uv run sokrates-mcp --help

# without checking out the git repo
uvx sokrates-mcp --help

Architecture & Technical Details

The server follows a modular design pattern:

  1. Tools are registered in main.py using FastMCP decorators
  2. Dependency management via pyproject.toml
  3. Configuration files stored in $HOME/.sokrates-mcp/ directory

Contributing Guidelines

  1. Fork the repository and create feature branches
  2. Follow PEP8 style guide with 4-space indentation
  3. Submit pull requests with:
    • Clear description of changes
    • Updated tests (see Testing section)
    • Documentation updates

Available Tools

See the main.py file for a list of all mcp tools in the server

Project Structure

  • src/sokrates_mcp/main.py: Sets up the MCP server and registers tools
  • src/sokrates_mcp/mcp_config.py: Configuration management
  • src/sokrates_mcp/utils.py: Helper and utility methods
  • src/sokrates_mcp/workflow.py: Business logic for prompt refinement and execution
  • pyproject.toml: Dependency management

Common Error: If you see "ModuleNotFoundError: fastmcp", ensure:

  1. Dependencies are installed (uv sync)
  2. Python virtual environment is activated

Changelog

0.4.0 (Aug 2025)

  • adds new tools:
    • read_files_from_directory
    • directory_tree
    • logging refactoring in workflow.py

0.3.0 (Aug 2025)

  • adds new tools:
    • roll_dice
    • read_from_file
    • store_to_file
  • refactorings - code quality - still ongoing

0.2.0 (Aug 2025)

  • First published version
  • Update to latest sokrates library version
  • bugfixes and cleanup
  • multi provider/API support in the configuration file

0.1.5 (July 2025)

  • Updated README with comprehensive documentation
  • Added tool descriptions and usage examples
  • Improved project structure overview

0.1.0 (March 7, 2025)

  • Initial release with refinement tools
  • Basic FastMCP integration

Bug reports and feature requests: GitHub Issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sokrates_mcp-0.4.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sokrates_mcp-0.4.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file sokrates_mcp-0.4.0.tar.gz.

File metadata

  • Download URL: sokrates_mcp-0.4.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for sokrates_mcp-0.4.0.tar.gz
Algorithm Hash digest
SHA256 0a80bc94278d2f2c07507f7fda2f2a1d705f3ebf1b054472b5e2b49f660e655c
MD5 59ab4834b312165af3b0d94c1e259cd6
BLAKE2b-256 a07c05920a05edd45b68c07dc4526e8ff46b5df975a51922ca95e1ddda731388

See more details on using hashes here.

File details

Details for the file sokrates_mcp-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sokrates_mcp-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1284470a47208e782517d430553fb30620b131c12030e878dde96643decf549
MD5 858035d09943e55d6333b2855e407162
BLAKE2b-256 012a1a576b4259247defac6163c5c2e4213a0856ed46873e10b34bc0bcaacb15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page