FinOps AI Copilot MCP Server

FinOps AI Copilot MCP Server

A secure, read-only MCP server that enables AI assistants to inspect transactions, vendor performance, wallet balances, and analytics through validated REST API calls.

Category
访问服务器

README

MCP Dashboard

A minimal dashboard for MCP services (local backend + server + tools).

Features

  • Local mock backend and API client utilities
  • Services for analytics, wallet, transactions, vendors, and more

Prerequisites

  • Node.js (16+)
  • npm or yarn

Install

npm install

Run (development)

npm run dev

Build

npm run build

Project structure (key files)

  • src/: application source
    • src/server.ts - main server
    • src/chatServer.ts - chat server
    • src/localBackend.ts - local backend
  • api/axios.ts - axios client
  • services/ - business logic services
  • tools/ - utility scripts (analytics, dashboard, etc.)

Notes

  • See package.json for available npm scripts.
  • This README is a starting point — expand sections as needed.

FinOps AI Copilot MCP Server

A production-quality Model Context Protocol (MCP) server that acts as a secure, read-only AI gateway for fintech operations dashboards. It allows LLMs (such as Cursor, Claude Desktop, or OpenAI-compatible engines) to inspect transactions, vendor performance, wallet balances, and analytics via secure REST APIs instead of exposing the database directly.

Project Overview

FinOps AI Copilot enables natural language query resolution for operational and financial dashboards. By exposing standardized tools through the Model Context Protocol, the AI assistant can query real-time data securely.

Architecture

graph TD
    User([User Query]) --> Client[Claude Desktop / Cursor / AI Client]
    Client -->|JSON-RPC via stdio| Server[FinOps MCP Server]
    Server -->|Zod Validation| Services[Service Layer]
    Services -->|Axios REST Calls| Backend[Dashboard Backend REST API]
    Backend --> DB[(MongoDB Database)]

Security Design

  1. Read-Only Enforcement: The MCP server only exposes query tools (get*, find*, compare*, summary). No state-changing endpoints are integrated.
  2. Gateway Pattern: The AI client never directly talks to MongoDB or runs raw queries. All requests pass through the gateway and are validated against strict Zod schemas.
  3. Data Sanitization: Secrets, customer sensitive credentials, and database keys are never exposed in tool definitions.
  4. Environment Isolation: API endpoints and credentials are loaded dynamically from environment variables.

Installation

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn

Setup

  1. Clone or navigate to the workspace directory:

    cd "/Users/apple/Desktop/mcp dasboard"
    
  2. Install dependencies:

    npm install
    
  3. Configure Environment Variables: Copy .env.example to .env and fill in the details:

    cp .env.example .env
    

Environment Variables

Variable Description Default
PORT Local port for optional server operations 3000
BACKEND_API_URL Base URL of the existing REST API http://localhost:4000/api
BACKEND_API_KEY Bearer Token / API key for REST endpoints mock-api-key-12345
LARGE_TRANSACTION_THRESHOLD Threshold to filter large payments 50000

Available Tools

The MCP server registers the following operational tools:

1. Dashboard

  • getDashboardMetrics: High-level business overview (Total processed volume, count, success rate, failed amount, pending transaction count, wallet balance).

2. Transactions

  • findTransactionById: Search transaction details by transaction ID.
  • findTransactions: Search for transactions using filters like status, vendor, merchant, amount range, and dates.
  • failedTransactions: Retrieve failed transaction list (supports pagination).
  • pendingTransactions: Retrieve pending payout/settlement list.
  • largeTransactions: Retrieve payments exceeding the threshold.
  • retryTransactions: Retrieve payments that have been retried multiple times.

3. Vendors

  • vendorPerformance: Return success/failure rates, average response times, and volumes for a specific vendor.
  • topVendor: Get vendor with the highest success rate.
  • worstVendor: Get vendor with the highest failure rate.
  • vendorComparison: Side-by-side comparison of two vendors.

4. Wallet

  • walletBalance: Current wallet balance across channels.
  • walletHistory: Log of credit/debit adjustments and balance history.

5. Analytics & AI Summary

  • todayVsYesterday: Daily comparison of transactions count, amount, and success rates.
  • weeklyAnalytics: Last 7 days metrics.
  • monthlyAnalytics: Current month summaries.
  • peakHour: Identifies busiest transaction hour.
  • merchantAnalytics: Top merchants by volume and transaction count.
  • dailySummary: AI-structured daily business performance summary with recommendation.

Claude Desktop Configuration

To link this server with your Claude Desktop client, append the following block to your local configuration file:

File Paths

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Configuration Snippet

{
  "mcpServers": {
    "finops-ai-copilot": {
      "command": "node",
      "args": [
        "/Users/apple/Desktop/mcp dasboard/node_modules/tsx/dist/cli.js",
        "/Users/apple/Desktop/mcp dasboard/src/server.ts"
      ],
      "env": {
        "BACKEND_API_URL": "http://localhost:4000/api",
        "BACKEND_API_KEY": "mock-api-key-12345",
        "LARGE_TRANSACTION_THRESHOLD": "50000"
      }
    }
  }
}

Testing locally

To run the mock backend and query the services locally:

  1. Start the mock backend REST API (runs on port 4000):

    npx tsx scratch/mock_backend.ts
    
  2. Run the integration test client:

    npx tsx scratch/test_client.ts
    
  3. Type check the server code:

    npm run build
    

Future Roadmap

  • Anomaly Detection: Flags sudden drops in success rates.
  • Root Cause Analysis: Diagnoses why transactions fail (e.g., bank downtime vs. card failure).
  • Fraud Detection: Identifies velocity spikes or suspicious repeated low-value transactions.
  • Vendor Recommendation: Dynamic routing recommendations to route traffic away from degrading vendors automatically.
  • Scheduled Reports: Automatic generation and distribution of daily/weekly reports via email or Slack.
  • Role-Based Access Control (RBAC): Fine-grained user/client permissions for different categories of financial metrics.

推荐服务器

Baidu Map

Baidu Map

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

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

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

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

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

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

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

官方
精选
本地
TypeScript
VeyraX

VeyraX

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

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

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

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

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

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

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

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选