Skip to main content

Cursor setup

Foundry’s MCP server exposes Memory and Security tools inside Cursor. Once configured, the AI can read/write memory and run security scans from the IDE.

Install the MCP server

The server is the npm package @withfoundry/mcp-server. Cursor loads it via its MCP settings.

Configure Cursor

  1. Open Cursor settings and go to Features → MCP (or edit the MCP config file directly).
  2. Add a new server entry for Foundry.
Config file location (typical):
  • macOS: ~/.cursor/mcp.json
  • Windows: %USERPROFILE%\.cursor\mcp.json
Add this block:
{
  "mcpServers": {
    "foundry": {
      "command": "npx",
      "args": ["-y", "@withfoundry/mcp-server"],
      "env": {
        "FOUNDRY_API_KEY": "key_your_api_key_here"
      }
    }
  }
}
Replace key_your_api_key_here with your real API key from the Foundry dashboard. Avoid hardcoding the key in the config. Use an env file or system env:
{
  "mcpServers": {
    "foundry": {
      "command": "npx",
      "args": ["-y", "@withfoundry/mcp-server"],
      "env": {
        "FOUNDRY_API_KEY": "${FOUNDRY_API_KEY}"
      }
    }
  }
}
Then set FOUNDRY_API_KEY in your shell or in Cursor’s environment. If your config doesn’t support ${...}, set the variable in your profile (e.g. ~/.zshrc) and restart Cursor so it inherits it.

Verify

  1. Restart Cursor (or reload the window).
  2. Start a chat and check that Foundry tools are available (e.g. “foundry_memory_search”, “foundry_memory_write”).
  3. Try: “Search my Foundry memory for authentication” or “Write to Foundry memory: we use Bearer API keys.”

What you get

AreaTools
MemoryWrite entries, search, get context for prompts.
SecurityStart repo scan, get scan results.
Details: Tools reference. Next: Tools reference for parameters and behavior.