Finance MCP Server

Finance MCP Server

Enables financial management through MCP tools for account viewing, transaction analysis, budgeting, and analytics, deployable on Vercel.

Category
访问服务器

README

Finance MCP Server - Vercel Deployment

This folder contains the Finance MCP Server configured for serverless deployment on Vercel.

📁 Structure

vercel-deployment/
├── api/
│   ├── index.py          # Main Vercel handler
│   ├── app_tools.py      # MCP tools registration
│   └── database.py       # Database connection manager
├── vercel.json           # Vercel configuration
├── requirements.txt      # Python dependencies
├── .env.example          # Environment variables template
└── README.md            # This file

🚀 Quick Deployment

1. Install Vercel CLI

npm install -g vercel

2. Set Environment Variables

Create a .env file (copy from .env.example):

DATABASE_URL_PRIVATE="postgresql://user:pass@host/private?sslmode=require"
DATABASE_URL_PUBLIC="postgresql://user:pass@host/public?sslmode=require"

3. Deploy to Vercel

cd vercel-deployment
vercel

Follow the prompts:

  • Set up and deploy? Y
  • Which scope? Select your account
  • Link to existing project? N (for first deployment)
  • What's your project's name? finance-mcp-server
  • In which directory is your code located? ./
  • Want to override settings? N

4. Add Environment Variables to Vercel

After deployment, add your secrets:

# Add private database URL
vercel env add DATABASE_URL_PRIVATE

# Add public database URL
vercel env add DATABASE_URL_PUBLIC

Or add them via Vercel Dashboard:

  1. Go to your project settings
  2. Navigate to "Environment Variables"
  3. Add DATABASE_URL_PRIVATE and DATABASE_URL_PUBLIC
  4. Redeploy: vercel --prod

🔧 Configuration

vercel.json

The vercel.json file configures:

  • Python runtime for serverless functions
  • Routing to handle MCP endpoints
  • Environment variables references

Production Deployment

vercel --prod

Your MCP server will be available at:

https://your-project.vercel.app/mcp

📡 API Endpoints

Once deployed, your MCP server will be accessible at:

  • Main MCP endpoint: https://your-project.vercel.app/mcp
  • Health check: https://your-project.vercel.app/

🔐 Security

  1. Never commit .env file - it's already in .gitignore
  2. Use Vercel environment variables for production secrets
  3. Enable SSL - Vercel provides automatic HTTPS
  4. Database SSL - Ensure Neon databases use ?sslmode=require

🧪 Testing

Local Testing

# Install dependencies
pip install -r requirements.txt

# Run locally
python api/index.py

Server runs at http://localhost:8080

Test MCP Endpoint

curl https://your-project.vercel.app/mcp

📊 Features

All 19 financial tools are available:

Account Management

  • list_accounts - View all accounts
  • get_account_balance - Get specific account balance
  • get_account_summary - Complete financial summary

Transaction Analysis

  • list_transactions - List with filters
  • search_transactions - Search by merchant
  • get_recurring_transactions - Detect recurring payments

Analytics

  • get_spending_by_category - Category breakdown
  • get_monthly_trends - Income/expense trends
  • get_top_merchants - Top spending merchants
  • get_cashflow_summary - Income vs expenses

Budgeting

  • create_budget - Create new budget
  • list_budgets - View all budgets
  • get_budget_status - Budget vs actual spending

Utilities

  • get_available_categories - List categories
  • format_currency - Format amounts
  • calculate_net_worth - Calculate net worth

Security & Policies

  • get_tool_policy - Get tool access policy
  • list_tool_policies - List all policies
  • validate_tool_access - Validate permissions

🔄 Updates

To update the deployment:

# Pull latest changes
git pull

# Navigate to vercel-deployment folder
cd vercel-deployment

# Redeploy
vercel --prod

📝 Logs

View logs in real-time:

vercel logs

Or view in Vercel Dashboard under your project's "Logs" section.

🐛 Troubleshooting

Import Errors

Make sure all Python files are in the api/ directory and dependencies are in requirements.txt.

Database Connection Issues

  • Verify environment variables are set correctly in Vercel
  • Check database URLs include ?sslmode=require
  • Ensure Neon databases are accessible

500 Server Errors

Check Vercel logs: vercel logs or in the dashboard

📚 Resources

📞 Support

For issues or questions:

  1. Check Vercel logs
  2. Review environment variables
  3. Test database connections
  4. Verify Python dependencies

Ready to deploy! 🚀

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选