Connect a custom MCP server as a chat connector
Connect any external tool or private database to your chat using an MCP server URL. This lets the AI read live context while helping you build, but it will not run inside your published app.
Anyone who wants the AI builder to reference internal tools, private data, or custom APIs during development chat.
Do this, in order
- 1
Open Connectors, select 'Add custom', and choose 'MCP server'.
This opens the setup form for linking your external tool to the builder.
- 2
Enter a clear name for your server, such as 'Internal CRM' or 'Analytics API'.
You will reference this exact name in chat prompts when asking the AI to pull context.
- 3
Select 'Direct connection' or 'Lovable static IPs' under the Connection dropdown.
Direct works for public servers, while static IPs let you route through fixed IP addresses if your server is behind a firewall.
- 4
Paste your server's endpoint address into the 'Server URL' field.
Lovable needs the exact web location where your MCP service is running.
- 5
Choose your authentication method: OAuth, Bearer token/API key, or No authentication.
The server needs to verify your identity before returning private information.
- 6
Click 'Add & authorize' or 'Add server'.
This finalizes the connection and saves it to your personal chat connectors.
Paste this into your project
Using the Internal CRM connector, list my five most recent customer accounts.
Words decoded
- MCP server
- A web service built on a standard protocol (Model Context Protocol) that feeds live data or tools directly into an AI assistant.
- Chat connector
- An integration that works only inside the development chat to give the AI context, never accessible by end users of your deployed app.
- Static IPs
- Fixed internet addresses that never change, commonly used to allow traffic through secure corporate firewalls.
Where people get stuck
- Expecting the custom MCP server to work inside your live published application; it only supplies context to the AI builder chat.
- Assuming team members can share your connection; custom MCP setups are personal to your account and credentials.
- Treating Lovable's static IP range as proof of user identity instead of keeping an API key or OAuth active.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.