
Security News
Open VSX Begins Implementing Pre-Publish Security Checks After Repeated Supply Chain Incidents
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.
mcp-python-client
Advanced tools
A reusable Python client for interacting with MCP (Machine Conversation Protocol) servers and LLMs.
pip install mcp-python-client
import asyncio
from mcp_python_client import MCPClient
async def main():
# Create a client with your preferred LLM settings
client = MCPClient(
model="anthropic/claude-3-sonnet-20240229",
api_key="your_api_key_here" # Or set via env var
)
# Connect to MCP servers defined in your config
await client.connect_to_all_servers()
# Process a query
query = "What is the current weather in New York?"
# Stream response
async for chunk in client.aprocess_query(query):
print(chunk, end="", flush=True)
# Clean up
await client.cleanup()
# Run the example
asyncio.run(main())
The client looks for a configuration file in the following locations:
~/.config/mcp-client/config.json~/.mcp-client.json./mcp-client.json./config.jsonExample configuration file:
{
"mcpServers": {
"shell-server": {
"command": "mcp-shell-server",
"args": ["--use_cache"],
"env": {
"SHELL_SERVER_CACHE_DIR": "/tmp/shell-server-cache"
}
},
"python-server": {
"command": "mcp-python-server",
"args": []
}
}
}
See the documentation for more advanced usage examples and API details.
uv build
uv publish
MIT
FAQs
Python client for interacting with MCP servers and LLMs
We found that mcp-python-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.

Research
/Security News
Threat actors compromised four oorzc Open VSX extensions with more than 22,000 downloads, pushing malicious versions that install a staged loader, evade Russian-locale systems, pull C2 from Solana memos, and steal macOS credentials and wallets.

Security News
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.