Skip to main content

Cursor Integration

Cursor is an AI-powered code editor built on VS Code with native support for the Model Context Protocol. It provides AI assistance through its Composer interface and chat panel.

Prerequisites

  • Cursor installed on your machine
  • Cognee MCP server running (see Quickstart or Local Setup)
  • OpenAI API key

Setup Steps

1

Open MCP Settings

  1. Launch Cursor
  2. Click the gear icon to open Settings
  3. Navigate to Tools & MCP
  4. Click + Add MCP Server
This opens the mcp.json configuration file.
2

Add Cognee Server Configuration

Choose the configuration that matches how you started the Cognee MCP server:
  • Docker (HTTP)
  • Local (stdio)
Use this if you started the server with Docker:
{
  "mcpServers": {
    "cognee": {
      "url": "http://localhost:8000/mcp"
    }
  }
}
This configuration tells Cursor to connect to the HTTP endpoint exposed by the Docker container.
Save the file after adding your configuration.
3

Verify Connection

Use the toggle in MCP Tools to refresh the connection. You should see a list of available tools from Cognee, confirming the server is connected.
4

Use Cognee Tools

  1. Open the Chat panel in Cursor
  2. Make sure Agent mode is selected
  3. Issue prompts that use Cognee tools
Example prompts:
  • “Add this file to memory using cognify”
  • “Search my code for authentication logic”
  • “Codify this repository”

Where to Use This Configuration

The mcp.json file is located in your Cursor settings directory. Cursor reads this file at startup and when you refresh the MCP connection. The configuration applies to all projects you open in Cursor.

Need Help?

Join Our Community

Get support and connect with other developers using Cognee MCP.