convez.ai
MCP ServerIntegração & APIsIntermediário
Minokainduwara

MCP Client Python

Minokainduwara/MCP-Client

Cliente Python MCP universal para integrar servidores com Claude

Ver no GitHub
InicialPluginScore · de 0 a 100

Cliente Python que conecta a qualquer servidor MCP (Model Context Protocol) compatível e permite interagir com suas ferramentas através do Claude via loop de chat interativo. Descobre automaticamente as tools disponíveis, roteia queries naturais pelo Claude e executa chamadas de ferramentas via protocolo MCP.

Instalação

$npx convez-ai Minokainduwara/MCP-Client

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 7 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Conectar servidores MCP Python ou Node.js ao Claude
  • Criar pipelines de automação com descoberta dinâmica de tools
  • Integrar ferramentas customizadas com processamento via IA
  • Prototipagem rápida de agentes que chamam múltiplas tools

Veredito

Ferramenta sólida para integração MCP que simplifica a conexão com servidores e orquestração de tools via Claude. Bem estruturada e com suporte a múltiplos tipos de servidor, ideal para quem quer montar pipelines de automação baseados no protocolo MCP.

README

A tradução para o português deste README ainda está na fila.

MCP Client

A Python MCP (Model Context Protocol) client that connects to any MCP-compatible server and lets you interact with its tools through Claude via an interactive chat loop.

How it works

The client connects to an MCP server (Python or Node.js), discovers its available tools, and routes your natural language queries through Claude. Claude decides which tools to call, the client executes them via the MCP protocol, and the results are fed back to Claude to generate a final response.

You → Query → Claude (claude-sonnet-4-5) → Tool call → MCP Server → Result → Claude → Response

Prerequisites

  • Python 3.10+
  • uv (for running Python MCP servers)
  • Node.js (for running JavaScript MCP servers)
  • An Anthropic API key

Installation

  1. Clone the repository:
git clone https://github.com/Minokainduwara/MCP-Client.git
cd MCP-Client
  1. Install dependencies:
pip install anthropic mcp python-dotenv
  1. Create a .env file in the project root:
ANTHROPIC_API_KEY=your-api-key-here

⚠️ Never commit your .env file. Add it to .gitignore.

Usage

Run the client by passing the path to any MCP server script:

# Connect to a Python MCP server
python client.py path/to/server.py

# Connect to a JavaScript MCP server
python client.py path/to/server.js

Once connected, you'll see the available tools listed and can start typing queries:

Connected to server with tools: ['search', 'read_file', 'write_file']

MCP Client Started!
Type your queries or 'quit' to exit.

Query: Search for the latest news about MCP

Type quit to exit.

Project structure

MCP-Client/
├── client.py       # Main MCP client implementation
├── .env            # API key (not committed)
└── README.md

Key classes and methods

MCPClient

MethodDescription
connect_to_server(path)Connects to a .py or .js MCP server and lists available tools
process_query(query)Sends a query to Claude, handles tool calls, returns final response
chat_loop()Runs the interactive REPL
cleanup()Closes the server connection and cleans up resources

Supported server types

TypeCommand usedRequirement
Python (.py)uv runuv installed
JavaScript (.js)nodeNode.js installed

Environment variables

VariableDescription
ANTHROPIC_API_KEYYour Anthropic API key (required)

License

MIT

Ver o original no GitHub

Bom para

Relacionados