MCP tools reference
The@withfoundry/mcp-server exposes these tools to Cursor (and other MCP clients). All calls use your configured FOUNDRY_API_KEY and the API base URL https://api.withfoundry.ai.
Memory tools
foundry_memory_write
Write one or more entries into a namespace.
Returns:
{ ids: string[] } — created entry ids.
Example (as used by Cursor):“Write to Foundry memory, namespace
my-app: ‘We use API keys with prefix key_ in the Authorization header.’”
foundry_memory_search
Semantic search over a namespace.
Returns: Array of
{ id, content, metadata, score? }.
Example:“Search Foundry memory in
my-app for ‘how do we authenticate?’”
foundry_memory_get_context
Get a single context string from semantic search for use in prompts.
Returns:
{ text: string, entryIds: string[] }.
Example:“Get Foundry context for namespace
my-app with query ‘user preferences and auth’, limit 3.”
Security tools
foundry_security_scan_repo
Start a security scan for a repository.
Returns:
- Without wait:
{ scanId, status }. - With wait:
{ scanId, status, findings }.
“Run a Foundry security scan on this repo” (Cursor may infer repo from workspace.)
foundry_security_get_scan_result
Get status and findings for a scan.
Returns:
{ scanId, status, findings?, error? }.
Example:“Get Foundry scan result for scan_abc123.”
Envelope and errors
The MCP server calls the REST API. API responses use the envelope:data (or a translated message) so Cursor can show or act on it.
Namespace tips in Cursor
- Use a stable namespace per project or user (e.g.
my-app,cursor-user-123). - Ask the AI to “search Foundry memory in namespace X for Y” so it uses the right namespace and query.