MCP Accounting
Integrates with the OpenAI API to generate AI-powered explanations for detected financial anomalies, providing natural language insights into accounting irregularities such as large transactions and duplicate payments.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP AccountingCheck for unusually large expenses or duplicate payments."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Accounting Platform
An AI-powered accounting anomaly detection platform built with FastAPI, PostgreSQL, React, and OpenAI, featuring a complete production-ready authentication system.
π Overview
MCP Accounting is a full-stack system designed to:
Ingest financial transaction data
Detect anomalies (large transactions, duplicates)
Generate AI-powered explanations
Expose functionality as MCP-style callable APIs
π§± Tech Stack
Backend
FastAPI
SQLAlchemy
PostgreSQL
Passlib (bcrypt)
JWT (authentication)
Docker
Frontend
React (TypeScript)
Tailwind CSS
AI Layer
OpenAI API (explanations)
π Authentication System (Production-Ready)
Features Implemented
β User registration
β Email verification (token-based)
β Secure password hashing (bcrypt)
β Login with JWT (stateless auth)
β Password reset flow
β Protected routes (JWT-ready)
Auth Flow
Registration
User registers
User is created as inactive/unverified
Verification token generated (DB)
Email sent with verification link
Email Verification
Token validated
User marked as:
is_active = Trueis_verified = True
Token invalidated after use
Login
Validates:
Email exists
Password matches (bcrypt)
User is verified
Returns JWT:
{
"access_token": "jwt-token",
"token_type": "bearer"
}Password Reset
Request reset
Token generated and emailed
User submits new password
Token invalidated
ποΈ Architecture
Frontend (React)
β
FastAPI (API Layer)
β
Service Layer (Business Logic)
β
SQLAlchemy ORM
β
PostgreSQL
β
AI Layer (OpenAI)π Data Flow
Register β Verify Email β Login β Upload CSV
β
Store Transactions β Detect Anomalies
β
Generate Report β AI Explanationπ§© API Endpoints
Auth
POST /auth/registerPOST /auth/loginGET /verify-emailPOST /forgot-passwordPOST /reset-password
Core Features
POST /upload-transactionsPOST /tools/get_transactionsPOST /tools/detect_large_expensesPOST /tools/find_duplicate_paymentsPOST /report/anomaliesPOST /report/anomalies/explain
π³ Running with Docker
docker compose up --buildAccess:
API Docs: http://localhost:8000/docs
Frontend: http://localhost:3000
βοΈ Environment Variables
DATABASE_URL=postgresql://postgres:postgres@db:5432/mcp_accounting
SECRET_KEY=your-secret-key
FRONTEND_URL=http://localhost:3000π§ Key Technical Decisions
1. Separation of Token Types
Use Case | Mechanism |
Email verification | DB token |
Password reset | DB token |
Authentication | JWT |
2. Security Practices
Password hashing via bcrypt
No plaintext password storage
Token invalidation after use
Generic login errors (no user enumeration)
3. SQLAlchemy Best Practices
Single
BaseinstanceProper model registration
Dependency-injected DB sessions
4. Dockerized Environment
Service-based networking (
db)Environment-driven configuration
Clean container rebuilds
π§ͺ Current Status
β End-to-end functional
β Authentication fully implemented
β Stable Docker environment
β Clean API contracts
β AI integration working
π Next Steps
Alembic migrations (schema versioning)
JWT-protected endpoints
Role-based access control (RBAC)
Background jobs (email queue)
Token hashing (security hardening)
Observability (logs + metrics)
π‘ Project Purpose
This project demonstrates:
Real-world backend architecture
Secure authentication design
AI integration into financial workflows
MCP-style API exposure for automation
π¨βπ» Author
Developed as a production-style backend system to showcase:
Python / FastAPI expertise
System design & architecture
Secure authentication flows
AI-driven application design
π License
MIT License
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Eduardo-Lucas/mcp-accounting'
If you have feedback or need assistance with the MCP directory API, please join our Discord server