MCP Integration
The Model Context Protocol (MCP) is an open standard that lets AI coding tools call out to external services with structured tools. Ainecto exposes its workspace, document, ERD, flow, testcase, and readme APIs as 102 tools in the single mcp__ainecto__ namespace, so your AI assistant can work from live project data instead of guessing.
One MCP integration works across many AI clients. No per-tool plugin needed.
Why use MCP?
Without MCP, your AI coding assistant doesn't know what your real schema looks like. You either paste DDL into every chat, or accept that the assistant is guessing column names and types.
With MCP + Ainecto, your assistant can:
- List ERD, flow, readme, and testcase documents in a workspace or project
- Read ERD tables, columns, indexes, relationships, enums, and groups
- Create new tables, columns, refs, enums, and groups
- Modify existing structure (add/rename/drop columns, change FKs, etc.)
- Generate or append readme documents and manage testcase scenarios, cases, and runs
- Snapshot every document change for version history
Every write is tagged with a description, attributed to your account, and rolls into the same audit log as your manual edits.
Endpoint
POST https://ainecto.com/mcp
- Protocol: JSON-RPC 2.0 over HTTP (Streamable HTTP transport)
- Auth: OAuth 2.0 with PKCE (your MCP client handles the flow)
- Session:
Mcp-Session-Idheader (auto-issued oninitialize) - Discovery:
GET https://ainecto.com/.well-known/oauth-provider
You don't usually call this directly — your MCP client (Claude Code, Cursor, etc.) speaks the protocol for you.
Authentication
Ainecto acts as an OAuth 2.0 authorization server for MCP clients. The flow:
- Your MCP client redirects you to Ainecto's authorization page
- You sign in (or are already signed in) and consent
- Ainecto issues an access token to the client
- The client uses the token in the
Authorization: Bearer {token}header on every MCP call
The token represents your account - every action through MCP is attributed to you and respects your permissions on each project and document.
MCP is gated by plan. The free tier does not include MCP access; Pro and Enterprise tiers do.
Supported clients
Ainecto has been tested or designed to work with:
- Claude Code — Anthropic's terminal coding agent
- Codex — OpenAI's coding agent
- Copilot — GitHub Copilot
- Cursor — AI-first code editor
- Gemini — Google's coding assistants
- Windsurf — Codeium's AI editor
…and any other tool that speaks MCP. The protocol is the same across all of them; only the per-client config differs.
See the per-client setup pages for exact configuration snippets.
What you can do once connected
Quick examples to try in your AI client after connecting:
List all my Ainecto ERD documents.
Show me the columns of the users table in ERD document <uuid>.
Add a soft_delete_at timestamp column to all tables in ERD document <uuid>.
Use a description "Add soft delete support".
Create a new table called notifications in ERD document <uuid>:
- id (bigint, PK, auto-increment)
- user_id (bigint, FK to users.id)
- message (text, not null)
- read_at (timestamp, nullable)
- created_at (timestamp, default now)
Then create a foreign key from notifications.user_id to users.id with on_delete=cascade.
The assistant translates these into tool calls such as
mcp__ainecto__list_documents, mcp__ainecto__erd_get_table,
mcp__ainecto__erd_create_tables, and mcp__ainecto__erd_apply_changes.
Ainecto applies the changes and creates a version snapshot automatically.
Next steps
- Pick your client: Claude Code · Codex · Copilot · Cursor · Gemini · Windsurf
- Browse the tool reference to see what's available