@withfoundry/mcp-server
v0.1.7
Published
MCP server that exposes Foundry project memory as tools and resources. Add it to Cursor, Claude Desktop, or any MCP-compatible client so your AI agent has access to project context.
Readme
Foundry MCP Server
MCP server that exposes Foundry project memory as tools and resources. Add it to Cursor, Claude Desktop, or any MCP-compatible client so your AI agent has access to project context.
Install
pnpm add -D @withfoundry/mcp-server
# or
npm install -D @withfoundry/mcp-serverCursor setup (under 60 seconds)
- Open Cursor Settings → MCP (or edit
~/.cursor/mcp.json). - Add the Foundry server:
{
"mcpServers": {
"foundry": {
"command": "npx",
"args": ["@withfoundry/mcp-server"],
"env": {
"FOUNDRY_API_KEY": "key_...",
"FOUNDRY_PROJECT_ID": "prj_..."
}
}
}
}- Restart Cursor. The foundry_memory_context tool will be available — use it before writing code so the agent gets project decisions, conventions, and security findings.
Environment variables
| Variable | Required | Description |
|----------|----------|-------------|
| FOUNDRY_API_KEY | Yes | Foundry API key (from dashboard) |
| FOUNDRY_PROJECT_ID | Yes | Project ID (e.g. prj_...) |
| FOUNDRY_API_URL | No | API base URL (default: https://api.withfoundry.ai) |
Tools
- foundry_memory_write — Write a memory item (decision, convention, component, security_finding).
- foundry_memory_search — Semantic search over project memory.
- foundry_memory_context — Get assembled context for a task (call this before generating code).
- foundry_memory_list — List recent memory items.
Resources
foundry://project/{projectId}/decisions— All decision memory items.foundry://project/{projectId}/conventions— All convention memory items.foundry://project/{projectId}/components— All component memory items.foundry://project/{projectId}/security— All security finding memory items.
Build
pnpm buildProduces dist/index.js. Run with:
node dist/index.js
# or
npx foundry-mcp