MF

markpitt/freeagent-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 5 forks 质量 66 趋势 14MIT

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...

概览

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. - 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 - 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 Add the server to your MCP settings (typically in %APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json): Once configured, Claude can use the following tools: 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.

README

以下为原文 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.

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

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:

{
  "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": []
    }
  }
}

For Docker Installation:

{
  "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": []
    }
  }
}

Usage

Once configured, Claude can use the following tools:

List Timeslips

{
在 GitHub 查看完整 README

安装

docker run -i --rm -e FREEAGENT_CLIENT_ID -e FREEAGENT_CLIENT_SECRET -e FREEAGENT_ACCESS_TOKEN -e FREEAGENT_REFRESH_TOKEN freeagent-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "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": [] } } }