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
- Open Cursor settings and go to Features → MCP (or edit the MCP config file directly).
- Add a new server entry for Foundry.
- macOS:
~/.cursor/mcp.json - Windows:
%USERPROFILE%\.cursor\mcp.json
key_your_api_key_here with your real API key from the Foundry dashboard.
Using a local API key (recommended)
Avoid hardcoding the key in the config. Use an env file or system env: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
- Restart Cursor (or reload the window).
- Start a chat and check that Foundry tools are available (e.g. “foundry_memory_search”, “foundry_memory_write”).
- Try: “Search my Foundry memory for authentication” or “Write to Foundry memory: we use Bearer API keys.”
What you get
| Area | Tools |
|---|---|
| Memory | Write entries, search, get context for prompts. |
| Security | Start repo scan, get scan results. |