MCP Utils

by fulfilio

5 stars
127 downloads
Not rated
GitHub

About

A Python package with utilities and helpers for building MCP-compliant servers, often using Flask and Redis.

Details

Author
fulfilio
GitHub stars
5
Downloads
127
Categories
Developer Tools, Other

- Synchronous MCP server implementation
- Server-Sent Events (SSE) support
- Simple decorators for tools and prompts
- HTTP protocol with Streamable HTTP support
- Redis response queue for message handling
- Comprehensive Pydantic models for MCP schema
- Built-in validation and documentation

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:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Utils
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install with pip install mcp-utils. Create an MCPServer instance, decorate handlers with @mcp.tool() or @mcp.prompt(), and handle incoming requests via mcp.handle_message(). For production, deploy with Flask and Gunicorn.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp utils": {
            "mcp-utils": {
                "command": "npx",
                "args": [
                    "-y",
                    "@smithery/cli",
                    "install",
                    "mcp-proxy",
                    "--client",
                    "claude"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-utils": {
        "command": "npx",
        "args": [
            "-y",
            "@smithery/cli",
            "install",
            "mcp-proxy",
            "--client",
            "claude"
        ]
    }
}

mcp-utils

A Python utility package for building Model Context Protocol (MCP) servers.

Tests PyPI - Version

Table of Contents

- mcp-utils
- Table of Contents
- Overview
- Key Features
- Installation
- Requirements
- Optional Dependencies
- Usage
- Basic MCP Server
- Flask Example
- SQLAlchemy Transaction Handling Example
- Running with Gunicorn
- Connecting with MCP Clients
- Cursor
- Claude Desktop
- Installing via Smithery
- Installing via PyPI
- Contributing
- Related Projects
- License
- Testing with MCP Inspector
- Installation
- Usage

Overview

mcp-utils provides utilities and helpers for building MCP-compliant servers in Python, with a focus on synchronous implementations using Flask. This package is designed for developers who want to implement MCP servers in their existing Python applications without the complexity of asynchronous code.

Key Features

- Basic utilities for MCP server implementation
- Server-Sent Events (SSE) support
- Simple decorators for MCP endpoints
- Synchronous implementation
- HTTP protocol support
- Redis response queue
- Comprehensive Pydantic models for MCP schema
- Built-in validation and documentation

Installation

pip install mcp-utils

Requirements

- Python 3.10+
- Pydantic 2

Optional Dependencies

- Flask (for web server)
- Gunicorn (for production deployment)
- Redis (for response queue)

Usage

Basic MCP Server

Here's a simple example of creating an MCP server:

```python
from mcp_utils.core import MCPServer
from mcp_utils.schema import GetPromptResult, Message, TextContent, CallToolResult

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.