Connect Cursor to Your Studio
What it is
Section titled “What it is”Cursor is an editor with built-in AI. With the AI connector, Cursor chat can access your studio’s data (sales, customers, schedule, and finances) when you ask a question, using the permissions of the API key’s user. It only reads data—it doesn’t make changes to the system.
When to use it
Section titled “When to use it”- You’re building an integration or a website and want to check your studio’s actual data without leaving the editor.
- You use Cursor chat every day and want to ask questions about your studio’s activity.
Before you start
Section titled “Before you start”Have the connector address and an API key with “Allow use as AI connector” enabled ready. Create them as described in the article AI Connector.
Step by step
Section titled “Step by step”Step 1 — Add the connector
Section titled “Step 1 — Add the connector”Open (or create) the ~/.cursor/mcp.json file and add the following snippet, replacing the address with the one you copied using Copy address and hk_... with your key:
{ "mcpServers": { "heya": { "url": "https://seu-dominio/mcp", "headers": { "Authorization": "Bearer hk_..." } } }}Step 2 — Check the connection
Section titled “Step 2 — Check the connection”In Cursor settings, open the MCP section. The heya connector should appear as active, with the listar_areas, buscar_ferramentas, and executar_consulta tools.
Step 3 — Ask a question
Section titled “Step 3 — Ask a question”In Cursor chat, ask a question such as: “Which customers were served at the studio today?”
What happens next
Section titled “What happens next”- Cursor finds the right query for your question, runs it, and responds with data from the system.
- The key appears in the API Key tab, with Last used updated.
- To revoke access, revoke the key in the API Key tab. Cursor will lose access within 30 seconds.
Common mistakes and questions
Section titled “Common mistakes and questions”Q: The connector shows an error in Cursor settings. What should I do?
A: Make sure the address ends in /mcp and that you pasted the entire key, including Bearer and the space after it.
After editing mcp.json, turn the connector off and back on in Cursor settings.
Q: Can I use an environment variable instead of the key? A: Some versions of Cursor don’t replace the variable with its value in the header and send the literal text instead. If the connector won’t connect using the variable, add the key directly to your user file.
Q: Can I put the configuration in the project’s .cursor/mcp.json file?
A: Avoid doing this: that file is often committed to version control, which would expose the key. Use your user file (~/.cursor/mcp.json).
Q: Cursor says the key needs “Allow use as AI connector” enabled. Why? A: The key was created without this option. Edit the key in the API Key tab and enable Allow use as AI connector.
Q: Cursor opened a login screen instead of using the key. What should I do?
A: Make sure the headers block with the key is in mcp.json. With the correct key, the system responds directly, and you don’t need to log in. If Cursor keeps prompting you to log in and the login fails, use the key with Claude Code or Gemini CLI, or contact support.
Q: Can Cursor change system data through the connector? A: No. The connector only reads data. Make changes in the system.