- Explore MCP Servers
- mcp-run-py
Mcp Run Py
What is Mcp Run Py
mcp-run-py is a Python client library designed for interacting with the mcp.run API, enabling users to easily execute tools and manage sessions.
Use cases
Use cases include executing JavaScript code evaluation, automating tasks, and integrating with other Python applications that require API interactions.
How to use
To use mcp-run-py, install it via ‘uv’ or ‘pip’, set up a session ID using the provided command, and then create a client instance to call tools with specified parameters.
Key features
Key features include easy installation, session management, and the ability to call various tools with customizable parameters, all within a Python environment.
Where to use
mcp-run-py can be used in various fields such as software development, data analysis, and automation, where interaction with APIs and tool execution is required.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Run Py
mcp-run-py is a Python client library designed for interacting with the mcp.run API, enabling users to easily execute tools and manage sessions.
Use cases
Use cases include executing JavaScript code evaluation, automating tasks, and integrating with other Python applications that require API interactions.
How to use
To use mcp-run-py, install it via ‘uv’ or ‘pip’, set up a session ID using the provided command, and then create a client instance to call tools with specified parameters.
Key features
Key features include easy installation, session management, and the ability to call various tools with customizable parameters, all within a Python environment.
Where to use
mcp-run-py can be used in various fields such as software development, data analysis, and automation, where interaction with APIs and tool execution is required.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
mcp-run
A Python client for https://www.mcp.run
Dependencies
uvnpm
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
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










