WYGIWYH Expense Tracking MCP Server
Enables AI agents to interact with the WYGIWYH expense tracking API through 75 dynamically generated MCP tools. Supports comprehensive financial operations including transaction management, account handling, recurring expenses, and investment tracking.
README
WYGIWYH API MCP Server
A production-ready Model Context Protocol (MCP) server that provides a universal interface to the WYGIWYH expense tracking API. The server dynamically generates 75 MCP tools from an OpenAPI specification, enabling AI agents and automation platforms like n8n to interact with the expense tracking system through standardized tool calls.
Original repo of WYGIWYH
โจ Features
- ๐ Dynamic Tool Generation - Automatically generates 75 MCP tools from OpenAPI specification
- ๐ Secure Authentication - Bearer token authentication for MCP endpoints + Basic Auth for API access
- ๐ HTTP Streamable Transport - Full compatibility with n8n and other MCP clients
- ๐ณ Production-Ready Docker - Optimized multi-stage build with health checks
- โก Async/Await - Efficient non-blocking API communication
- ๐ Comprehensive API Coverage - All WYGIWYH API endpoints exposed as tools
๐ฏ Use Cases
- Automate expense tracking workflows with n8n
- Build AI assistants that manage financial data
- Create custom integrations with WYGIWYH API
- Implement voice-controlled expense logging
- Develop automated reporting systems
๐ฆ Quick Start
Prerequisites
- Docker & Docker Compose
- WYGIWYH API credentials
- MCP Bearer token
Installation
-
Clone the repository
git clone https://github.com/ReNewator/MCP-WYGIWYH.git cd MCP-WYGIWYH -
Configure environment
cp .env.example .env # Edit .env with your credentials # Don't forget change you WYGIWYH url in server.py -
Deploy with Docker
./deploy.shOr manually:
docker-compose up -d -
Verify deployment
curl http://localhost:5000/health
๐ง Configuration
Create a .env file with the following variables:
# WYGIWYH API Credentials
API_USERNAME=your_email@example.com
API_PASSWORD=your_password_here
# MCP Server Authentication
MCP_TOKEN=your_mcp_bearer_token_here
๐ n8n Integration
Configure the n8n MCP Client node:
- Endpoint:
http://your-server:5000/ - Transport: HTTP Streamable
- Authentication: Header Auth
- Name:
Authorization - Value:
Bearer YOUR_MCP_TOKEN
- Name:
๐ ๏ธ Available Tools
The server exposes 75 MCP tools organized by category:
Account Management
account-groups_*- Account group operations (6 tools)accounts_*- Account CRUD operations (6 tools)
Transaction Management
transactions_*- Transaction operations (6 tools)recurring-transactions_*- Recurring transaction management (6 tools)installment-plans_*- Installment plan handling (6 tools)
Financial Tools
categories_*- Expense category management (6 tools)tags_*- Transaction tagging (6 tools)currencies_*- Currency management (6 tools)exchange-rates_*- Exchange rate operations (6 tools)
Investment Features
dca_*- Dollar-cost averaging strategies (15 tools)entities_*- Entity management (6 tools)
Use the tools/list method to see all available tools with their schemas.
๐ Project Structure
.
โโโ mcp_sse_server.py # Main MCP server with HTTP Streamable
โโโ server.py # Core MCP implementation
โโโ test_server.py # Validation script
โโโ Dockerfile # Production Docker image
โโโ docker-compose.yml # Docker Compose config
โโโ deploy.sh # Automated deployment
โโโ requirements.txt # Python dependencies
โโโ DEPLOYMENT.md # Detailed deployment guide
โโโ PROJECT.md # Technical documentation
โโโ attached_assets/
โโโ WYGIWYH API.yaml # OpenAPI specification
๐ Deployment
Docker (Recommended)
# Build and run
docker-compose up -d
# View logs
docker-compose logs -f
# Stop server
docker-compose down
Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: wygiwyh-mcp-server
spec:
replicas: 2
template:
spec:
containers:
- name: mcp-server
image: wygiwyh-mcp-server:latest
ports:
- containerPort: 5000
env:
- name: API_USERNAME
valueFrom:
secretKeyRef:
name: wygiwyh-secrets
key: api-username
Cloud Platforms
- AWS ECS/Fargate - Use the Docker image with environment variables
- Google Cloud Run - Deploy as container with secrets management
- Azure Container Instances - Direct deployment from Docker Hub
See DEPLOYMENT.md for detailed cloud deployment instructions.
๐งช Testing
Run the validation script to verify the setup:
python test_server.py
This displays all 75 generated MCP tools grouped by category.
๐ API Endpoints
POST /- MCP JSON-RPC endpoint (requires Bearer token)GET /health- Health check (no authentication)
๐ Security Features
- โ Bearer token authentication for MCP access
- โ Basic Auth for WYGIWYH API requests
- โ Non-root container user
- โ Secrets managed via environment variables
- โ No exposed credentials in logs
๐๏ธ Architecture
Dynamic Tool Generation
The server automatically generates MCP tools from the OpenAPI specification:
- Parses WYGIWYH API OpenAPI YAML
- Converts schemas to JSON Schema format
- Creates Tool objects for all operations
- Handles
allOfmerging for complex types - Exposes tools via MCP protocol
Benefits:
- Single source of truth (OpenAPI spec)
- Automatic updates when API changes
- Zero manual endpoint definitions
- Consistent tool schemas
Authentication Flow
โโโโโโโโโโโโโโโ Bearer Token โโโโโโโโโโโโโโโ
โ n8n/MCP โ โโโโโโโโโโโโโโโโโโ> โ MCP Server โ
โ Client โ โ โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ
โ Basic Auth
โผ
โโโโโโโโโโโโโโโ
โ WYGIWYH โ
โ API โ
โโโโโโโโโโโโโโโ
๐ Troubleshooting
Server won't start
# Check logs
docker-compose logs
# Verify environment
cat .env
Authentication errors
- Ensure
API_USERNAMEis your WYGIWYH email - Verify
API_PASSWORDis correct - Check
MCP_TOKENmatches client configuration
Connection refused
# Check server status
docker-compose ps
# Test health endpoint
curl http://localhost:5000/health
๐ Documentation
- DEPLOYMENT.md - Comprehensive deployment guide
- PROJECT.md - Technical architecture documentation
๐ค Contributing
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Submit a pull request
๐ License
Copyright (c) 2025 ReNewator.com. All rights reserved.
๐ Links
๐ฌ Support
For issues and questions:
- Open an issue on GitHub
- Check existing documentation
- Review deployment logs
Built with โค๏ธ by ReNewator.com
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.
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.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
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.
E2B
Using MCP to run code via e2b.