Labsco
fulfilio logo

MCP Utils

โ˜… 5

from fulfilio

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

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

mcp-utils

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

Table of Contents

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

Connecting with MCP Clients

Cursor

  • Edit MCP settings and add to configuration
{
  "mcpServers": {
    "server-name": {
      "url": "http://localhost:9000/mcp"
    }
  }
}

Claude Desktop

As of this writing, Claude Desktop does not support MCP through SSE and only supports stdio. To connect Claude Desktop with an MCP server, you'll need to use mcp-proxy.

Configuration example for Claude Desktop:

{
  "mcpServers": {
    "weather": {
      "command": "/Users/yourname/.local/bin/mcp-proxy",
      "args": ["http://127.0.0.1:9000/sse"]
    }
  }
}

Installing via Smithery

To install MCP Proxy for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install mcp-proxy --client claude

Installing via PyPI

The stable version of the package is available on the PyPI repository. You can install it using the following command:

# Option 1: With uv (recommended)
uv tool install mcp-proxy

# Option 2: With pipx (alternative)
pipx install mcp-proxy

Once installed, you can run the server using the mcp-proxy command.

  • MCP Python SDK - The official async Python SDK for MCP
  • mcp-proxy - A proxy tool to connect Claude Desktop with MCP servers

Testing with MCP Inspector

The MCP Inspector is a useful tool for testing and debugging MCP servers. It provides a web interface to inspect and test MCP server endpoints.

Installation

Install MCP Inspector using npm:

npm install -g @modelcontextprotocol/inspector

Usage

  1. Start your MCP server (e.g., the Flask example above)
  2. Run MCP Inspector:
git clone git@github.com:modelcontextprotocol/inspector.git
cd inspector
npm run build
npm start
  1. Open your browser and navigate to http://127.0.0.1:6274/
  2. Enter your MCP server URL (e.g., http://localhost:9000/sse)
  3. Use the inspector to:
    • Change transport type to SSE
    • Test server connections
    • Monitor SSE events
    • Send test messages
    • Debug responses

This tool is particularly useful during development to ensure your MCP server implementation is working correctly and complies with the protocol specification.