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

@halfords-pro/freeagent-mcp

v0.1.0

Published

An MCP server to interact with FreeAgent

Downloads

74

Readme

FreeAgent MCP Server

A Claude MCP (Model Context Protocol) server for managing FreeAgent timeslips and timers. This server allows Claude to interact with your FreeAgent account to track time, manage timers, and handle timeslip operations.

License: MIT

Features

  • List and filter timeslips with nested data
  • Create new timeslips
  • Update existing timeslips
  • Start and stop timers
  • Delete timeslips
  • Automatic OAuth token refresh
  • Comprehensive error handling
  • Docker support

Prerequisites

  • Node.js 18+ (for direct Node.js usage)
  • Docker & Docker Compose (for containerized usage)
  • A FreeAgent account with API access
  • OAuth credentials from the FreeAgent Developer Dashboard

Installation

Option 1: Direct Node.js Installation

  1. Clone the repository:
git clone https://github.com/yourusername/freeagent-mcp.git
cd freeagent-mcp
  1. Install dependencies:
npm install
  1. Get your OAuth tokens:
# Set your FreeAgent credentials
export FREEAGENT_CLIENT_ID="your_client_id"
export FREEAGENT_CLIENT_SECRET="your_client_secret"

# Run the OAuth setup script
node scripts/get-oauth-tokens.js

Option 2: Docker Installation

  1. Clone the repository:
git clone https://github.com/yourusername/freeagent-mcp.git
cd freeagent-mcp
  1. Create your environment file:
cp .env.example .env
# Edit .env with your FreeAgent credentials
  1. Build Docker image:
docker build -t freeagent-mcp .

Configuration

Environment Variables

The server requires the following environment variables:

  • FREEAGENT_CLIENT_ID - Your FreeAgent OAuth client ID (required)
  • FREEAGENT_CLIENT_SECRET - Your FreeAgent OAuth client secret (required)
  • FREEAGENT_ACCESS_TOKEN - Your OAuth access token (required)
  • FREEAGENT_REFRESH_TOKEN - Your OAuth refresh token (required)
  • FREEAGENT_API_URL - FreeAgent API endpoint URL (optional)
    • Production (default): https://api.freeagent.com/v2
    • Sandbox/Testing: https://api.sandbox.freeagent.com/v2
    • If not set, defaults to production

Important: Sandbox and production environments require separate OAuth credentials. Make sure you obtain the appropriate credentials from the FreeAgent Developer Dashboard for your target environment.

MCP Settings

Add the server to your MCP settings (typically in %APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):

For Node.js Installation:

Production Configuration:

{
  "mcpServers": {
    "freeagent": {
      "command": "node",
      "args": ["path/to/freeagent-mcp/build/index.js"],
      "env": {
        "FREEAGENT_CLIENT_ID": "your_client_id",
        "FREEAGENT_CLIENT_SECRET": "your_client_secret",
        "FREEAGENT_ACCESS_TOKEN": "your_access_token",
        "FREEAGENT_REFRESH_TOKEN": "your_refresh_token"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Sandbox Configuration:

{
  "mcpServers": {
    "freeagent": {
      "command": "node",
      "args": ["path/to/freeagent-mcp/build/index.js"],
      "env": {
        "FREEAGENT_CLIENT_ID": "your_sandbox_client_id",
        "FREEAGENT_CLIENT_SECRET": "your_sandbox_client_secret",
        "FREEAGENT_ACCESS_TOKEN": "your_sandbox_access_token",
        "FREEAGENT_REFRESH_TOKEN": "your_sandbox_refresh_token",
        "FREEAGENT_API_URL": "https://api.sandbox.freeagent.com/v2"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

For Docker Installation:

Production Configuration:

{
  "mcpServers": {
    "freeagent": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e", "FREEAGENT_CLIENT_ID",
        "-e", "FREEAGENT_CLIENT_SECRET",
        "-e", "FREEAGENT_ACCESS_TOKEN",
        "-e", "FREEAGENT_REFRESH_TOKEN",
        "freeagent-mcp"
      ],
      "env": {
        "FREEAGENT_CLIENT_ID": "your_client_id",
        "FREEAGENT_CLIENT_SECRET": "your_client_secret",
        "FREEAGENT_ACCESS_TOKEN": "your_access_token",
        "FREEAGENT_REFRESH_TOKEN": "your_refresh_token"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Sandbox Configuration:

{
  "mcpServers": {
    "freeagent": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e", "FREEAGENT_CLIENT_ID",
        "-e", "FREEAGENT_CLIENT_SECRET",
        "-e", "FREEAGENT_ACCESS_TOKEN",
        "-e", "FREEAGENT_REFRESH_TOKEN",
        "-e", "FREEAGENT_API_URL",
        "freeagent-mcp"
      ],
      "env": {
        "FREEAGENT_CLIENT_ID": "your_sandbox_client_id",
        "FREEAGENT_CLIENT_SECRET": "your_sandbox_client_secret",
        "FREEAGENT_ACCESS_TOKEN": "your_sandbox_access_token",
        "FREEAGENT_REFRESH_TOKEN": "your_sandbox_refresh_token",
        "FREEAGENT_API_URL": "https://api.sandbox.freeagent.com/v2"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Usage

Once configured, Claude can use the following tools:

List Timeslips

{
  "from_date": "2024-01-01",      // Start date (YYYY-MM-DD)
  "to_date": "2024-03-04",        // End date (YYYY-MM-DD)
  "updated_since": "2024-03-04T12:00:00Z",  // ISO datetime
  "view": "all",                  // "all", "unbilled", or "running"
  "user": "https://api.freeagent.com/v2/users/123",
  "task": "https://api.freeagent.com/v2/tasks/456",
  "project": "https://api.freeagent.com/v2/projects/789",
  "nested": true                  // Include nested resources
}

Create Timeslip

{
  "task": "https://api.freeagent.com/v2/tasks/123",
  "user": "https://api.freeagent.com/v2/users/456",
  "project": "https://api.freeagent.com/v2/projects/789",
  "dated_on": "2024-03-04",
  "hours": "1.5",
  "comment": "Optional comment"
}

Timer Controls

// Start timer
{
  "id": "123"
}

// Stop timer
{
  "id": "123"
}

Development

Node.js Development

# Build the project
npm run build

# Watch for changes
npm run watch

# Run tests (when implemented)
npm test

Docker Development

# Build the Docker image
docker build -t freeagent-mcp .

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -am 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • FreeAgent for their excellent API documentation
  • The Claude team for the MCP SDK