Skip to content

Connect Campfire to Claude: Manage Invoices, Bills, and Vendors

Give your AI agents secure read/write access to Campfire financials via MCP. Automate invoices, vendors, and journal entries with Claude.

Roopendra Talekar Roopendra Talekar · · 10 min read
Connect Campfire to Claude: Manage Invoices, Bills, and Vendors

If you need to connect Campfire to Claude to automate accounts payable, generate intercompany journal entries, or query general ledger transactions, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's LLM tool calls and Campfire's strict financial REST APIs. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.

If your team uses ChatGPT, check out our guide on /connect-campfire-to-chatgpt-analyze-financials-and-gl-records/ or explore our broader architectural overview on /connect-campfire-to-ai-agents-automate-contract-revenue-ops/.

Giving a Large Language Model (LLM) read and write access to a core accounting and ERP platform like Campfire is an engineering challenge. You have to handle complex financial data structures, map massive JSON schemas to MCP tool definitions, and deal with Campfire's specific general ledger lineage and closed-book validation rules. Every time Campfire updates an endpoint or deprecates a legacy resource, you have to update your server code, redeploy, and test the integration.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Campfire, connect it natively to Claude Desktop, and execute complex financial ops workflows using natural language.

The Engineering Reality of the Campfire API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against specialized B2B accounting APIs is painful. Campfire is built to manage complex multi-entity hierarchies, strict double-entry accounting constraints, and cash vs. accrual basis reporting. Its API reflects that exact complexity.

If you decide to build a custom Campfire MCP server, here are the specific integration challenges you will face:

Strict Intercompany Balancing Rules Campfire allows for complex multi-entity transactions where entries are balanced across different entities and currencies. When generating a tool like create_a_campfire_intercompany_journal_entry, the LLM cannot simply pass arbitrary debits and credits. The total debits must mathematically equal the total credits, and exchange rates must be explicitly handled. You must provide extensive context in the tool's JSON Schema to ensure the LLM structures the payload correctly, otherwise the API will reject the request outright.

Closed Book Constraints and 400 Errors Accounting systems enforce strict period-closing rules. An LLM might attempt to execute a tool like delete_a_campfire_journal_entry_by_id or update_a_campfire_transaction_by_id on a transaction that exists in a closed period. Campfire will return a specific HTTP 400 (or 409) indicating the books are closed for that date. Your MCP server must pass these errors back to the LLM in a readable format so the agent understands why the operation failed and can suggest a corrective action (like posting a reversing entry in the current open period) rather than blindly retrying the same destructive request.

Date Range Execution Quirks Reporting endpoints in Campfire behave differently depending on the data type. For example, on the list_all_campfire_balance_sheets endpoint, the start_date parameter is not the date balances are calculated from—balance sheet accounts are summed from the beginning of time through the end_date. An LLM has no intrinsic knowledge of accounting principles; you must explicitly instruct it via the MCP tool description exactly how date parameters influence the underlying SQL query on the Campfire side.

Rate Limits and 429 Handling It is critical to note that Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream Campfire API returns an HTTP 429 (Too Many Requests), Truto passes that error directly to the caller. Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec. The caller (or the orchestrating AI agent) is solely responsible for implementing retry logic and exponential backoff.

Generating the Campfire MCP Server

Truto's approach to MCP servers is dynamic and documentation-driven. Rather than hand-coding tool definitions, Truto derives them directly from the integration's underlying resources and schema documentation. A tool only appears in the MCP server if it has a corresponding documentation entry—this acts as a quality gate ensuring that Claude only sees well-documented endpoints.

Each MCP server is scoped to a single connected instance of Campfire for a specific tenant. The server URL contains a cryptographic token that authenticates the request and scopes the available tools.

You can create this MCP server via the Truto UI or programmatically via the API.

Method 1: Via the Truto UI

For internal tooling, IT ops, or rapid prototyping, generating the MCP server URL directly from the Truto dashboard is the fastest path.

  1. Navigate to the Integrated Accounts page in your Truto dashboard and select the connected Campfire account.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Select your desired configuration (e.g., assign a name, filter to read or write methods, restrict by specific tags, or set an expiration date).
  5. Click Save and copy the generated MCP server URL (e.g., https://api.truto.one/mcp/a1b2c3d4e5f6...).

Method 2: Via the Truto API

If you are building a product where you need to programmatically provision MCP servers for your end-users, you can use the Truto API. This validates the configuration, generates a secure hashed token in Truto's KV storage, and returns a ready-to-use URL.

Make a POST request to /integrated-account/:id/mcp:

curl -X POST https://api.truto.one/api/integrated-account/YOUR_CAMPFIRE_ACCOUNT_ID/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Campfire AP & GL Server",
    "config": {
      "methods": ["read", "write"],
      "tags": ["billing", "accounting"]
    }
  }'

The response will contain the url required by the MCP client:

{
  "id": "mcp_abc123",
  "name": "Campfire AP & GL Server",
  "config": { "methods": ["read", "write"] },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f6..."
}

