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.

Claude, with the CodeFreeAPI MCP server
Create a backend for my recipe app: recipes with ingredients. Anyone can read recipes, only signed-in users can add them, and only the author can edit. Then connect my React app.
Assistant
  • 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. 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. 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 of cfa_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 Code
    claude 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

ToolsWhat they do
list_projects, describe_projectYour projects, and everything an app needs to call one: base URL, auth, entities, fields, access rules, examples
list_templates, create_projectStart a project, empty or from a template (todo, blog, online store, waitlist, CRM)
list_entities, get_entityEntities, fields and relations
create_entity, add_fieldBuild the data model
set_access_rulesPer method: public, signed-in users, owner only, admins, or off
list_records, create_record, update_record, delete_recordWork with the data, with filters, sorting and search
create_api_keyA 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?
Any tool that supports MCP servers: Claude Desktop, Claude Code, Cursor, Windsurf and others. You add the server once in the tool's MCP settings.
What about Lovable, Bolt or v0?
This server runs on your computer (started with npx), which browser-based builders can't do. Use "Copy for AI" on your project page instead: it copies a description of your API that you paste into the chat. AI tools guide
What can the token do?
Everything you can do in the dashboard for your projects, except changing your account (password, email, deletion), creating more tokens, or using admin rights. You can delete a token any time in Settings, and resetting your password deletes all of them.
Can the AI delete my data?
Yes, if you ask it to: the token can do what you can do. Watch what it does, the way you would review code it writes, and try bigger changes in a separate project first. On Pro, daily data snapshots let you restore a project.
Does it cost anything?
The MCP server is free and MIT licensed, on every plan. What it creates counts toward your plan's limits like anything you create in the dashboard.

Let your AI tool build the backend

Free plan, no credit card. Your first API is live in a few minutes.