pastebin-mcp/README.md
2026-06-02 23:07:29 +02:00

55 lines
1.6 KiB
Markdown

# pastebin-mcp
MCP server for the homelab pastebin service. Exposes create, read, list, and delete
operations as MCP tools so agents can interact with pastebin programmatically.
## Tools
| Tool | Auth required | Description |
|------|---------------|-------------|
| `create_paste` | No | Create a paste; returns URL and ID |
| `get_paste` | No | Fetch full paste metadata + content |
| `get_raw` | No | Fetch raw paste text only |
| `list_pastes` | Yes (API key) | List recent pastes with pagination |
| `delete_paste` | Yes (API key) | Permanently delete a paste |
## Environment variables
| Variable | Default | Description |
|----------|---------|-------------|
| `PASTEBIN_URL` | `http://192.168.0.242:3002` | Pastebin service base URL |
| `PASTEBIN_API_KEY` | *(empty)* | API key for privileged operations |
| `PASTEBIN_MCP_TRANSPORT` | `stdio` | Transport: `stdio`, `sse`, or `streamable-http` |
| `FASTMCP_HOST` | `127.0.0.1` | Bind host for HTTP transports |
| `FASTMCP_PORT` | `8000` | Bind port for HTTP transports |
| `FASTMCP_STREAMABLE_HTTP_PATH` | `/mcp` | HTTP path for streamable-http transport |
## Install
```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
```
## Run (HTTP / MCP endpoint)
```bash
PASTEBIN_MCP_TRANSPORT=streamable-http \
FASTMCP_HOST=0.0.0.0 \
FASTMCP_PORT=8004 \
PASTEBIN_API_KEY=<key> \
python mcp_server.py
```
## Run (stdio for Claude Desktop / claude mcp add)
```bash
PASTEBIN_API_KEY=<key> pastebin-mcp
```
## Register globally (HTTP)
```bash
claude mcp add --transport http --scope user pastebin-mcp http://192.168.0.242:8004/mcp
```