P

mcp-server

...
Created 2/21/2025bytcpipuk

Language:

Python

Stars:

2

Forks:

0

MCP Server

A server that lets AI assistants like Claude safely use external tools - like running Python code or accessing websites. It processes data to make it easier for AI to understand, and provides helpful error messages when things go wrong, so bots are more empowered to solve their own problems.

  1. πŸ› οΈ What tools does this server offer?
  2. 🏎️ How can I run it?
    1. πŸ‹ Using Docker (recommended)
    2. πŸ’» Running locally
  3. πŸ”Œ How to connect
  4. πŸ“š Learn more about MCP
  5. πŸ“„ License

πŸ› οΈ What tools does this server offer?

Once running, your AI assistant will be able to:

ToolWhat it can do
PythonRun Python code safely in a sandbox. Includes popular packages like numpy and pandas for data analysis, and can either run code or check it for errors.
WebAccess websites and process their content. Can convert pages to markdown for easy reading, get the raw content, or extract links to help navigate through documentation.

🏎️ How can I run it?

πŸ‹ Using Docker (recommended)

  1. Install Docker if you haven't already

  2. Create a file called docker-compose.yml with:

    services:
    mcp-server:
       environment:
          - SSE_HOST=0.0.0.0
          - SSE_PORT=8080
          - USER_AGENT=CustomAgent/1.0
       image: ghcr.io/tcpipuk/mcp-server:latest
       restart: unless-stopped
       stop_grace_period: 1s
    
  3. Run docker compose up to start the server

Note: The server will automatically use network mode (SSE) when you set SSE_HOST and SSE_PORT. This is what you want for using it with LibreChat.

Most people use this with either:

            - [Claude Desktop](https://modelcontextprotocol.io/quickstart/user) - connects directly to your computer

For LibreChat, add this to your librechat.yaml to connect:

mcpServers:
  mcp-server:
    iconPath: "/path/to/icon.png"
    type: sse
    url: http://mcp-server:8080/sse

πŸ’» Running locally

  1. Install uv (requires Python 3.13+):

    curl -LsSf https://astral.sh/uv/install.sh | sh
    

    Note: If you already have uv installed, you can update it by running:

    uv self update
    
  2. Create and activate a virtual environment:

    uv venv
    source .venv/bin/activate  # Linux/macOS
    # or
    .venv\Scripts\activate     # Windows
    
  3. Install dependencies from the lockfile:

    uv sync
    
  4. Run the server:

    mcp-server --sse-host 0.0.0.0 --sse-port 3001 --user-agent "CustomAgent/1.0"
    

Available arguments:

  • --sse-host: SSE listening address (e.g. 0.0.0.0)
  • --sse-port: SSE listening port (e.g. 3001)
  • --user-agent: Custom User-Agent string for HTTP requests

Note: If either of the SSE arguments are not provided (or the SSE_HOST or SSE_PORT environment variables are not set) the server will automatically assume stdio mode and listen on standard I/O.

πŸ”Œ How to connect

You can connect to the server in two ways:

MethodWhat it meansWhen to use it
Network connection (SSE)The server runs as a service that other apps can connect toBest for most users - especially with LibreChat
Direct connection (stdio)The server runs directly on your computerUseful for testing or development

πŸ“š Learn more about MCP

Here are a few resources to get you started:

πŸ“„ License

This project is licensed under the GPLv3. See the LICENSE file for full details.

Last updated: 4/9/2025

Publisher info

tcpipuk's avatar

Tom Foster

Tech enthusiast with a flair for AI, automation, and FOSS. Skilled in Python, Linux, and server management. Passionate about sci-fi and futurism. πŸ›Έ

Gloucester, UK
14
followers
14
following
28
repos

More MCP servers built with Python

MCP-Collab

MCP Slack, Teams, WebEx

By sisodiabhumca
fulcra-context-mcp

Access your personal health data, sleep stats, location, calendar, and more securely through Context by Fulcra!

By fulcradynamics
alpaca-mcp-server

Alpaca MCP Servers deliver Alpaca’s Trading API best practices straight into your development and trading workflows.

By alpacahq