{"type":"mcp_client","name":"mcpx-py","description":"mcpx-py is a Python library that enables interaction with various Large Language Models (LLMs) using mcp.run tools, supporting models from PydanticAI, OpenAI, Ollama, and Gemini. mcpx-py is a Python library","category":"AI","language":"Python","stars":25,"forks":0,"owner":"dylibso","github_url":"https://github.com/dylibso/mcpx-py","homepage":"https://docs.mcp.run","setup":"## Setup\n\n1.  Get an mcp.run session ID by running: `npx --yes -p @dylibso/mcpx gen-session --write` to generate a new session and write the session ID to a configuration file.\n2.  Alternatively, run `npx --yes -p @dylibso/mcpx gen-session` to output the session ID to the console.\n3.  Set the `MPC_RUN_SESSION_ID` environment variable with the session ID obtained from the previous step.\n4.  For Claude, sign up for an Anthropic API account, get your API key, and set the environment variable: `ANTHROPIC_API_KEY=your_key_here`.\n5.  For OpenAI, create an OpenAI account, generate an API key, and set the environment variable: `OPENAI_API_KEY=your_key_here`.\n6.  For Gemini, create a Gemini account, generate an API key, and set the environment variable: `GEMINI_API_KEY=your_key_here`.\n7.  For Ollama, install Ollama, pull your desired model: `ollama pull llama3.2`, no API key needed.\n8.  For Llamafile, download a Llamafile model, make the file executable: `chmod +x your-model.llamafile`, run in JSON API mode: `./your-model.llamafile --json-api --host 127.0.0.1 --port 8080`, and use with the OpenAI provider pointing to `http://localhost:8080`.","tools":"## Available Tools\n\n1.  AI Provider Support (Supports all models supported by PydanticAI).\n2.  Chat with an LLM (Allows interacting with LLMs through the `mcpx-client chat` command).\n3.  List tools (Lists available tools using the `mcpx-client list` command).\n4.  Call a tool (Calls a specific tool with provided arguments using the `mcpx-client tool` command).\n","faq":null,"created_at":"2024-12-04T22:21:56+00:00","updated_at":"2025-03-28T14:06:58+00:00","source_url":"https://model-context-protocol.com/clients/python-llm-client-mcp-run-tools","related_articles":[]}