FreeAgent时间追踪器
STDIO管理FreeAgent时间记录和计时器的服务器
管理FreeAgent时间记录和计时器的服务器
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.
git clone https://github.com/yourusername/freeagent-mcp.git cd freeagent-mcp
npm install
# 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
git clone https://github.com/yourusername/freeagent-mcp.git cd freeagent-mcp
cp .env.example .env # Edit .env with your FreeAgent credentials
docker build -t freeagent-mcp .
Add the server to your MCP settings (typically in %APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
):
{ "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": [] } } }
{ "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": [] } } }
Once configured, Claude can use the following tools:
{ "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 }
{ "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" }
// Start timer { "id": "123" } // Stop timer { "id": "123" }
# Build the project npm run build # Watch for changes npm run watch # Run tests (when implemented) npm test
# Build the Docker image docker build -t freeagent-mcp .
git checkout -b feature/amazing-feature
)git commit -am 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.