Vercel MCP Memory
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Vercel MCP MemoryRemember that my favorite color is blue."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Vercel MCP Memory
Custom Model Context Protocol (MCP) memory server deployed on Vercel with semantic search powered by OpenAI embeddings and PostgreSQL pgvector.
โจ Features
๐ง Semantic Search - Find memories by meaning, not just keywords
๐ Secure API - Optional API key authentication for production
โ๏ธ Cloud-Hosted - Deployed on Vercel Edge Functions (zero-infrastructure)
๐ Cross-Device Sync - Access your memory from any device with Claude
๐ OpenAI Embeddings - Using text-embedding-3-small model
๐๏ธ PostgreSQL + pgvector - Efficient vector similarity search
โ Input Validation - Zod schemas for robust data validation
๐ Structured Logging - Production-ready error tracking
๐ Multi-language - Supports Russian, English and more
๐ค Claude Code Integration - Automated PR reviews and AI assistant via GitHub Actions
Related MCP server: MCP Memory Server
๐๏ธ Architecture
Claude Desktop โ HTTPS/JSON-RPC โ Vercel Edge Function โ Postgres (pgvector)
โ
OpenAI Embeddings API๐ Prerequisites
Node.js 20.x
Vercel account (free tier works)
OpenAI API key (for embeddings, ~$0.10/1M tokens)
PostgreSQL database with pgvector extension (Vercel Postgres or Neon)
๐ Quick Start
1. Install Dependencies
cd vercel-mcp-memory
npm install2. Set Up Vercel Postgres
# Install Vercel CLI
npm i -g vercel
# Login to Vercel
vercel login
# Link project
vercel link
# Create Postgres database (via Vercel Dashboard)
# 1. Go to https://vercel.com/dashboard
# 2. Navigate to Storage โ Create Database โ Postgres
# 3. Name: mcp-memory-db
# 4. Region: Select closest to you3. Configure Environment Variables
Create .env.local file:
# Required: OpenAI API key for embeddings
OPENAI_API_KEY=sk-...
# Required: PostgreSQL connection (auto-configured by Vercel)
POSTGRES_URL=postgresql://...
# Optional: API keys for authentication (comma-separated)
# Leave empty for development without auth
MCP_API_KEYS=your-secret-key-1,your-secret-key-2Generate secure API keys:
# Generate a secure API key
openssl rand -base64 324. Run Database Migration
Apply the SQL schema with pgvector extension:
# Option 1: Via Vercel Dashboard
# 1. Go to Storage โ mcp-memory-db โ SQL Editor
# 2. Copy contents of migrations/001_init.sql
# 3. Execute
# Option 2: Via psql (if you have local connection)
psql $POSTGRES_URL < migrations/001_init.sql5. Deploy to Vercel
vercel --prodYour MCP server will be available at: https://your-project.vercel.app
6. Configure Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or ~/.config/claude-desktop/claude_desktop_config.json (Linux):
With authentication (recommended for production):
{
"mcpServers": {
"vercel-memory": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://your-project.vercel.app/api/mcp/sse"
],
"env": {
"MCP_API_KEY": "your-secret-key-here"
}
}
}
}Without authentication (development only):
{
"mcpServers": {
"vercel-memory": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://your-project.vercel.app/api/mcp/sse"
]
}
}
}Restart Claude Desktop.
๐งช Testing
Health Check
curl https://your-project.vercel.app/api/healthShould return:
{
"status": "healthy",
"service": "vercel-mcp-memory",
"database": {
"connected": true
}
}Test MCP Endpoint with Authentication
curl -X POST https://your-project.vercel.app/api/mcp/sse \
-H "Content-Type: application/json" \
-H "X-API-Key: your-secret-key" \
-d '{
"jsonrpc": "2.0",
"method": "tools/list",
"id": 1
}'Test in Claude
User: Remember: I prefer Python for backend development
Claude: [Uses add_memory tool]
User: What programming languages do I prefer?
Claude: [Uses search_memory tool and finds "Python"]๐ MCP Tools
add_memory
Store new memory with semantic embeddings.
{
content: string, // Required (1-10000 chars)
category?: string, // Optional (max 100 chars)
metadata?: object // Optional custom key-value pairs
}search_memory
Semantic search across memories.
{
query: string, // Required: natural language query (1-1000 chars)
category?: string, // Filter by category
limit?: number, // Max results (default: 10, max: 50)
threshold?: number // Min similarity 0-1 (default: 0.5)
}list_memories
List all memories chronologically.
{
category?: string, // Filter by category
limit?: number, // Max results (default: 50, max: 100)
offset?: number // Pagination offset (default: 0)
}delete_memory
Delete specific memory by UUID.
{
id: string // UUID of memory (validated)
}memory_stats
Get statistics about stored memories.
{} // No parameters๐ Project Structure
vercel-mcp-memory/
โโโ app/
โ โโโ api/
โ โ โโโ health/route.ts # Health check endpoint
โ โ โโโ mcp/sse/route.ts # MCP JSON-RPC endpoint
โ โโโ layout.tsx # Next.js layout
โ โโโ page.tsx # Landing page
โโโ lib/
โ โโโ auth.ts # API authentication
โ โโโ db.ts # Postgres + pgvector queries
โ โโโ embeddings.ts # OpenAI embeddings client
โ โโโ logger.ts # Structured logging
โ โโโ mcp-handlers.ts # Centralized tool handlers
โ โโโ mcp-server.ts # MCP SDK integration
โ โโโ types.ts # TypeScript definitions
โ โโโ validation.ts # Zod input validation
โโโ migrations/
โ โโโ 001_init.sql # Database schema
โโโ scripts/
โ โโโ insert-test-data.ts # Test data seeding
โ โโโ migrate-old-data.ts # Legacy data migration
โโโ .env.example # Environment variables template
โโโ .eslintrc.json # ESLint configuration
โโโ .gitignore # Git ignore rules
โโโ SECURITY.md # Security guidelines
โโโ next.config.js # Next.js configuration
โโโ package.json # Dependencies
โโโ tsconfig.json # TypeScript configuration
โโโ vercel.json # Vercel deployment config๐ง Development
# Run locally
npm run dev
# Build for production
npm run build
# Lint code
npm run lint
# Migrate old data
npm run migrate๐ Security
See SECURITY.md for security best practices.
Important:
Never commit
.env.localor.env.productionfilesRotate API keys regularly
Enable
MCP_API_KEYSauthentication in productionMonitor API usage to prevent quota exhaustion
Review SECURITY.md before deploying
๐ฐ Cost Estimation
Vercel Free Tier (sufficient for personal use):
โ Functions: 100 GB-hours/month
โ Postgres: 256 MB storage
โ Bandwidth: 100 GB
After free tier:
Postgres: ~$0.20/GB/month
OpenAI Embeddings:
$0.10/1M tokens ($0.02/month for typical usage)Functions: ~$40/100 GB-hours
Expected cost: $0-5/month for moderate personal use.
๐ Troubleshooting
Claude can't connect
Check health endpoint:
curl https://your-project.vercel.app/api/healthVerify API key matches in both Vercel env and Claude config
Check Vercel deployment:
vercel lsVerify Claude config path is correct
Restart Claude Desktop
Authentication errors
Verify
MCP_API_KEYSis set in Vercel environment variablesCheck API key format (no extra spaces or newlines)
Ensure Claude config includes
MCP_API_KEYin env sectionTry without authentication first (remove
MCP_API_KEYSfrom Vercel env)
Database errors
Verify pgvector extension is enabled:
SELECT * FROM pg_extension WHERE extname = 'vector';Check table exists:
\dt memoriesView connection logs in Vercel Dashboard โ Functions โ Logs
Embedding errors
Verify OpenAI API key is set:
vercel env lsCheck API key has sufficient credits
Monitor usage: https://platform.openai.com/usage
๐ Resources
๐ค Claude Code Integration
This repository uses Claude Code via GitHub Actions for automated code reviews and AI assistance.
Automated PR Reviews
Every pull request automatically receives a comprehensive code review from Claude, focusing on:
Code quality and best practices
Potential bugs and security issues
Performance considerations
Test coverage
Interactive AI Assistant
Mention @claude in any issue or PR comment to get help:
@claude Please review the security implications of these auth changes.
@claude Help me fix the TypeScript errors in lib/db.ts.
@claude Update CLAUDE.md to reflect the new architecture.For detailed setup and troubleshooting, see .github/CLAUDE_CODE_SETUP.md.
๐ License
MIT
๐ค Contributing
Contributions are welcome! Please read our Contributing Guidelines and Code of Conduct first.
Quick steps:
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
For questions or support, see SUPPORT.md.
๐ Acknowledgments
Built with:
Vercel - Hosting and Postgres
Next.js - React framework
OpenAI - Embeddings API
MCP SDK - Protocol implementation
pgvector - Vector similarity search
Made with โค๏ธ using Vercel, Next.js, and Claude Code
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/evgenygurin/vercel-mcp-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server