Skip to main content

mcp-run

PyPI

A Python client for https://www.mcp.run

Dependencies

  • uv
  • npm

mcp.run Setup

You will need to get an mcp.run session ID by running:

npx --yes -p @dylibso/mcpx gen-session --write

This will generate a new session and write the session ID to a configuration file that can be used by mcp-run.

If you need to store the session ID in an environment variable you can run gen-session without the --write flag:

npx --yes -p @dylibso/mcpx gen-session

which should output something like:

Login successful!
Session: kabA7w6qH58H7kKOQ5su4v3bX_CeFn4k.Y4l/s/9dQwkjv9r8t/xZFjsn2fkLzf+tkve89P1vKhQ

Then set the MPC_RUN_SESSION_ID environment variable:

$ export MCP_RUN_SESSION_ID=kabA7w6qH58H7kKOQ5su4v3bX_CeFn4k.Y4l/s/9dQwkjv9r8t/xZFjsn2fkLzf+tkve89P1vKhQ

Python Usage

Installation

Using uv:

uv add mcp-run

Or pip:

pip install mcp-run

Example code

from mcp_run import Client  # Import the mcp.run client

client = Client()  # Create the client, this will check the
# default location for the mcp.run config or
# the `MCP_RUN_SESSION_ID` env var can be used
# to specify a valid mcp.run session id

# Call a tool with the given input
results = client.call_tool("eval-js", params={"code": "'Hello, world!'"})

# Iterate over the results
for content in results.content:
    print(content.text)

More examples can be found in the examples/ directory

Metadata

Release files for mcp-run 0.5.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-run 0.5.0
File Size Uploaded Provenance Actions
mcp_run-0.5.0.tar.gz 13.4 kB Without provenance Details for mcp_run-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-run 0.5.0
File Interpreter ABI Platform Actions
mcp_run-0.5.0-py3-none-any.whl Python 3 none any Details for mcp_run-0.5.0-py3-none-any.whl

Total release size: 27.4 kB

Release files / mcp_run-0.5.0.tar.gz

Download URL mcp_run-0.5.0.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f6270283dcb51328dfd97b984a4d1264d5d04853340d94dd0abaf7b53ad25f75
BLAKE2b-256 checksum
How to use checksums
275e99422329beb04d4a4b7d150e469e7ae1d85e68d09888e077dee57ff5a509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.3

Release files / mcp_run-0.5.0-py3-none-any.whl

Download URL mcp_run-0.5.0-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba30756d7e6feb872e82d08fd0267638b9bd88c2c326bcd6ac5cb51cf59a3969
BLAKE2b-256 checksum
How to use checksums
02d4b4f925a6f57c680e10fc4766af607de62cca8cfd28664a5cd67e3f0351a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.3

Security for mcp-run 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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