Skip to content

Connect Cursor to Your Studio

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.

  • 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.

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.

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_..." }
}
}
}

In Cursor settings, open the MCP section. The heya connector should appear as active, with the listar_areas, buscar_ferramentas, and executar_consulta tools.

In Cursor chat, ask a question such as: “Which customers were served at the studio today?”

  • 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.

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.