MCP server
Let Claude and Cursor build your backend
Describe your app in the chat. With the CodeFreeAPI MCP server, your AI tool creates the data model, access rules and API keys itself, then writes the code that calls them.
- create_project "Recipes"
- create_entity recipes: title, steps, minutes
- create_entity ingredients: name, amount, recipe → recipes
- set_access_rules recipes: read public, create signed-in, edit owner
- create_api_key for the app, limited to localhost:5173
Done. Your API is at recipes.codefreeapi.com/api/v1. I've added the key to .env and the recipe list now loads from it.
Ask for what you want, not for endpoints
The AI sees your projects the way you see them in the dashboard, so it can change them and use them in the same conversation.
"Add a featured flag to products and mark the three cheapest ones as featured."
Adds a boolean field, lists products sorted by price, and updates the first three.
"Wire my React app to the tasks API, with login."
Reads the project description (base URL, fields, rules) and writes the fetch calls and the login form.
"Only signed-in users should see orders, and only their own."
Sets the orders rules to "owner only" for reading, changing and deleting.
Setup
You need Node.js 18 or newer and a CodeFreeAPI account (the free plan works).
1. Create an access token
In the dashboard, open Settings → Access tokens and create one. It starts with
cfa_pat_and is shown once.2. Add the server to your AI tool
Paste your token in place of
cfa_pat_....Add to CursorCursor asks to install it; then put your token in place ofcfa_pat_...in Cursor's MCP settings.Claude Desktop, Cursor, Windsurf (MCP settings){ "mcpServers": { "codefreeapi": { "command": "npx", "args": ["-y", "@codefreeapi/mcp"], "env": { "CODEFREEAPI_TOKEN": "cfa_pat_..." } } } }Claude Codeclaude mcp add codefreeapi -e CODEFREEAPI_TOKEN=cfa_pat_... -- npx -y @codefreeapi/mcp
Then ask, for example: "List my CodeFreeAPI projects." If it answers with your projects, you're set.
What it can do
| Tools | What they do |
|---|---|
| list_projects, describe_project | Your projects, and everything an app needs to call one: base URL, auth, entities, fields, access rules, examples |
| list_templates, create_project | Start a project, empty or from a template (todo, blog, online store, waitlist, CRM) |
| list_entities, get_entity | Entities, fields and relations |
| create_entity, add_field | Build the data model |
| set_access_rules | Per method: public, signed-in users, owner only, admins, or off |
| list_records, create_record, update_record, delete_record | Work with the data, with filters, sorting and search |
| create_api_key | A key for your app, shown once |
- The token can't change your password, email or account
- It can't create more tokens or use admin rights
- Delete it any time in Settings; a password reset deletes all tokens
- The server sends it only to codefreeapi.com; keep it out of your code
Questions
Which AI tools work with it?
What about Lovable, Bolt or v0?
What can the token do?
Can the AI delete my data?
Does it cost anything?
Let your AI tool build the backend
Free plan, no credit card. Your first API is live in a few minutes.