{"id":26127723,"url":"https://github.com/dylibso/mcp-run-py","last_synced_at":"2025-04-13T17:22:58.778Z","repository":{"id":277064593,"uuid":"928042016","full_name":"dylibso/mcp-run-py","owner":"dylibso","description":"Python client library for the https://mcp.run API","archived":false,"fork":false,"pushed_at":"2025-04-07T17:12:36.000Z","size":150,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-07T18:26:58.124Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dylibso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-06T00:46:42.000Z","updated_at":"2025-04-02T23:39:09.000Z","dependencies_parsed_at":"2025-02-12T00:03:13.182Z","dependency_job_id":"21f7967d-b317-4c40-b94a-c79db1e6b704","html_url":"https://github.com/dylibso/mcp-run-py","commit_stats":null,"previous_names":["dylibso/mcp-run-py"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fmcp-run-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fmcp-run-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fmcp-run-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fmcp-run-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dylibso","download_url":"https://codeload.github.com/dylibso/mcp-run-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248750872,"owners_count":21155797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-10T18:36:16.210Z","updated_at":"2025-04-13T17:22:58.748Z","avatar_url":"https://github.com/dylibso.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mcp-run\n[![PyPI](https://img.shields.io/pypi/v/mcp-run)](https://pypi.org/project/mcp-run/)\n\n\nA Python client for https://www.mcp.run\n\n## Dependencies\n\n- `uv`\n- `npm`\n\n## mcp.run Setup\n\nYou will need to get an mcp.run session ID by running:\n\n```bash\nnpx --yes -p @dylibso/mcpx gen-session --write\n```\n\nThis will generate a new session and write the session ID to a configuration file that can be used\nby `mcp-run`.\n \nIf you need to store the session ID in  an environment variable you can run `gen-session`\nwithout the `--write` flag:\n\n```bash\nnpx --yes -p @dylibso/mcpx gen-session\n```\n\nwhich should output something like:\n\n```\nLogin successful!\nSession: kabA7w6qH58H7kKOQ5su4v3bX_CeFn4k.Y4l/s/9dQwkjv9r8t/xZFjsn2fkLzf+tkve89P1vKhQ\n```\n\nThen set the `MPC_RUN_SESSION_ID` environment variable:\n\n```\n$ export MCP_RUN_SESSION_ID=kabA7w6qH58H7kKOQ5su4v3bX_CeFn4k.Y4l/s/9dQwkjv9r8t/xZFjsn2fkLzf+tkve89P1vKhQ\n```\n\n## Python Usage\n\n### Installation\n\nUsing `uv`:\n\n```bash\nuv add mcp-run\n```\n\nOr `pip`:\n\n```bash\npip install mcp-run\n```\n\n### Example code\n\n```python\nfrom mcp_run import Client  # Import the mcp.run client\n\nclient = Client()  # Create the client, this will check the\n# default location for the mcp.run config or\n# the `MCP_RUN_SESSION_ID` env var can be used\n# to specify a valid mcp.run session id\n\n# Call a tool with the given input\nresults = client.call_tool(\"eval-js\", params={\"code\": \"'Hello, world!'\"})\n\n# Iterate over the results\nfor content in results.content:\n    print(content.text)\n```\n\nMore examples can be found in the [examples/](https://github.com/dylibso/mcp-run-py/tree/main/examples) directory\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylibso%2Fmcp-run-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdylibso%2Fmcp-run-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylibso%2Fmcp-run-py/lists"}