Enables configuration management through environment variables loaded from a .env file, allowing customization of database connections and JWT settings
Supported as an optional database backend for storing financial accounting entries, configurable through the DB_URL environment variable
Used for database access and ORM capabilities, allowing the server to manage financial accounting entries through a standardized database interface
Used as the default database backend for storing financial accounting entries in a local file
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
⚙️ Pré-requisitos
- Python 3.11+
- pip
- Docker & Docker Compose (opcional para container)
🔧 Instalação Local
- Clone o repositório:
- Crie e ative um virtualenv:
- Instale dependências:
- Configure seu
.env
(exemplo em.env.example
): - Gere o banco e suba o servidor:
🌐 Uso com Docker Compose
- Build e up:
- 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:
📝 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:
- Criar migration:
- Aplicar:
⚖️ Licença
MIT License © Adjunto Sistemas
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A server for managing financial accounting entries that provides utilities for database access using SQLAlchemy with environment-based configuration.
Related MCP Servers
- AsecurityFlicenseAqualityA server that provides advanced mathematical and financial calculation capabilities for AI code assistants, enabling them to perform complex calculations like symbolic calculus, numerical methods, and financial analysis without implementing algorithms directly.Last updated -181JavaScript
- AsecurityFlicenseAqualityA Model Context Protocol server that allows AI assistants to query and analyze financial data through Ledger CLI, enabling tasks like financial reporting, budget analysis, and accounting.Last updated -921Python
- -securityFlicense-qualityA powerful server that provides administrative control over Supabase PostgreSQL databases through Cursor's Composer and Codeium's Cascade, enabling database management with features for tables, records, schema modifications, and more.Last updated -910TypeScript
- -securityAlicense-qualityAn experimental server implementing the Model Context Protocol to allow AI assistants to query and analyze financial data stored in Beancount ledger files using the Beancount Query Language.Last updated -2PythonMIT License