npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hachiai/mcp-quickbooks

v0.0.1

Published

QuickBooks Online MCP server — lets AI assistants access QuickBooks data via the Model Context Protocol

Readme

QuickBooks Online MCP Server

This is a Model Context Protocol (MCP) server implementation for QuickBooks Online integration. It lets AI assistants access QuickBooks data via MCP.

npm package: @hachiai/mcp-quickbooks

Install

npm install @hachiai/mcp-quickbooks

Or clone this repo and run npm install in the project directory.

Setup

  1. Install dependencies (if not using the npm package):
npm install
  1. Create a .env file in the root directory with the following variables:
QUICKBOOKS_CLIENT_ID=your_client_id
QUICKBOOKS_CLIENT_SECRET=your_client_secret
QUICKBOOKS_ENVIRONMENT=sandbox
  1. Get your Client ID and Client Secret:
    1. Create a new app (or select an existing one)
  • Get the Client ID and Client Secret from the app's keys section In Keys & Credentials:
    • Use Development for testing (Sandbox)

    • Use Production only for real customer data Copy:

    • Client ID

    • Client Secret Go to SettingsRedirect URIs and add:

    • Add http://localhost:8000/callback to the app's Redirect URIs

Authentication

There are two ways to authenticate with QuickBooks Online:

Option 1: Using Environment Variables

If you already have a refresh token and realm ID, you can add them directly to your .env file:

QUICKBOOKS_REFRESH_TOKEN=your_refresh_token
QUICKBOOKS_REALM_ID=your_realm_id

Option 2: Using the OAuth Flow

If you don't have a refresh token, run:

npm run auth

This will:

  • Start a temporary local server
  • Open your default browser automatically
  • Redirect you to QuickBooks for authentication
  • Save the tokens to your .env file once authenticated
  • Close automatically when complete

Usage

After authentication is set up, you can use the MCP server to interact with QuickBooks Online. The server provides various tools for managing customers, estimates, bills, and more.

Available Tools

Added tools for Create, Delete, Get, Search, Update for the following entities:

  • Account
  • Bill Payment
  • Bill
  • Customer
  • Employee
  • Estimate
  • Invoice
  • Item
  • Journal Entry
  • Purchase
  • Vendor
  1. Build the Project

This compiles TypeScript and produces dist/auth-server.js and dist/index.js.

npm run build

You should see dist/auth-server.js created.

  1. Authenticate with QuickBooks (First Time)

Run:

npm run auth

What this does (from src/auth-server.ts):

  • Loads environment variables via dotenv/config

  • Imports the QuickBooks client and calls quickbooksClient.authenticate()

  • If no valid refresh token / realm ID is found:

         -Starts a temporary local server
    
         -Opens your browser automatically
  • Sends you to QuickBooks to sign in and authorize

Receives the callback on http://localhost:8000/callback

  • Saves tokens to .env

  • Exits automatically

After success, your .env will contain:

QUICKBOOKS_REFRESH_TOKEN=... QUICKBOOKS_REALM_ID=...

In the terminal

PS C:\Users\quickbooks-online-mcp-server> npm run auth

> @qboapi/[email protected] auth
> node dist/auth-server.js

Starting QuickBooks OAuth flow...
Your browser will open for sign-in. Complete the flow there.
OAuth complete. Tokens saved to .env. You can close this window.

Error Handling

If you see an error message like "QuickBooks not connected", make sure to:

  1. Check that your .env file contains all required variables QUICKBOOKS_CLIENT_ID=your_client_id_here QUICKBOOKS_CLIENT_SECRET=your_client_secret_here QUICKBOOKS_ENVIRONMENT=sandbox QUICKBOOKS_REDIRECTURI=http://localhost:8000/callback

  2. Verify that your tokens are valid and not expired