MCP cover image
See in Github
2025-04-14

0

Github Watches

0

Github Forks

0

Github Stars

MCP Server for QuickBooks Online V3 API

A Mock–Capture–Proxy (MCP) server that sits in front of Intuit's QuickBooks Online V3 Accounting API. It can:

Mode Purpose
mock Serve example payloads generated from the OpenAPI spec—design and test without calling Intuit.
proxy Forward validated traffic to Intuit's live or sandbox endpoints (adding the OAuth 2.0 bearer token).
capture Proxy traffic and persist every request/response pair to an ND‑JSON log for replay or analytics.

✨ Key Features

  • OpenAPI‑strict validation – every incoming request is checked against the spec before it leaves your machine.
  • Automatic sample responses – powered by openapi‑backend.
  • One‑line mode switch – choose mock, proxy, or capture via MCP_MODE env var.
  • Stateless design – no database required; capture logs are flat files.
  • 100 % TypeScript – easy to extend and type‑safe.

🛠️ Prerequisites

  • Node.js ≥ 18
  • A local copy of QuickBooksOnlineV3.json (Intuit's OpenAPI definition).
  • (Proxy/Capture only) An OAuth 2.0 access token for QuickBooks Online.

🚀 Getting Started

1  Clone & install

# clone repo (or copy the two source files)
npm i -S express openapi-backend http-proxy-middleware morgan dotenv
npm i -D typescript ts-node @types/node @types/express @types/morgan \
       @types/http-proxy-middleware

2  Place the spec

cp /path/to/QuickBooksOnlineV3.json ./QuickBooksOnlineV3.json

3  Configure environment

Create .env (or export vars) and adjust as needed:

# .env.example
MCP_MODE=mock                # mock | proxy | capture
SPEC_PATH=./QuickBooksOnlineV3.json
PORT=4000
QBO_BASE=https://quickbooks.api.intuit.com
QBO_TOKEN=eyJhbG...          # required in proxy/capture modes

4  Run

# Mock server (no Intuit traffic)
MCP_MODE=mock  npx ts-node mcp-server.ts

# Validating reverse‑proxy
MCP_MODE=proxy QBO_TOKEN=<token> npx ts-node mcp-server.ts

# Proxy + persistent capture
MCP_MODE=capture QBO_TOKEN=<token> npx ts-node mcp-server.ts

You'll see:

🌀 MCP server listening on http://localhost:4000  (mode=mock)

🔗 Local Endpoints

URL Description
GET /health Simple JSON health‑check.
ANY /api/* All QuickBooks API paths (mock/proxy/capture).

Example: GET http://localhost:4000/api/v3/company/YOUR_REAL_COMPANY_ID/customer


📝 Capture Log Format (captures.ndjson)

Each line is a JSON object:

{
  "ts": "2025-04-22T19:34:12.345Z",
  "req": {
    "method": "GET",
    "url": "/api/v3/company/1234/invoice/42",
    "headers": { "authorization": "Bearer …" },
    "body": {}
  },
  "res": {
    "status": 200,
    "body": { "Invoice": { … } }
  }
}

Great for regression tests, analytics, or seeding fixtures.


🧩 Extending & Customising

  1. Schema‑driven fakes – swap c.mock() for Stoplight Prism if you need dynamic values.
  2. Rate limiting – bolt on express-rate-limit or front with Nginx to stay under Intuit's 500 RPM cap.
  3. OAuth auto‑refresh – catch 401s and swap your refresh_token for a new access token automatically.
  4. Typed SDK – generate a client with openapi-generator-cli and import it to enforce compile‑time safety in custom handlers.

🐛 Common Errors & Fixes

Symptom Likely Cause Fix
400 validationFail Request doesn't match spec Double‑check path params, query, body schema
429 Throttle exceeded QuickBooks limit hit Slow down / add exponential back‑off
401 Unauthorized Expired access token Refresh OAuth token and restart or implement auto‑refresh

📄 License

MIT © 2025 Your Name

相关推荐

  • Aurity Ltd
  • Create and Publish Business Websites in seconds. AI will gather all the details about your website and generate link to your website.

  • John Rafferty
  • Text your favorite pet, after answering 10 questions about their everyday lives!

  • Convincible Ltd
  • You're in a stone cell – can you get out? A classic choose-your-adventure interactive fiction game, based on a meticulously-crafted playbook. With a medieval fantasy setting, infinite choices and outcomes, and dice!

  • Ian O'Connell
  • Provide players' names or enter Quickstart to start the game!

  • Matthieu Savioux
  • Evaluates language quality of texts, responds with a numerical score between 50-150.

  • analogchat.com
  • Efficient Spotify assistant for personalized music data.

  • seabiscuit.ai
  • Discover A More Robust Business: Craft tailored value proposition statements, develop a comprehensive business model canvas, conduct detailed PESTLE analysis, and gain strategic insights on enhancing business model elements like scalability, cost structure, and market competition strategies. (v1.18)

  • Carl Oscar Aaro
  • Structured recipes for food and desserts – ingredient lists and step-by-step recipe instructions from any input. Become surprised, try something new or breathe life into grandma's old recipe notebook.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的LLM资料总结(Agent框架、辅助编程、数据处理、模型训练、模型推理、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.

  • n8n-io
  • Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

  • av
  • Effortlessly run LLM backends, APIs, frontends, and services with one command.

  • 1Panel-dev
  • 🔥 1Panel provides an intuitive web interface and MCP Server to manage websites, files, containers, databases, and LLMs on a Linux server.

  • Azure
  • The Azure MCP Server, bringing the power of Azure to your agents.

  • langgenius
  • Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.

  • alibaba
  • an easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.

  • caio-moliveira
  • This project was created to demonstrate how we can connect with different Model Context Protocols (MCPs).

  • rulego
  • ⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.

  • Byaidu
  • PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero

    Reviews

    2.6 (13)
    Avatar
    user_NwGi5hNQ
    2025-04-23

    QuickBooks-MCP by OrdinaryKids is a game-changer! It streamlines my accounting with efficiency and ease. The user-friendly interface and powerful features make managing finances a breeze. Highly recommend for anyone looking to simplify their bookkeeping process.

    Avatar
    user_8dEXbxDu
    2025-04-23

    QuickBooks-MCP by OrdinaryKids is an exceptional financial tool that has significantly streamlined my accounting tasks. The interface is user-friendly, making it easy even for those with limited financial knowledge to manage their books efficiently. It offers comprehensive features that cater to all my business needs. Highly recommended for anyone seeking an efficient and reliable accounting solution.

    Avatar
    user_AqTO9an6
    2025-04-23

    As a dedicated user of QuickBooks-MCP by ordinarykids, I must say it's an incredibly efficient tool for managing my accounting needs. It simplifies my bookkeeping with an intuitive interface and robust features. Highly recommended for small business owners!

    Avatar
    user_gwQpDc3X
    2025-04-23

    QuickBooks-MCP by ordinarykids has truly revolutionized my accounting tasks. It’s incredibly user-friendly and efficient, making bookkeeping a breeze. The integration features are seamless, and the support is outstanding. If you’re looking for a reliable accounting tool, this is it! Highly recommended!

    Avatar
    user_U70jJCgv
    2025-04-23

    The quickbooks-mcp by ordinarykids is a game-changer for managing my finances. Its user-friendly interface and seamless integration streamline my bookkeeping tasks efficiently. Whether tracking expenses or generating reports, it’s a reliable tool that saves me both time and effort. Highly recommend!

    Avatar
    user_LxHyj5Ib
    2025-04-23

    As a dedicated user of QuickBooks-MCP, created by Ordinarykids, I can confidently say this tool has transformed my financial management. It's user-friendly and streamlines accounting processes effortlessly. Highly recommended for anyone looking to simplify their bookkeeping tasks!

    Avatar
    user_JjeslHOH
    2025-04-23

    Quickbooks-MCP by Ordinarykids is an incredibly handy tool for managing my accounting needs. Its user-friendly interface and seamless integration make it an essential part of my daily operations. The functionality this app offers far exceeds my expectations, and the support from the team has been top-notch. Highly recommended for anyone seeking a reliable accounting solution!

    Avatar
    user_awzHXP6T
    2025-04-23

    QuickBooks-MCP is an exceptional tool developed by OrdinaryKids. As a devoted user, I find it incredibly efficient for managing my finances and bookkeeping tasks. The interface is user-friendly, making it accessible even for non-accountants. The seamless integration with other financial data sources saves a lot of time and effort. Highly recommended for anyone looking for a reliable and efficient accounting solution!

    Avatar
    user_mKusn3un
    2025-04-23

    QuickBooks-MCP by OrdinaryKids is an incredible tool I use daily. It simplifies my bookkeeping tasks, offering a user-friendly interface that's easy to navigate. This application saves me countless hours each week and helps me keep my finances organized effortlessly. Highly recommend for anyone looking to streamline their accounting process!

    Avatar
    user_TQfzrThY
    2025-04-23

    QuickBooks-MCP by OrdinaryKids is a game-changer for anyone managing multiple clients financials. The interface is user-friendly, making it easy to track expenses, generate reports, and handle payroll with precision. Thanks to its seamless integration, my workload has significantly reduced, allowing me to focus more on client relationships. Highly recommended!

    Avatar
    user_arJh1GyW
    2025-04-23

    As a dedicated user of quickbooks-mcp by ordinarykids, I am incredibly impressed with its seamless integration and powerful features. It has significantly streamlined our accounting processes, saving us both time and money. The user-friendly interface and thorough support make it a must-have for any business looking to simplify their financial management. Highly recommend!

    Avatar
    user_nOz6n2If
    2025-04-23

    As a loyal user of quickbooks-mcp by ordinarykids, I must say it has revolutionized how I manage my finances. Its intuitive interface and robust features make bookkeeping a breeze, tailored perfectly for my needs. Highly recommend it to anyone seeking reliable financial management software!

    Avatar
    user_KdmS5Yvm
    2025-04-23

    QuickBooks-MCP by ordinarykids is simply outstanding. As a regular user, I find it incredibly intuitive and efficient for managing my finances. Its seamless integration and detailed tracking have made my accounting tasks much easier. Highly recommended for anyone looking to simplify their financial processes!