EnvMem
Personal environment variable memory with semantic search and project management. Enables storing, searching, and retrieving environment variables via MCP, supporting project organization and auto-fill of .env files.
README
EnvMem

Your Environment Variables, Always at Hand
Personal environment variable memory with semantic search and project management. Multi-tenant MCP server that remembers all your API keys, secrets, and configurations.
Live: envmem.com | NPM: npmjs.com/package/envmem

Features
- Semantic Search - Natural language queries powered by Cloudflare Vectorize
- Project Management - Organize envs by project with dev/staging/prod environments
- Auto-Fill .env - Parse .env.example and fill with your stored values
- Multi-Tenant Isolation - Each API key gets completely isolated storage
- MCP Protocol - Works with Claude, ChatGPT, and any MCP-compatible AI
- Service Bundles - Get all env vars for Stripe + Supabase + OpenAI in one query
- Edge-Native - Sub-50ms responses from 300+ global locations
🚀 Quick Start & MCP Configuration
EnvMem is designed to work seamlessly with any MCP-compatible client (like Claude Desktop, Cursor, or your own tools).
Option 1: Claude Desktop (Recommended)
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"envmem": {
"command": "npx",
"args": ["-y", "envmem"],
"env": {
"ENVMEM_API_KEY": "your-secret-api-key"
}
}
}
}
Note: Generate your API key at envmem.com or use any random string (it acts as your personal partition).
Option 2: Remote MCP (No Node.js required)
If your MCP client supports remote URLs (SSE), you can connect directly without running anything locally:
{
"mcpServers": {
"envmem": {
"url": "https://envmem.com/mcp?apikey=your-secret-api-key"
}
}
}
Usage
1. Import Your Variables
import_env_variables({
envText: `
OPENAI_API_KEY=sk-...
STRIPE_SECRET_KEY=sk_live_...
DATABASE_URL=postgres://...
`
})
2. Create a Project
create_project({
name: "my-saas",
repoUrl: "github.com/me/my-saas",
tags: ["nextjs", "stripe", "supabase"]
})
3. Link Services to Project
link_services_to_project({
projectName: "my-saas",
services: ["Stripe", "Supabase", "OpenAI", "Clerk"]
})
4. Get Complete .env File
get_envs_for_project({
projectName: "my-saas",
environment: "prod"
})
// Returns ready-to-use .env file content
5. Auto-Fill from .env.example
fill_env_example({
envExampleContent: `OPENAI_API_KEY=\nSTRIPE_SECRET_KEY=\nDATABASE_URL=`,
projectName: "my-saas"
})
// Returns filled .env with your stored values
MCP Tools
Search & Retrieve
| Tool | Description |
|---|---|
search_env_variables |
Semantic + keyword search |
get_env_by_name |
Get by exact name |
get_envs_for_services |
Get all vars for services |
list_env_categories |
List categories with counts |
Import & Manage
| Tool | Description |
|---|---|
import_env_variables |
Bulk import from .env text |
add_env_variable |
Add single variable |
delete_env_variable |
Delete by name |
clear_all_env_variables |
Delete all (requires confirm) |
Project Management
| Tool | Description |
|---|---|
create_project |
Create project with repo URL + tags |
list_projects |
List all your projects |
link_env_to_project |
Link env to project (dev/staging/prod) |
link_services_to_project |
Bulk link services to project |
get_envs_for_project |
Get .env file for project |
fill_env_example |
Auto-fill .env.example |
delete_project |
Delete project + links |
Typical Workflow
// 1. Import your envs once
import_env_variables({ envText: "..." })
// 2. Create project
create_project({ name: "autoclient", repoUrl: "github.com/me/autoclient" })
// 3. Link services
link_services_to_project({
projectName: "autoclient",
services: ["Stripe", "Supabase", "OpenAI"]
})
// 4. Get .env for deployment
get_envs_for_project({ projectName: "autoclient", environment: "prod" })
Categories
| Category | Examples |
|---|---|
ai_services |
OpenAI, Anthropic, Google AI |
database |
Supabase, PlanetScale, MongoDB |
payment |
Stripe, PayPal, SumUp |
auth |
Auth0, Clerk, Firebase |
email |
SendGrid, Mailjet, Resend |
deployment |
Vercel, Netlify, Railway |
storage |
S3, Cloudflare R2, Cloudinary |
monitoring |
Sentry, Datadog |
Authentication
Your API key creates isolated storage. Generate one:
openssl rand -hex 16
Pass via:
- Header:
x-api-key: your-key - Bearer:
Authorization: Bearer your-key - Query:
?apikey=your-key
Self-Hosting
git clone https://github.com/samihalawa/envmem-mcp.git
cd envmem-mcp
npm install
# Create Cloudflare resources
wrangler d1 create env-reference-db
wrangler vectorize create env-embeddings --dimensions=768 --metric=cosine
# Apply migrations
wrangler d1 migrations apply env-reference-db --remote
# Deploy
wrangler deploy
Tech Stack
- Runtime: Cloudflare Workers
- Embeddings: Workers AI (bge-base-en-v1.5, 768-dim)
- Vector Search: Cloudflare Vectorize
- Database: Cloudflare D1 (SQLite + FTS5)
- Protocol: MCP (Model Context Protocol)
License
ISC
Built with care for developers who forget their env var names.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。