Skip to main content

Pastebin MCP Server

An MCP server for the Pastebin API, built with FastMCP. Managed with uv and distributed on PyPI so it can be run directly with uvx — no install step, no virtualenv to manage.

Tools

Tool Description
login Exchange username/password for a Pastebin User Key
create_paste Create a paste (public / unlisted / private)
list_user_pastes List your pastes (requires a User Key)
delete_paste Delete one of your pastes
get_trending_pastes Fetch the current trending pastes
stop Shut the server down

Configuration

Variable Required Description
PASTEBIN_DEV_KEY yes Your Pastebin developer API key
PASTEBIN_USER_KEY for private/list/delete User Key returned by login

Both can also be passed per-call as api_dev_key / api_user_key arguments.

Run it

Once published, no installation is needed:

PASTEBIN_DEV_KEY=your_key uvx mcp-pastebin

Pin a version:

uvx mcp-pastebin@0.1.0

From a local checkout (development):

PASTEBIN_DEV_KEY=your_key uv run mcp-pastebin

MCP client configuration

Add to your client's MCP config (.mcp.json, claude_desktop_config.json, etc.):

{
  "mcpServers": {
    "pastebin": {
      "command": "uvx",
      "args": ["mcp-pastebin"],
      "env": {
        "PASTEBIN_DEV_KEY": "your_key"
      }
    }
  }
}

While developing, point uvx at the working tree instead:

{
  "mcpServers": {
    "pastebin": {
      "command": "uvx",
      "args": ["--from", "/absolute/path/to/pastebin-mcp", "mcp-pastebin"],
      "env": { "PASTEBIN_DEV_KEY": "your_key" }
    }
  }
}

Development

uv sync                 # create .venv and install deps from uv.lock
uv run mcp-pastebin     # run the server from source
uv lock --upgrade       # refresh the lockfile
uv run ruff check .     # lint

uv.lock is committed so development environments are reproducible; it does not constrain consumers installing from PyPI.

Every push and pull request runs .github/workflows/ci.yml: uv sync --locked, ruff check ., then uv build and a stdio smoke test that starts the built wheel's console script and checks it answers an MCP initialize request - on Python 3.10, 3.11, 3.12 and 3.13.

Releasing

Releases are automated: pushing a tag that starts with v runs .github/workflows/release.yml, which builds the sdist and wheel with uv build, smoke-tests the built wheel, and uploads it to PyPI with uv publish. Authentication is PyPI trusted publishing over OIDC, so there is no PyPI token stored in this repository.

To cut a release:

# 1. bump the version in both places and commit
#      pyproject.toml            version = "0.2.0"
#      mcp_pastebin/__init__.py  __version__ = "0.2.0"
git commit -am "Release 0.2.0"

# 2. tag and push - the tag is what triggers the upload
git tag v0.2.0
git push origin main v0.2.0

The tag and the version in pyproject.toml must agree. PyPI never accepts a re-upload of an existing version, so a release that fails after the upload step needs a new version number rather than a moved tag.

One-time PyPI setup

Before the first release, register a trusted publisher on PyPI. The project does not exist on PyPI yet, so add it as a pending publisher at https://pypi.org/manage/account/publishing/:

Field Value
PyPI Project Name mcp-pastebin
Owner neopunisher
Repository name py-pastebin-mcp
Workflow name release.yml
Environment name pypi

Every field is checked on upload, including the workflow filename and the environment: pypi declared in release.yml - if you rename either, update the publisher to match. GitHub creates the pypi environment on the first run; to require a manual approval before each upload, add yourself as a required reviewer to it under Settings -> Environments -> pypi.

After the first successful upload the pending publisher becomes an ordinary publisher on the project, and no further setup is needed.

Publishing by hand

Only needed to bypass the workflow (or to rehearse against TestPyPI):

uv build                                   # -> dist/*.whl and dist/*.tar.gz
python scripts/smoke_test.py               # start the built wheel, speak MCP to it
uv publish --token pypi-...                # upload to PyPI
uv publish --publish-url https://test.pypi.org/legacy/ --token pypi-...   # TestPyPI

License

MIT

Metadata

Release files for mcp-pastebin 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-pastebin 0.1.0
File Size Uploaded
mcp_pastebin-0.1.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-pastebin 0.1.0
File Interpreter ABI Platform
mcp_pastebin-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / mcp_pastebin-0.1.0.tar.gz

Download URL mcp_pastebin-0.1.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d63fa453c6eb41af3b42dac28be127370c2475299abe5b0209dfdcc732814c5e
BLAKE2b-256 checksum
How to use checksums
231b032079d36bfda06198c74fb4ae94627cd8b363b5e29523d812e36879dc65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mcp_pastebin-0.1.0-py3-none-any.whl

Download URL mcp_pastebin-0.1.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
128b2c0a12626cde461eea3461d9a1099d0f40e584c28846d04a46f000bdc81c
BLAKE2b-256 checksum
How to use checksums
8220ff73b226813046d802ff983c2194bc243ae67cbf248a1d3f4b7fd0e1a87d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page