Reference
MCP Tool Schemas
Zod schemas for memory-mcp tools: authenticate/get/save/list/search. Input/output tables/examples.
TL;DR: Zod-validated inputs. Auth -> GitHub token -> session. CRUD sessions/messages.
Table of Contents
authenticate authenticate.ts
Input:
| Param | Type | Req | Desc |
|---|---|---|---|
| github_token | string | opt | Direct token |
| oauth_code | string | opt | OAuth flow |
Output: {user_id, session_token, expires_at}
Example:
get-memory get-memory.ts
| Param | Type | Req | Desc |
|---|---|---|---|
| session_id | string | ✅ | Session |
| limit | number | opt | Paginate |
| offset | number | opt | Paginate |
Output: {session_id, messages[], metadata}
save-memory save-memory.ts
| Param | Type | Req | Desc |
|---|---|---|---|
| session_id | string | opt | Create/update |
| messages | LLMMessage[] | ✅ | History |
| metadata | object | opt | Extra |
Output: {session_id, saved_count, updated_at}
list-sessions list-sessions.ts
| Param | Type | Req | Desc |
|---|---|---|---|
| limit | number | opt=20 | Paginate |
| offset | number | opt=0 | Paginate |
| state | enum | opt | active/paused/completed |
Output: {sessions[], total}
search-memory search-memory.ts
| Param | Type | Req | Desc |
|---|---|---|---|
| query | string | ✅ | Search term |
| limit | number | opt=10 | Results |
| filter | object | opt | session/date |
Output: {results[]} w/ score/context
Auth Flow
Quiz: No token? -> ? A: Error: token required ✅
Use: Connect MCP -> use_mcp_tool('memory-mcp', 'authenticate', {...})
Related: Tables ->