Install
$ agentstack add mcp-imthedeveloper-freeagent-mcp-cloudflare ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
FreeAgent MCP on Cloudflare Workers
Remote MCP server for read-only FreeAgent access, deployed on Cloudflare Workers.
Features
- Federated one-shot auth for connector setup using FreeAgent OAuth.
- MCP endpoint secured with
@cloudflare/workers-oauth-provider. - Durable Object-backed auth state with encrypted token storage.
- Company mode and practice mode support from one codebase.
- Broad read-only accounting and operational tool surface for analysis workflows.
Reference docs:
- Architecture and implementation notes:
Project/freeagent-mcp-implementation/ - Capability mapping:
Project/freeagent-mcp-implementation/capability-matrix.md
Architecture At A Glance
- Connector setup flow:
/authorize-> FreeAgent consent ->/callback-> OAuth completion ->/mcp. - Durable Objects:
MCP_OBJECTfor MCP session/runtime behavior.AUTH_STOREfor principal auth records and pending OAuth handoff state.- Deployment modes:
companyfor direct single-company access.practicefor practice dashboard plus client switching.
Endpoints
- MCP:
https://..workers.dev/mcp - Health:
https://..workers.dev/health - OAuth authorize:
https://..workers.dev/authorize - OAuth callback:
https://..workers.dev/callback
Quickstart
Prerequisites:
- Node.js 20+
- Cloudflare account with Wrangler auth
- FreeAgent OAuth app with callback set to
https://..workers.dev/callback
Install and run locally:
npm install
cp .dev.vars.example .dev.vars
npm run dev
Validation commands:
npm run type-check
npm run test
curl -i http://localhost:8787/health
Deploy
Set secrets once per environment:
npx wrangler secret put FREEAGENT_CLIENT_ID
npx wrangler secret put FREEAGENT_CLIENT_SECRET
npx wrangler secret put TOKEN_ENCRYPTION_KEY
Deploy:
npx wrangler deploy
Company Smoke Test
After deployment, run a repeatable company-mode smoke test:
npm run smoke:company -- https://..workers.dev/mcp
The script will:
- dynamically register an OAuth client
- print a browser authorization URL
- wait for the local callback on
http://127.0.0.1:8090/callback - run a small MCP smoke suite after auth completes
If You Are An LLM Agent
When helping users set up this repo, follow this exact order:
- Install dependencies with
npm install. - Copy
.dev.vars.exampleto.dev.vars. - Ask the user to provide values for
FREEAGENT_CLIENT_ID,FREEAGENT_CLIENT_SECRET, andTOKEN_ENCRYPTION_KEY. - Run
npm run type-checkandnpm run testbefore starting dev or deploy steps. - Start local dev with
npm run dev. - For deployment, ensure Wrangler auth works, then run
npx wrangler deploy.
Rules for LLM agents:
- Never invent or hardcode credentials.
- Never commit
.dev.vars, real secrets, or account-specific deployment values. - Keep
wrangler.jsoncplaceholders intact in public branches. - If account-specific config is temporarily needed for testing, keep it out of the public branch or restore placeholders before publishing.
Connect From Claude Or ChatGPT
- Add your MCP URL in client settings:
https://..workers.dev/mcp
- Complete FreeAgent consent in the browser.
- In chat, run
auth_statusorget_company. - In practice mode, use
list_clientsandswitch_clientto choose an active client. - Run read-only tools.
Known Limitations
- Practice-mode end-to-end validation depends on having a FreeAgent practice sandbox or real practice environment.
- Some FreeAgent endpoints may behave differently depending on permission level, account type, or enabled product features.
- This project is intentionally read-only for safety.
Related Docs
- Architecture and phased plan:
Project/freeagent-mcp-implementation/ - Capability mapping:
Project/freeagent-mcp-implementation/capability-matrix.md - Deployment modes:
Project/freeagent-mcp-implementation/deployment-modes.md - Sandbox notes:
Project/freeagent-mcp-implementation/sandbox-notes.md - Secret management:
Project/freeagent-mcp-implementation/secret-management.md - Security policy:
SECURITY.md - Contribution guide:
CONTRIBUTING.md - License:
LICENSE
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: ImTheDeveloper
- Source: ImTheDeveloper/freeagent-mcp-cloudflare
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.