Connecting Claude to the Campfire MCP Server

Once you have the Truto MCP server URL, you must connect it to Claude. Because Truto's MCP server endpoints operate over HTTP POST with JSON-RPC 2.0 messages (Server-Sent Events / SSE), you can connect Claude using either the UI or the desktop configuration file.

Method A: Via the Claude UI

If you are using Claude for Web or Enterprise:

  1. Navigate to Settings → Integrations → Add MCP Server (or Settings → Connectors → Add custom connector depending on your plan).
  2. Paste the Truto MCP server URL generated in the previous step.
  3. Click Add. Claude will immediately complete the initialization handshake, requesting the tools/list to discover all available Campfire capabilities.

Method B: Via Manual Config File (Claude Desktop)

If you are running Claude Desktop locally and want to connect it to the remote Truto MCP server, you can use the @modelcontextprotocol/server-sse utility. This acts as a local proxy that bridges Claude Desktop's standard stdio requirements with Truto's remote SSE endpoint.

Edit your claude_desktop_config.json file (typically located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "campfire_truto": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/a1b2c3d4e5f6..."
      ]
    }
  }
}

Restart Claude Desktop. The agent will now have full tool-calling access to Campfire based on the filters you applied during server creation.

Hero Tools for Campfire Automation

When Claude calls a tool via the /mcp/:token endpoint, the arguments are passed as a single flat input namespace. Truto's MCP router dynamically splits these arguments into query parameters and body parameters based on the integration's JSON schemas, delegating the execution to the underlying proxy API.

Here are the highest-leverage tools available for Campfire automation.

list_all_campfire_bills

Retrieves a paginated list of accounting bills with comprehensive filtering capabilities. Truto automatically handles the pagination logic, injecting limit and next_cursor properties into the query schema. The tool description explicitly instructs the LLM to pass cursor values back unchanged to iterate through large datasets.

"Claude, pull all unpaid bills for vendor 'Acme Corp' generated in the last 30 days. Give me a table with the bill number, due date, and outstanding amount."

create_a_campfire_intercompany_journal_entry

Creates a new intercompany journal entry. This tool allows for complex multi-entity transactions. The LLM must supply balanced transactions (total debits equal total credits). This is heavily utilized for month-end reconciliations across subsidiaries.

"Draft a new intercompany journal entry to record a $5,000 management fee from the US Parent entity to the UK Subsidiary. Debit the management fee expense account on the UK side and credit intercompany revenue on the US side."

list_all_campfire_transactions

Lists general-ledger transactions (ChartTransaction records). This is Campfire's GL transaction log and the recommended endpoint for retrieving all financial movement data. It includes account, department, vendor, entity, and tag metadata.

"Extract all general ledger transactions hitting the 'Software Subscriptions' expense account for Q3. Group the results by vendor and summarize the total spend."

campfire_bills_bulk_pay

Marks a specific bill as paid, allowing for partial payments. This executes a custom non-CRUD method on the integration, mapped cleanly as an MCP tool.

"Mark bill INV-9982 as fully paid as of today. The payment was processed via wire transfer."

list_all_campfire_cash_flows_v_2

Retrieves a sectioned cash flow statement using the indirect method. It categorizes data into operating (net income, non-cash adjustments, working-capital deltas), transactional investing, and financing lines.

"Generate a cash flow statement for the previous month. Break down the operating activities and highlight any major changes in working capital."

list_all_campfire_vendors

Retrieves a list of vendors and customers with filtering and sorting. Essential for AP operations to verify payee details before issuing bulk payments or linking new bills.

"Search for a vendor named 'Stripe'. If they exist, return their internal Campfire ID and default payment terms. If not, let me know we need to create a new vendor record."

To view the complete tool inventory, including payload structures, schemas, and required fields for all 200+ endpoints, visit the Campfire integration page.

Workflows in Action

MCP tools become exceptionally powerful when chained together by an autonomous agent. Here is how Claude handles complex, multi-step financial processes using the Campfire MCP server.

Workflow 1: Month-End Intercompany Reconciliation

During the month-end close, finance teams must ensure that intercompany balances zero out. Claude can autonomously query the GL, identify imbalances, and propose the corrective journal entries.

"Claude, check the intercompany receivable balance for the US Parent and the intercompany payable balance for the UK Sub for the month of October. If there is a discrepancy, draft a balancing intercompany journal entry to true them up, and wait for my approval before creating it."

sequenceDiagram
  autonumber
  participant User as Finance Ops User
  participant Claude as Claude Desktop
  participant Truto as Truto MCP Server
  participant Campfire as Campfire API

  User ->> Claude: "Check intercompany balances for Oct and draft true-up"
  
  Claude ->> Truto: Call tool `list_all_campfire_trial_balances`<br>{"start_date": "2023-10-01", "end_date": "2023-10-31", "account_type": "intercompany"}
  Truto ->> Campfire: GET /api/trial-balances?start_date=...
  Campfire -->> Truto: Returns $50,000 AR (US) and $48,000 AP (UK)
  Truto -->> Claude: JSON response with account balances

  Claude ->> User: "I found a $2,000 discrepancy. Shall I draft a journal entry to debit UK AP and credit US AR for $2,000?"
  User ->> Claude: "Yes, proceed."

  Claude ->> Truto: Call tool `create_a_campfire_intercompany_journal_entry`<br>{"transactions": [{...debits/credits...}]}
  Truto ->> Campfire: POST /api/intercompany-journal-entries
  Campfire -->> Truto: 201 Created (JE ID: 99281)
  Truto -->> Claude: Confirmation of created record
  Claude ->> User: "The intercompany journal entry has been posted successfully."

