记住MCP服务器
多租户MCP服务器包装记住MCP与agentbase.me的平台JWT身份验证。
概述
此服务器包装 记住mcp 具有身份验证和多租户支持的服务器,使其能够在agentbase.me平台中使用。
特性
- 🔐 平台JWT身份验证
- 👥 具有每个用户内存隔离的多租户操作
- 🔄 通过平台API自动解析凭证
- 📦 容器化部署到Cloud Run
- ⚡ 缓存以提高性能
- 🏥 健康检查端点
建筑
Client (Platform JWT)
↓
Platform JWT Provider (validates JWT → userId)
↓
Platform Token Resolver (userId → credentials via platform API)
↓
Remember MCP Server (executes memory tools)
↓
User Storage (isolated per user)先决条件
- Node.js 20+
- npm或纱线
- Docker(用于容器化)
- Google Cloud帐户(用于部署)
- 访问agentbase.me平台
安装
- 克隆存储库
git clone https://github.com/prmichaelsen/remember-mcp-server.git
cd remember-mcp-server- 安装依赖项
npm install- 配置环境
cp .env.example .env
# Edit .env with your configuration用法
发展模式
npm run dev服务器将于启动 http://localhost:8080 启用热重新加载。
生产模式
npm run build
npm start测试
# Health check
curl http://localhost:8080/mcp/health
# List tools (requires Platform JWT)
curl -X POST http://localhost:8080/mcp/message \
-H "Authorization: Bearer
" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'配置
环境变量
| 变量 | 描述 | 必填 | 默认 |
|---|---|---|---|
PLATFORM_SERVICE_TOKEN | JWT验证的共享密钥 | 是 | - |
PLATFORM_URL | 平台API基础URL | 是 | - |
PORT | 服务器端口 | 编号 | 8080 |
NODE_ENV | 环境(开发/生产) | 否 | 开发 |
LOG_LEVEL | 日志记录级别 | 否 | 信息 |
平台集成
此服务器与agentbase.me平台集成:
- 认证:验证平台发布的JWT
- 凭证:从平台API获取用户凭据
- 存储:根据JWT中的userId隔离用户数据
发展
项目结构
remember-mcp-server/
├── src/
│ ├── index.ts # Main server
│ └── auth/
│ ├── platform-jwt-provider.ts # JWT authentication
│ └── platform-token-resolver.ts # Credential resolution
├── agent/ # Agent Context Protocol docs
├── package.json
├── tsconfig.json
├── Dockerfile
└── README.md构建过程
# Type check
npm run type-check
# Build
npm run build
# Output in dist/部署
码头工人
# Build image
docker build -t remember-mcp-server .
# Run container
docker run -p 8080:8080 \
-e PLATFORM_SERVICE_TOKEN=your-token \
-e PLATFORM_URL=https://agentbase.me \
remember-mcp-server谷歌云运行
# Build and push
docker build -t gcr.io/YOUR_PROJECT/remember-mcp-server .
docker push gcr.io/YOUR_PROJECT/remember-mcp-server
# Deploy
gcloud run deploy remember-mcp-server \
--image gcr.io/YOUR_PROJECT/remember-mcp-server \
--region us-central1 \
--allow-unauthenticated \
--set-env-vars="PLATFORM_URL=https://agentbase.me" \
--update-secrets=PLATFORM_SERVICE_TOKEN=platform-service-token:latest相关项目
- 记住mcp -基本MCP服务器
- mcp身份验证 -身份验证包装库
- agentbase.me -多租户MCP服务器平台
许可证
麻省理工学院
作者
帕特里克·迈克尔森(@普密恰尔森)
