View as Markdown

FreeAgent Integration

Manage FreeAgent get company, list contacts, create contact, list invoices, create invoice

The FreeAgent integration provides access to manage FreeAgent get company, list contacts, create contact, list invoices, create invoice through the Integrate MCP server.

Installation

The FreeAgent integration is included with the SDK:

import { freeagentIntegration } from "integrate-sdk/server";

Setup

1. Create a FreeAgent OAuth App

  1. Create an OAuth application for FreeAgent
  2. Configure your redirect URI
  3. Note your Client ID and Client Secret

2. Configure the Integration on Your Server

Add the FreeAgent integration to your server configuration. The integration automatically reads FREEAGENT_CLIENT_ID and FREEAGENT_CLIENT_SECRET from your environment variables:

import { createMCPServer, freeagentIntegration } from "integrate-sdk/server";
 
export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    freeagentIntegration({
      scopes: ["full_access"], // Optional
    }),
  ],
});

You can override the environment variables by passing explicit values:

freeagentIntegration({
  clientId: process.env.CUSTOM_FREEAGENT_ID,
  clientSecret: process.env.CUSTOM_FREEAGENT_SECRET,
      scopes: ["full_access"], // Optional
});

3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

import { client } from "integrate-sdk";
 
await client.authorize("freeagent");
const result = await client.freeagent.getCompany({});
 
console.log(result);

If you're using a custom client, add the integration to the integrations array:

import { createMCPClient, freeagentIntegration } from "integrate-sdk";
 
const customClient = createMCPClient({
  integrations: [freeagentIntegration()],
});

Configuration Options

export interface FreeagentIntegrationConfig {
  clientId?: string;

Default Scopes

These defaults are applied unless you override scopes in the integration config:

  • full_access

Tools

freeagent_get_company

Get company

No parameters.

freeagent_list_contacts

List contacts

export interface FreeagentListContactsParams { "page"?: number }

freeagent_create_contact

Create contact

export interface FreeagentCreateContactParams { contact_json: string }

freeagent_list_invoices

List invoices

export interface FreeagentListInvoicesParams { "view"?: string;

freeagent_create_invoice

Create invoice

export interface FreeagentCreateInvoiceParams { invoice_json: string }

freeagent_list_bills

List bills

export interface FreeagentListBillsParams { "page"?: number }

Notes

  • Category: Accounting
  • Authentication mode: OAuth