
MCPFinanceiro
A server for managing financial accounting entries that provides utilities for database access using SQLAlchemy with environment-based configuration.
README
MCP API
API de CRUD de Pessoas protegida por JWT, construída com FastAPI, SQLAlchemy e Alembic.
🚀 Visão Geral
- Linguagem: Python 3.11
- Framework: FastAPI
- Banco de Dados: SQLite (
mcp.db
) - ORM: SQLAlchemy + Alembic
- Documentação: Swagger UI (OpenAPI)
- Autenticação: JWT (Bearer)
- Servidor MCP: compatível com o MCP Client Tool do n8n, permitindo que fluxos de IA registrem clientes automaticamente no banco de dados via n8n
📂 Estrutura do Projeto
meu_projeto/
├── .env # Variáveis de ambiente
├── requirements.txt # Dependências Python
├── Dockerfile # Imagem Docker
├── docker-compose.yml # Orquestração com Traefik
├── run.py # Entry-point do FastAPI
└── app/
├── config.py # Pydantic Settings
├── database.py # Engine, Session e Base
├── models/ # Modelos SQLAlchemy
├── schemas/ # Schemas Pydantic
├── crud/ # Funções de acesso ao BD
└── api/ # Rotas e dependências de segurança
⚙️ Pré-requisitos
- Python 3.11+
- pip
- Docker & Docker Compose (opcional para container)
🔧 Instalação Local
-
Clone o repositório:
git clone <SEU_REPO_URL> cd meu_projeto
-
Crie e ative um virtualenv:
python3 -m venv .venv source .venv/bin/activate # Linux/macOS .venv\Scripts\activate.bat # Windows
-
Instale dependências:
pip install --upgrade pip pip install -r requirements.txt
-
Configure seu
.env
(exemplo em.env.example
):SECRET_KEY=uma_senha_supersecreta ALGORITHM=HS256 ACCESS_TOKEN_EXPIRE_MINUTES=60 DATABASE_URL=sqlite:///./mcp.db
-
Gere o banco e suba o servidor:
uvicorn run:app --reload
🌐 Uso com Docker Compose
-
Build e up:
docker-compose build docker-compose up -d
-
Acesse em
https://mcpfinanceiro.adjunto.com.br
ouhttp://localhost:8000
.
📑 Documentação & Swagger UI
-
OpenAPI JSON:
/openapi.json
-
Swagger UI:
/docs
- Clique em Authorize, cole apenas o JWT.
- Depois faça chamadas às rotas de
/pessoas
.
🔐 Autenticação JWT
- Esquema: Bearer JWT
- Components/securitySchemes:
bearerAuth
- As operações usam
Security(get_current_user)
eglobal security
no OpenAPI.
Geração de Token (externa)
Exemplo de geração manual:
python3 - << 'PYCODE'
import jwt, datetime
SECRET_KEY = "uma_senha_supersecreta"
ALGORITHM = "HS256"
payload = {"sub":"usuario", "exp": datetime.datetime.utcnow() + datetime.timedelta(hours=1)}
print(jwt.encode(payload, SECRET_KEY, algorithm=ALGORITHM))
PYCODE
📝 Endpoints Principais
Método | Rota | Operation ID | Descrição |
---|---|---|---|
POST | /pessoas/ |
createPessoa |
Cria nova pessoa |
GET | /pessoas/ |
listPessoas |
Lista pessoas |
GET | /pessoas/{id} |
getPessoaById |
Busca pessoa por ID |
PATCH | /pessoas/{id} |
updatePessoa |
Atualiza campos da pessoa |
DELETE | /pessoas/{id} |
deletePessoa |
Remove pessoa |
📂 Migrações com Alembic
-
Inicializar repo:
alembic init migrations
-
Criar migration:
alembic revision --autogenerate -m "Descrição"
-
Aplicar:
alembic upgrade head
⚖️ Licença
MIT License © Adjunto Sistemas
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.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.