What happens: Claude first pulls the trial balances to analyze the state of the accounts. Realizing there is a mismatch, it constructs a complex, perfectly balanced JSON payload for the create_a_campfire_intercompany_journal_entry tool. Once the user approves, it fires the POST request, resolving a task that usually takes an accountant 30 minutes in less than 30 seconds.

Workflow 2: Automated Accounts Payable Triaging

When a new invoice arrives via email, an agent can verify if the vendor exists, create the bill, and attach the invoice file—all autonomously.

"Claude, I just received this invoice PDF from 'DataDog' for $1,200 due in 30 days. Check if DataDog is in Campfire. If they are, create an open bill and apply it to the software subscriptions department."

sequenceDiagram
  autonumber
  participant User as AP Clerk
  participant Claude as Claude Desktop
  participant Truto as Truto MCP Server
  participant Campfire as Campfire API

  User ->> Claude: "Process this DataDog invoice for $1,200"
  
  Claude ->> Truto: Call tool `list_all_campfire_vendors`<br>{"q": "DataDog"}
  Truto ->> Campfire: GET /api/vendors?q=DataDog
  Campfire -->> Truto: Returns Vendor ID 443
  Truto -->> Claude: JSON response with Vendor ID

  Claude ->> Truto: Call tool `create_a_campfire_bill`<br>{"vendor_id": 443, "amount": 1200, "due_date": "2023-12-15"}
  Truto ->> Campfire: POST /api/bills
  Campfire -->> Truto: 201 Created (Bill ID: BILL-102)
  Truto -->> Claude: Success response
  Claude ->> User: "Bill BILL-102 created for DataDog. Ready for approval."

What happens: Claude breaks the prompt down into a logical sequence. It first queries the vendors endpoint to prevent creating a duplicate record. Upon finding the ID, it formats the required date strings and monetary amounts, calling the create_a_campfire_bill tool. The proxy API executes this against Campfire's actual REST format, meaning there is no intermediary data model mapping to break the request.

Security and Access Control

Connecting an AI agent to a core financial ERP requires strict security controls. Truto's MCP servers provide multiple layers of governance at the token configuration level:

  • Method Filtering (config.methods): You can restrict an MCP server to strictly read-only operations by passing methods: ["read"]. This allows the LLM to call list_all_campfire_bills but outright rejects any attempt to call create_a_campfire_bill or campfire_bills_bulk_pay.
  • Tag Filtering (config.tags): If you only want the AI to manage vendor data and not touch the general ledger, you can filter tools by their integration resource tags (e.g., tags: ["vendors", "contacts"]).
  • Strict Authentication (require_api_token_auth): By default, the MCP token URL is sufficient to authenticate. Setting this flag to true forces the MCP client to also provide a valid Truto API token via a Bearer header. This ensures that even if the MCP URL leaks, it is useless without secondary authentication.
  • Server Expiration (expires_at): You can provision temporary MCP access (e.g., for an external auditor's AI tool) by setting an ISO datetime. Truto will automatically clean up the database record and evict the token from KV storage at the exact expiration time.

Final Thoughts

Building a custom integration layer between Claude and Campfire is an exercise in managing technical debt. You are forced to deal with OAuth token refreshes, pagination edge cases, strict accounting rules, and schema drift.

By leveraging Truto's managed MCP server infrastructure, you offload the entire protocol lifecycle. You get dynamically generated, documentation-driven tools that map perfectly to Campfire's REST API. Whether you are automating month-end closes, streamlining accounts payable, or building a conversational financial analyst, Truto gives your agents the exact tools they need—securely, instantly, and without the maintenance headache.

FAQ

How does Truto handle Campfire API rate limits?
Truto does not automatically retry or backoff when hitting rate limits. It normalizes Campfire's rate limit headers to the IETF standard (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`) and passes HTTP 429 errors directly to the caller, making the LLM or orchestration layer responsible for retries.
Can I restrict the AI agent to read-only access for Campfire data?
Yes. When creating the MCP server via the Truto UI or API, you can set the `config.methods` filter to `["read"]`. This ensures the MCP server only exposes GET and LIST operations, preventing Claude from creating or modifying financial records.
How are the MCP tools for Campfire generated?
Truto generates MCP tools dynamically based on Campfire's integration schema and documentation records. A tool only appears if there is a corresponding documentation entry, ensuring the LLM receives accurate descriptions and JSON schemas for its function calls.

More from our Blog