Back to the catalog

io.github.oleksii-donets/simple_mcp

A Test MCP server that provides tools, promts and resources

Open source Open in the app JSON README (API)

About

A Test MCP server that provides tools, promts and resources

Details

Kind
MCP servers
Topic
No topic detected
Publisher
oleksii-donets
Origin
official
Category
ferramentas
Transport
local
Version
1.0.1
Last push
2026-05-15T12:47:21Z
Repository state
ativo
Language
Python
Added
2026-08-29 04:00:58
Updated
2026-08-29 04:00:58
Origin id
io.github.oleksii-donets/simple_mcp

README

# Simple MCP Server (Python)

This project provides a minimal Model Context Protocol (MCP) server using Python. It exposes a single tool `random_float` that returns a random float in [0,1). The server supports multiple transport modes: STDIO (default), HTTP, and SSE.

## Run locally

### Default (STDIO transport)
```bash
uv run main.py
```

## Server Environment Variables

| Variable | Purpose | Default |
|----------|---------|---------|
| APP_TRANSPORT | Transport type (STDIO, HTTP, SSE) | STDIO |
| APP_HOST | Server host | 0.0.0.0 |
| APP_PORT | Server port | 8000 |

## Docker

Build the image and run:

```bash
docker build -t simple-mcp .
```

### Docker with different transports

```bash
# HTTP transport
docker run --rm -p 8000:8000 -e APP_TRANSPORT=HTTP simple-mcp

# SSE transport
docker run --rm -p 8000:8000 -e APP_TRANSPORT=SSE simple-mcp

# Custom port
docker run --rm -p 9000:9000 -e APP_TRANSPORT=HTTP -e APP_PORT=9000 simple-mcp
```

## Test as a standalone app
### Test using Postman
```
uv --directory <path_to_project_directory> run main.py
```

### Test using Claude Desktop
```json
{
  "mcpServers": {
    "simple_mcp": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "<path_to_project_directory>",
        "main.py"
      ]
    }
  }
}
```

## Test as a docker image
### Test using Postman
```
docker run --rm -i simple-mcp
```

### Test using Claude Desktop
```json
{
  "mcpServers": {
    "simple_mcp": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "simple-mcp"
      ]
    }
  }
}
```

More