---
title: "Cursor IDE"
description: "Set up Cursor IDE to reach the APIBrasil APIs from inside your editor, with full context through the MCP server."
lang: en
canonical: https://doc.apibrasil.io/mcp/ide-editores/cursor
markdown: https://doc.apibrasil.io/mcp/ide-editores/cursor.md
source: apibrasil-documentation
---

# Cursor IDE

> Set up Cursor IDE to reach the APIBrasil APIs from inside your editor, with full context through the MCP server.

- **Category:** IDEs and editors
- **Difficulty:** Easy
- **Protocol:** connects to the MCP server
- **Updated on:** January 14, 2026

## Prerequisites

- Cursor IDE installed (version 0.40+)
- Access to the APIBrasil MCP

## Configuration

- **File:** `.cursor/mcp_settings.json`

```json
{
  "mcpServers": {
    "https://mcp.apibrasil.cloud/mcp": {
      "name": "APIBrasil MCP",
      "url": "https://mcp.apibrasil.cloud/mcp"
    }
  }
}
```

## Step by step

1. **Open the Cursor settings** — In Cursor, press `Cmd/Ctrl + Shift + P` and look for 'MCP: Edit Config', or go to Settings > MCP Servers
2. **Add the MCP server** — Paste the JSON configuration above into Cursor's configuration file
   ```json
   {
     "mcpServers": {
       "https://mcp.apibrasil.cloud/mcp": {
         "name": "APIBrasil MCP",
         "url": "https://mcp.apibrasil.cloud/mcp"
       }
     }
   }
   ```
3. **Check the server URL** — Confirm the URL matches the guide exactly: https://mcp.apibrasil.cloud/mcp
4. **Restart Cursor** — Quit and reopen Cursor so it loads the new MCP configuration
5. **Test the connection** — In the Cursor chat, ask "look up postcode 01001000 using APIBrasil" and watch the AI reach for the MCP on its own

## Troubleshooting

- **The MCP server will not connect** — Confirm the server URL is right and that the endpoint is up: https://mcp.apibrasil.cloud/mcp
- **Connection refused, or a timeout** — Check that the MCP server is up at https://mcp.apibrasil.cloud/mcp and that your tokens are correct
- **JSON configuration error** — Validate the JSON and remove any trailing commas at the end of objects or arrays
- **MCP is missing from the options** — Update Cursor to the latest version (0.40+), which has full MCP support

## Related links

- [Official Cursor documentation](https://cursor.sh/docs)
- [How to get APIBrasil tokens](https://doc.apibrasil.io/login)
- [VS Code integration](https://doc.apibrasil.io/mcp/ide-editores/vscode.md)
- [MCP protocol documentation](https://modelcontextprotocol.io)

## See also

- MCP guide: [MCP guide](https://doc.apibrasil.io/mcp.md)
- Documentation index: https://doc.apibrasil.io/llms.txt
- HTML version of this page: https://doc.apibrasil.io/mcp/ide-editores/cursor
