MCP Server Python
A base MCP server in Python providing tools for basic operations (ping, sum, time, list invert) and legal jurisprudence search via LexML Brasil.
README
Servidor MCP em Python
Projeto base de um servidor MCP (Model Context Protocol) em Python, pronto para conectar em clientes MCP.
Requisitos
- Python 3.10+
Instalar
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
Executar
mcp-server-python
Ou usando o utilitario solicitado:
mcpserver
O servidor sobe em modo stdio, que e o formato mais comum para integrar com clientes MCP locais.
Configurar cliente MCP
VS Code
- Copie
examples/vscode.mcp.example.jsonpara.vscode/mcp.json. - Se necessario, ajuste
commandpara o Python da sua venv. - Reinicie o cliente MCP no VS Code.
Exemplo:
{
"servers": {
"python-mcp-server": {
"type": "stdio",
"command": "${workspaceFolder}/.venv/bin/python",
"args": ["-m", "mcp_server"]
}
}
}
Claude Desktop
- Abra o arquivo de configuracao do Claude Desktop.
- Copie o conteudo de
examples/claude_desktop_config.example.json. - Troque
/CAMINHO/ABSOLUTO/PARA/...pelo caminho real do projeto.
Exemplo:
{
"mcpServers": {
"python-mcp-server": {
"command": "/CAMINHO/ABSOLUTO/PARA/mcp_server/.venv/bin/python",
"args": ["-m", "mcp_server"]
}
}
}
Tools disponiveis
ping() -> strsoma(a: float, b: float) -> floatagora() -> strinverter_lista(itens: list[str]) -> list[str]buscar_jurisprudencia(consulta: str, tribunal: str | None = None, limite: int = 10) -> dictdetalhe_jurisprudencia(url_ou_urn: str) -> dictbuscar_jurisprudencia_avancada(consulta: str, tribunal: str | None = None, orgao: str | None = None, data_inicio: str | None = None, data_fim: str | None = None, limite: int = 5) -> dict
Jurisprudencia com dados abertos
O servidor inclui um modulo para consulta de jurisprudencia em fonte aberta via LexML Brasil.
Fluxo recomendado
- Use
buscar_jurisprudenciacom termos comoicms creditamento,dano moral consumidor,prisao preventiva. - Pegue a
urlouurnde um resultado. - Use
detalhe_jurisprudenciapara obter metadados e ementa.
Exemplos de parametros:
buscar_jurisprudencia(consulta="icms energia", tribunal="stj", limite=5)detalhe_jurisprudencia(url_ou_urn="urn:lex:br:superior.tribunal.justica;turma.1:acordao;resp:2006-03-09;601056-676848")
Busca avancada para analise
Use buscar_jurisprudencia_avancada quando quiser:
- recorte por periodo (
data_inicioedata_fim) - filtro de orgao (
turma,secao,pleno,camara,carf) - retorno com
resumo_promptpronto para colar em um modelo e pedir analise comparativa
Exemplo:
buscar_jurisprudencia_avancada(consulta="icms creditamento energia", tribunal="stj", orgao="turma", data_inicio="2015-01-01", data_fim="2024-12-31", limite=3)
Estrutura
src/mcp_server/server.py: definicao do servidor e tools.src/mcp_server/legal_open_data.py: integracao com dados juridicos abertos.src/mcp_server/__main__.py: ponto de entrada para execucao.pyproject.toml: metadados, dependencias e script CLI.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.