recall-mcp-v3 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +85 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +75 -0
- package/dist/api.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +195 -0
- package/dist/index.js.map +1 -0
- package/dist/tools.d.ts +50 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +317 -0
- package/dist/tools.js.map +1 -0
- package/package.json +37 -0
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall API Client
|
|
3
|
+
*
|
|
4
|
+
* Simple HTTP client for the Recall v3 API.
|
|
5
|
+
* Reads token from RECALL_API_TOKEN environment variable.
|
|
6
|
+
*/
|
|
7
|
+
declare class RecallApiError extends Error {
|
|
8
|
+
code: string;
|
|
9
|
+
status: number;
|
|
10
|
+
constructor(message: string, code: string, status: number);
|
|
11
|
+
}
|
|
12
|
+
interface ResolveRepoResponse {
|
|
13
|
+
repoId: string;
|
|
14
|
+
teamId: string;
|
|
15
|
+
}
|
|
16
|
+
interface Session {
|
|
17
|
+
id: string;
|
|
18
|
+
summary: string;
|
|
19
|
+
status: 'complete' | 'in-progress' | 'blocked';
|
|
20
|
+
started_at: string;
|
|
21
|
+
ended_at: string;
|
|
22
|
+
decisions?: string[];
|
|
23
|
+
mistakes?: string[];
|
|
24
|
+
tags?: string[];
|
|
25
|
+
files_changed?: string[];
|
|
26
|
+
blockers?: string | null;
|
|
27
|
+
next_steps?: string | null;
|
|
28
|
+
user: {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string | null;
|
|
31
|
+
github_username: string | null;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
interface ContextResponse {
|
|
35
|
+
sessions: Session[];
|
|
36
|
+
cached_context: string;
|
|
37
|
+
session_count: number;
|
|
38
|
+
tier: string;
|
|
39
|
+
}
|
|
40
|
+
interface HistoryResponse {
|
|
41
|
+
sessions: Session[];
|
|
42
|
+
decisions: Array<{
|
|
43
|
+
id: string;
|
|
44
|
+
decision: string;
|
|
45
|
+
reasoning: string;
|
|
46
|
+
created_at: string;
|
|
47
|
+
user: {
|
|
48
|
+
id: string;
|
|
49
|
+
name: string | null;
|
|
50
|
+
github_username: string | null;
|
|
51
|
+
};
|
|
52
|
+
}>;
|
|
53
|
+
mistakes: Array<{
|
|
54
|
+
id: string;
|
|
55
|
+
content: string;
|
|
56
|
+
created_at: string;
|
|
57
|
+
}>;
|
|
58
|
+
}
|
|
59
|
+
interface SaveSessionResponse {
|
|
60
|
+
id: string;
|
|
61
|
+
created_at: string;
|
|
62
|
+
}
|
|
63
|
+
interface LogDecisionResponse {
|
|
64
|
+
id: string;
|
|
65
|
+
created_at: string;
|
|
66
|
+
}
|
|
67
|
+
export declare function resolveRepo(fullName: string, defaultBranch?: string): Promise<ResolveRepoResponse>;
|
|
68
|
+
export declare function getContext(repoId: string): Promise<ContextResponse>;
|
|
69
|
+
export declare function getHistory(repoId: string, days?: number): Promise<HistoryResponse>;
|
|
70
|
+
export declare function getTranscripts(repoId: string): Promise<HistoryResponse>;
|
|
71
|
+
export declare function saveSession(repoId: string, data: {
|
|
72
|
+
summary: string;
|
|
73
|
+
status?: 'complete' | 'in-progress' | 'blocked';
|
|
74
|
+
decisions?: Array<{
|
|
75
|
+
what: string;
|
|
76
|
+
why: string;
|
|
77
|
+
}>;
|
|
78
|
+
mistakes?: string[];
|
|
79
|
+
files_changed?: string[];
|
|
80
|
+
next_steps?: string;
|
|
81
|
+
blockers?: string;
|
|
82
|
+
}): Promise<SaveSessionResponse>;
|
|
83
|
+
export declare function logDecision(repoId: string, decision: string, reasoning: string): Promise<LogDecisionResponse>;
|
|
84
|
+
export { RecallApiError };
|
|
85
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
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a,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GACA,OAAO,CAAC,mBAAmB,CAAC,CAY9B;AAED,wBAAsB,WAAW,CAC/B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,mBAAmB,CAAC,CAK9B;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/api.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall API Client
|
|
3
|
+
*
|
|
4
|
+
* Simple HTTP client for the Recall v3 API.
|
|
5
|
+
* Reads token from RECALL_API_TOKEN environment variable.
|
|
6
|
+
*/
|
|
7
|
+
const API_URL = process.env.RECALL_API_URL || 'https://api-v3.recall.team';
|
|
8
|
+
class RecallApiError extends Error {
|
|
9
|
+
code;
|
|
10
|
+
status;
|
|
11
|
+
constructor(message, code, status) {
|
|
12
|
+
super(message);
|
|
13
|
+
this.code = code;
|
|
14
|
+
this.status = status;
|
|
15
|
+
this.name = 'RecallApiError';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function getToken() {
|
|
19
|
+
const token = process.env.RECALL_API_TOKEN;
|
|
20
|
+
if (!token) {
|
|
21
|
+
throw new RecallApiError('RECALL_API_TOKEN environment variable not set', 'NO_TOKEN', 401);
|
|
22
|
+
}
|
|
23
|
+
return token;
|
|
24
|
+
}
|
|
25
|
+
async function request(method, path, body) {
|
|
26
|
+
const token = getToken();
|
|
27
|
+
const url = `${API_URL}${path}`;
|
|
28
|
+
const response = await fetch(url, {
|
|
29
|
+
method,
|
|
30
|
+
headers: {
|
|
31
|
+
'Content-Type': 'application/json',
|
|
32
|
+
'Authorization': `Bearer ${token}`,
|
|
33
|
+
},
|
|
34
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
35
|
+
});
|
|
36
|
+
if (!response.ok) {
|
|
37
|
+
const errorBody = await response.json().catch(() => ({}));
|
|
38
|
+
throw new RecallApiError(errorBody.error || `HTTP ${response.status}`, errorBody.code || 'API_ERROR', response.status);
|
|
39
|
+
}
|
|
40
|
+
return response.json();
|
|
41
|
+
}
|
|
42
|
+
// API Methods
|
|
43
|
+
export async function resolveRepo(fullName, defaultBranch) {
|
|
44
|
+
return request('POST', '/v1/repos/resolve', { fullName, defaultBranch });
|
|
45
|
+
}
|
|
46
|
+
export async function getContext(repoId) {
|
|
47
|
+
return request('GET', `/v1/repos/${repoId}/context`);
|
|
48
|
+
}
|
|
49
|
+
export async function getHistory(repoId, days = 30) {
|
|
50
|
+
return request('GET', `/v1/repos/${repoId}/history?days=${days}`);
|
|
51
|
+
}
|
|
52
|
+
export async function getTranscripts(repoId) {
|
|
53
|
+
return request('GET', `/v1/repos/${repoId}/transcripts`);
|
|
54
|
+
}
|
|
55
|
+
export async function saveSession(repoId, data) {
|
|
56
|
+
return request('POST', `/v1/repos/${repoId}/sessions`, {
|
|
57
|
+
summary: data.summary,
|
|
58
|
+
status: data.status || 'complete',
|
|
59
|
+
decisions: data.decisions,
|
|
60
|
+
mistakes: data.mistakes,
|
|
61
|
+
files_changed: data.files_changed,
|
|
62
|
+
next_steps: data.next_steps,
|
|
63
|
+
blockers: data.blockers,
|
|
64
|
+
started_at: new Date().toISOString(),
|
|
65
|
+
ended_at: new Date().toISOString(),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
export async function logDecision(repoId, decision, reasoning) {
|
|
69
|
+
return request('POST', `/v1/repos/${repoId}/decisions`, {
|
|
70
|
+
decision,
|
|
71
|
+
reasoning,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export { RecallApiError };
|
|
75
|
+
//# sourceMappingURL=api.js.map
|
package/dist/api.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"A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QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACnC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAAc,EACd,QAAgB,EAChB,SAAiB;IAEjB,OAAO,OAAO,CAAsB,MAAM,EAAE,aAAa,MAAM,YAAY,EAAE;QAC3E,QAAQ;QACR,SAAS;KACV,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Recall MCP Server v3
|
|
4
|
+
*
|
|
5
|
+
* A clean, simple MCP server for team memory in AI coding assistants.
|
|
6
|
+
* Reads RECALL_API_TOKEN from environment variable (set by Claude Code).
|
|
7
|
+
*/
|
|
8
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
9
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
10
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
11
|
+
import { getContext, getHistory, getTranscripts, saveSession, logDecision, } from './tools.js';
|
|
12
|
+
// Tool definitions
|
|
13
|
+
const TOOLS = [
|
|
14
|
+
{
|
|
15
|
+
name: 'recall_get_context',
|
|
16
|
+
description: 'Get team brain (context) for the current repository. Call this at the start of every session to load team memory.',
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {
|
|
20
|
+
projectPath: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Optional: path to the project root. If not provided, uses current working directory.',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'recall_get_history',
|
|
29
|
+
description: 'Get detailed session history. Includes more context than recall_get_context but uses more tokens.',
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: {
|
|
33
|
+
projectPath: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Path to the project root. REQUIRED to ensure correct repo context.',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
required: ['projectPath'],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'recall_get_transcripts',
|
|
43
|
+
description: 'Get full session transcripts. WARNING: Can be very large. Only use when you need complete historical details.',
|
|
44
|
+
inputSchema: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
projectPath: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'Path to the project root. REQUIRED to ensure correct repo context.',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
required: ['projectPath'],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'recall_save_session',
|
|
57
|
+
description: 'Save a summary of what was accomplished in this coding session. Call this at the end of a session.',
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: 'object',
|
|
60
|
+
properties: {
|
|
61
|
+
summary: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'What was accomplished in this session - list all items worked on, kept concise.',
|
|
64
|
+
},
|
|
65
|
+
decisions: {
|
|
66
|
+
type: 'array',
|
|
67
|
+
description: 'Key decisions made during this session',
|
|
68
|
+
items: {
|
|
69
|
+
type: 'object',
|
|
70
|
+
properties: {
|
|
71
|
+
what: { type: 'string', description: 'What was decided' },
|
|
72
|
+
why: { type: 'string', description: 'Why this decision was made' },
|
|
73
|
+
},
|
|
74
|
+
required: ['what', 'why'],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
mistakes: {
|
|
78
|
+
type: 'array',
|
|
79
|
+
description: 'Mistakes or gotchas discovered that the team should not repeat',
|
|
80
|
+
items: { type: 'string' },
|
|
81
|
+
},
|
|
82
|
+
filesChanged: {
|
|
83
|
+
type: 'array',
|
|
84
|
+
description: 'Files that were modified',
|
|
85
|
+
items: { type: 'string' },
|
|
86
|
+
},
|
|
87
|
+
nextSteps: {
|
|
88
|
+
type: 'string',
|
|
89
|
+
description: 'What should be done next',
|
|
90
|
+
},
|
|
91
|
+
blockers: {
|
|
92
|
+
type: 'string',
|
|
93
|
+
description: 'Any blockers encountered',
|
|
94
|
+
},
|
|
95
|
+
projectPath: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
description: 'Optional: path to the project root.',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
required: ['summary'],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'recall_log_decision',
|
|
105
|
+
description: 'Log an important decision made during coding. Quick way to capture why something was done.',
|
|
106
|
+
inputSchema: {
|
|
107
|
+
type: 'object',
|
|
108
|
+
properties: {
|
|
109
|
+
decision: {
|
|
110
|
+
type: 'string',
|
|
111
|
+
description: 'What was decided',
|
|
112
|
+
},
|
|
113
|
+
reasoning: {
|
|
114
|
+
type: 'string',
|
|
115
|
+
description: 'Why this decision was made',
|
|
116
|
+
},
|
|
117
|
+
projectPath: {
|
|
118
|
+
type: 'string',
|
|
119
|
+
description: 'Optional: path to the project root.',
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
required: ['decision', 'reasoning'],
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
];
|
|
126
|
+
class RecallServer {
|
|
127
|
+
server;
|
|
128
|
+
constructor() {
|
|
129
|
+
this.server = new Server({
|
|
130
|
+
name: 'recall-mcp',
|
|
131
|
+
version: '3.0.0',
|
|
132
|
+
}, {
|
|
133
|
+
capabilities: {
|
|
134
|
+
tools: {},
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
this.setupHandlers();
|
|
138
|
+
}
|
|
139
|
+
setupHandlers() {
|
|
140
|
+
// List available tools
|
|
141
|
+
this.server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
142
|
+
return { tools: TOOLS };
|
|
143
|
+
});
|
|
144
|
+
// Handle tool calls
|
|
145
|
+
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
146
|
+
const { name, arguments: args = {} } = request.params;
|
|
147
|
+
try {
|
|
148
|
+
let result;
|
|
149
|
+
switch (name) {
|
|
150
|
+
case 'recall_get_context':
|
|
151
|
+
result = await getContext(args);
|
|
152
|
+
break;
|
|
153
|
+
case 'recall_get_history':
|
|
154
|
+
result = await getHistory(args);
|
|
155
|
+
break;
|
|
156
|
+
case 'recall_get_transcripts':
|
|
157
|
+
result = await getTranscripts(args);
|
|
158
|
+
break;
|
|
159
|
+
case 'recall_save_session':
|
|
160
|
+
result = await saveSession(args);
|
|
161
|
+
break;
|
|
162
|
+
case 'recall_log_decision':
|
|
163
|
+
result = await logDecision(args);
|
|
164
|
+
break;
|
|
165
|
+
default:
|
|
166
|
+
return {
|
|
167
|
+
content: [{ type: 'text', text: `Unknown tool: ${name}` }],
|
|
168
|
+
isError: true,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
content: result.content.map((c) => ({ type: 'text', text: c.text })),
|
|
173
|
+
isError: result.isError,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
178
|
+
return {
|
|
179
|
+
content: [{ type: 'text', text: `Error: ${message}` }],
|
|
180
|
+
isError: true,
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
async run() {
|
|
186
|
+
const transport = new StdioServerTransport();
|
|
187
|
+
await this.server.connect(transport);
|
|
188
|
+
// Log to stderr so it doesn't interfere with stdio protocol
|
|
189
|
+
console.error('Recall MCP v3 server running');
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
// Start server
|
|
193
|
+
const server = new RecallServer();
|
|
194
|
+
server.run().catch(console.error);
|
|
195
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAEvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACL,UAAU,EACV,UAAU,EACV,cAAc,EACd,WAAW,EACX,WAAW,GAMZ,MAAM,YAAY,CAAC;AAEpB,mBAAmB;AACnB,MAAM,KAAK,GAAG;IACZ;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EACT,mHAAmH;QACrH,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,sFAAsF;iBACzF;aACF;SACF;KACF;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EACT,mGAAmG;QACrG,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,oEAAoE;iBACvE;aACF;YACD,QAAQ,EAAE,CAAC,aAAa,CAAC;SAC1B;KACF;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACT,+GAA+G;QACjH,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,oEAAoE;iBACvE;aACF;YACD,QAAQ,EAAE,CAAC,aAAa,CAAC;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,IAAI,YAAY,EAAE,CAAC;AAClC,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
package/dist/tools.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall MCP Tools
|
|
3
|
+
*
|
|
4
|
+
* Implements all 5 Recall tools:
|
|
5
|
+
* - recall_get_context: Get team brain for session start
|
|
6
|
+
* - recall_get_history: Get detailed session history
|
|
7
|
+
* - recall_get_transcripts: Get full transcripts (Pro)
|
|
8
|
+
* - recall_save_session: Save session summary
|
|
9
|
+
* - recall_log_decision: Log a decision
|
|
10
|
+
*/
|
|
11
|
+
interface ToolResponse {
|
|
12
|
+
content: Array<{
|
|
13
|
+
type: 'text';
|
|
14
|
+
text: string;
|
|
15
|
+
}>;
|
|
16
|
+
isError: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface GetContextArgs {
|
|
19
|
+
projectPath?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function getContext(args: GetContextArgs): Promise<ToolResponse>;
|
|
22
|
+
export interface GetHistoryArgs {
|
|
23
|
+
projectPath: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function getHistory(args: GetHistoryArgs): Promise<ToolResponse>;
|
|
26
|
+
export interface GetTranscriptsArgs {
|
|
27
|
+
projectPath: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function getTranscripts(args: GetTranscriptsArgs): Promise<ToolResponse>;
|
|
30
|
+
export interface SaveSessionArgs {
|
|
31
|
+
summary: string;
|
|
32
|
+
decisions?: Array<{
|
|
33
|
+
what: string;
|
|
34
|
+
why: string;
|
|
35
|
+
}>;
|
|
36
|
+
mistakes?: string[];
|
|
37
|
+
filesChanged?: string[];
|
|
38
|
+
nextSteps?: string;
|
|
39
|
+
blockers?: string;
|
|
40
|
+
projectPath?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function saveSession(args: SaveSessionArgs): Promise<ToolResponse>;
|
|
43
|
+
export interface LogDecisionArgs {
|
|
44
|
+
decision: string;
|
|
45
|
+
reasoning: string;
|
|
46
|
+
projectPath?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare function logDecision(args: LogDecisionArgs): Promise<ToolResponse>;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,UAAU,YAAY;IACpB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,EAAE,OAAO,CAAC;CAClB;AA2ED,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAyE5E;AAMD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAkG5E;AAMD,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CAgDpF;AAMD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,CAAC,CAsC9E;AAMD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,CAAC,CA8B9E"}
|
package/dist/tools.js
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall MCP Tools
|
|
3
|
+
*
|
|
4
|
+
* Implements all 5 Recall tools:
|
|
5
|
+
* - recall_get_context: Get team brain for session start
|
|
6
|
+
* - recall_get_history: Get detailed session history
|
|
7
|
+
* - recall_get_transcripts: Get full transcripts (Pro)
|
|
8
|
+
* - recall_save_session: Save session summary
|
|
9
|
+
* - recall_log_decision: Log a decision
|
|
10
|
+
*/
|
|
11
|
+
import { execSync } from 'child_process';
|
|
12
|
+
import * as api from './api.js';
|
|
13
|
+
function success(text) {
|
|
14
|
+
return {
|
|
15
|
+
content: [{ type: 'text', text }],
|
|
16
|
+
isError: false,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function error(text) {
|
|
20
|
+
return {
|
|
21
|
+
content: [{ type: 'text', text }],
|
|
22
|
+
isError: true,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get git repo info from the project path
|
|
27
|
+
*/
|
|
28
|
+
function getRepoInfo(projectPath) {
|
|
29
|
+
try {
|
|
30
|
+
// Get remote URL
|
|
31
|
+
const remoteUrl = execSync('git config --get remote.origin.url', {
|
|
32
|
+
cwd: projectPath,
|
|
33
|
+
encoding: 'utf-8',
|
|
34
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
35
|
+
}).trim();
|
|
36
|
+
// Parse GitHub URL to get owner/repo
|
|
37
|
+
let fullName;
|
|
38
|
+
if (remoteUrl.includes('github.com')) {
|
|
39
|
+
// SSH: git@github.com:owner/repo.git
|
|
40
|
+
// HTTPS: https://github.com/owner/repo.git
|
|
41
|
+
const match = remoteUrl.match(/github\.com[:/]([^/]+\/[^/]+?)(?:\.git)?$/);
|
|
42
|
+
if (match) {
|
|
43
|
+
fullName = match[1];
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
// Get default branch
|
|
53
|
+
let defaultBranch = 'main';
|
|
54
|
+
try {
|
|
55
|
+
const branch = execSync('git rev-parse --abbrev-ref HEAD', {
|
|
56
|
+
cwd: projectPath,
|
|
57
|
+
encoding: 'utf-8',
|
|
58
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
59
|
+
}).trim();
|
|
60
|
+
if (branch) {
|
|
61
|
+
defaultBranch = branch;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
// Use default
|
|
66
|
+
}
|
|
67
|
+
return { fullName, defaultBranch };
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Get the project path from args or use cwd
|
|
75
|
+
*/
|
|
76
|
+
function resolveProjectPath(argPath) {
|
|
77
|
+
return argPath || process.cwd();
|
|
78
|
+
}
|
|
79
|
+
export async function getContext(args) {
|
|
80
|
+
try {
|
|
81
|
+
const projectPath = resolveProjectPath(args.projectPath);
|
|
82
|
+
const repoInfo = getRepoInfo(projectPath);
|
|
83
|
+
if (!repoInfo) {
|
|
84
|
+
return error(`Could not determine repository info for: ${projectPath}\n` +
|
|
85
|
+
'Make sure this is a git repository with a GitHub remote origin.');
|
|
86
|
+
}
|
|
87
|
+
const { repoId } = await api.resolveRepo(repoInfo.fullName, repoInfo.defaultBranch);
|
|
88
|
+
const context = await api.getContext(repoId);
|
|
89
|
+
// Build context markdown
|
|
90
|
+
const lines = [];
|
|
91
|
+
lines.push(`# Team Memory - ${repoInfo.fullName}`);
|
|
92
|
+
lines.push('');
|
|
93
|
+
lines.push(`Sessions: ${context.session_count} | Tier: ${context.tier}`);
|
|
94
|
+
lines.push('');
|
|
95
|
+
if (context.sessions.length === 0) {
|
|
96
|
+
lines.push('No sessions recorded yet. Use `recall_save_session` to save your first session.');
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
lines.push('## Recent Sessions');
|
|
100
|
+
lines.push('');
|
|
101
|
+
for (const session of context.sessions.slice(0, 10)) {
|
|
102
|
+
const date = session.started_at.split('T')[0];
|
|
103
|
+
const user = session.user.github_username || session.user.name || 'Unknown';
|
|
104
|
+
const statusIcon = session.status === 'blocked' ? '(BLOCKED)' : '';
|
|
105
|
+
lines.push(`### ${date} - ${user} ${statusIcon}`);
|
|
106
|
+
lines.push('');
|
|
107
|
+
lines.push(session.summary);
|
|
108
|
+
lines.push('');
|
|
109
|
+
if (session.decisions && session.decisions.length > 0) {
|
|
110
|
+
lines.push('**Decisions:**');
|
|
111
|
+
for (const d of session.decisions) {
|
|
112
|
+
lines.push(`- ${d}`);
|
|
113
|
+
}
|
|
114
|
+
lines.push('');
|
|
115
|
+
}
|
|
116
|
+
if (session.mistakes && session.mistakes.length > 0) {
|
|
117
|
+
lines.push('**Mistakes to avoid:**');
|
|
118
|
+
for (const m of session.mistakes) {
|
|
119
|
+
lines.push(`- ${m}`);
|
|
120
|
+
}
|
|
121
|
+
lines.push('');
|
|
122
|
+
}
|
|
123
|
+
lines.push('---');
|
|
124
|
+
lines.push('');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return success(lines.join('\n'));
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
if (err instanceof api.RecallApiError) {
|
|
131
|
+
if (err.status === 401) {
|
|
132
|
+
return error('Authentication failed. Your token may be invalid or expired.\n' +
|
|
133
|
+
'Get a new token from https://v3.recall.team/app/settings');
|
|
134
|
+
}
|
|
135
|
+
return error(`API Error: ${err.message}`);
|
|
136
|
+
}
|
|
137
|
+
const message = err instanceof Error ? err.message : 'Unknown error';
|
|
138
|
+
return error(message);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
export async function getHistory(args) {
|
|
142
|
+
try {
|
|
143
|
+
const projectPath = resolveProjectPath(args.projectPath);
|
|
144
|
+
const repoInfo = getRepoInfo(projectPath);
|
|
145
|
+
if (!repoInfo) {
|
|
146
|
+
return error(`Could not determine repository info for: ${projectPath}\n` +
|
|
147
|
+
'Make sure this is a git repository with a GitHub remote origin.');
|
|
148
|
+
}
|
|
149
|
+
const { repoId } = await api.resolveRepo(repoInfo.fullName, repoInfo.defaultBranch);
|
|
150
|
+
const history = await api.getHistory(repoId);
|
|
151
|
+
// Build history markdown
|
|
152
|
+
const lines = [];
|
|
153
|
+
lines.push(`# Session History - ${repoInfo.fullName}`);
|
|
154
|
+
lines.push('');
|
|
155
|
+
// Sessions
|
|
156
|
+
if (history.sessions.length > 0) {
|
|
157
|
+
lines.push('## Sessions');
|
|
158
|
+
lines.push('');
|
|
159
|
+
for (const session of history.sessions) {
|
|
160
|
+
const date = session.started_at.split('T')[0];
|
|
161
|
+
const user = session.user.github_username || session.user.name || 'Unknown';
|
|
162
|
+
lines.push(`### ${date} - ${user}`);
|
|
163
|
+
lines.push('');
|
|
164
|
+
lines.push(session.summary);
|
|
165
|
+
lines.push('');
|
|
166
|
+
if (session.files_changed && session.files_changed.length > 0) {
|
|
167
|
+
lines.push('**Files changed:** ' + session.files_changed.join(', '));
|
|
168
|
+
lines.push('');
|
|
169
|
+
}
|
|
170
|
+
if (session.next_steps) {
|
|
171
|
+
lines.push('**Next steps:** ' + session.next_steps);
|
|
172
|
+
lines.push('');
|
|
173
|
+
}
|
|
174
|
+
if (session.blockers) {
|
|
175
|
+
lines.push('**Blockers:** ' + session.blockers);
|
|
176
|
+
lines.push('');
|
|
177
|
+
}
|
|
178
|
+
lines.push('---');
|
|
179
|
+
lines.push('');
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
// Decisions
|
|
183
|
+
if (history.decisions.length > 0) {
|
|
184
|
+
lines.push('## Key Decisions');
|
|
185
|
+
lines.push('');
|
|
186
|
+
for (const decision of history.decisions) {
|
|
187
|
+
const date = decision.created_at.split('T')[0];
|
|
188
|
+
const user = decision.user.github_username || decision.user.name || 'Unknown';
|
|
189
|
+
lines.push(`### ${decision.decision}`);
|
|
190
|
+
lines.push(`*${date} by ${user}*`);
|
|
191
|
+
lines.push('');
|
|
192
|
+
lines.push(`**Why:** ${decision.reasoning}`);
|
|
193
|
+
lines.push('');
|
|
194
|
+
lines.push('---');
|
|
195
|
+
lines.push('');
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
// Mistakes
|
|
199
|
+
if (history.mistakes.length > 0) {
|
|
200
|
+
lines.push('## Mistakes to Avoid');
|
|
201
|
+
lines.push('');
|
|
202
|
+
for (const mistake of history.mistakes) {
|
|
203
|
+
lines.push(`- ${mistake.content}`);
|
|
204
|
+
}
|
|
205
|
+
lines.push('');
|
|
206
|
+
}
|
|
207
|
+
return success(lines.join('\n'));
|
|
208
|
+
}
|
|
209
|
+
catch (err) {
|
|
210
|
+
if (err instanceof api.RecallApiError) {
|
|
211
|
+
if (err.status === 401) {
|
|
212
|
+
return error('Authentication failed. Your token may be invalid or expired.\n' +
|
|
213
|
+
'Get a new token from https://v3.recall.team/app/settings');
|
|
214
|
+
}
|
|
215
|
+
return error(`API Error: ${err.message}`);
|
|
216
|
+
}
|
|
217
|
+
const message = err instanceof Error ? err.message : 'Unknown error';
|
|
218
|
+
return error(message);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
export async function getTranscripts(args) {
|
|
222
|
+
try {
|
|
223
|
+
const projectPath = resolveProjectPath(args.projectPath);
|
|
224
|
+
const repoInfo = getRepoInfo(projectPath);
|
|
225
|
+
if (!repoInfo) {
|
|
226
|
+
return error(`Could not determine repository info for: ${projectPath}\n` +
|
|
227
|
+
'Make sure this is a git repository with a GitHub remote origin.');
|
|
228
|
+
}
|
|
229
|
+
const { repoId } = await api.resolveRepo(repoInfo.fullName, repoInfo.defaultBranch);
|
|
230
|
+
const transcripts = await api.getTranscripts(repoId);
|
|
231
|
+
// Same format as history but with full content
|
|
232
|
+
const lines = [];
|
|
233
|
+
lines.push(`# Full Transcripts - ${repoInfo.fullName}`);
|
|
234
|
+
lines.push('');
|
|
235
|
+
lines.push('**WARNING:** This can be very large. Use recall_get_context or recall_get_history for lighter responses.');
|
|
236
|
+
lines.push('');
|
|
237
|
+
for (const session of transcripts.sessions) {
|
|
238
|
+
const date = session.started_at.split('T')[0];
|
|
239
|
+
const user = session.user.github_username || session.user.name || 'Unknown';
|
|
240
|
+
lines.push(`## ${date} - ${user}`);
|
|
241
|
+
lines.push('');
|
|
242
|
+
lines.push(session.summary);
|
|
243
|
+
lines.push('');
|
|
244
|
+
lines.push('---');
|
|
245
|
+
lines.push('');
|
|
246
|
+
}
|
|
247
|
+
return success(lines.join('\n'));
|
|
248
|
+
}
|
|
249
|
+
catch (err) {
|
|
250
|
+
if (err instanceof api.RecallApiError) {
|
|
251
|
+
if (err.status === 401) {
|
|
252
|
+
return error('Authentication failed. Your token may be invalid or expired.\n' +
|
|
253
|
+
'Get a new token from https://v3.recall.team/app/settings');
|
|
254
|
+
}
|
|
255
|
+
return error(`API Error: ${err.message}`);
|
|
256
|
+
}
|
|
257
|
+
const message = err instanceof Error ? err.message : 'Unknown error';
|
|
258
|
+
return error(message);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
export async function saveSession(args) {
|
|
262
|
+
try {
|
|
263
|
+
const projectPath = resolveProjectPath(args.projectPath);
|
|
264
|
+
const repoInfo = getRepoInfo(projectPath);
|
|
265
|
+
if (!repoInfo) {
|
|
266
|
+
return error(`Could not determine repository info for: ${projectPath}\n` +
|
|
267
|
+
'Make sure this is a git repository with a GitHub remote origin.');
|
|
268
|
+
}
|
|
269
|
+
const { repoId } = await api.resolveRepo(repoInfo.fullName, repoInfo.defaultBranch);
|
|
270
|
+
const result = await api.saveSession(repoId, {
|
|
271
|
+
summary: args.summary,
|
|
272
|
+
status: args.blockers ? 'blocked' : 'complete',
|
|
273
|
+
decisions: args.decisions,
|
|
274
|
+
mistakes: args.mistakes,
|
|
275
|
+
files_changed: args.filesChanged,
|
|
276
|
+
next_steps: args.nextSteps,
|
|
277
|
+
blockers: args.blockers,
|
|
278
|
+
});
|
|
279
|
+
return success(`Session saved successfully.\nID: ${result.id}`);
|
|
280
|
+
}
|
|
281
|
+
catch (err) {
|
|
282
|
+
if (err instanceof api.RecallApiError) {
|
|
283
|
+
if (err.status === 401) {
|
|
284
|
+
return error('Authentication failed. Your token may be invalid or expired.\n' +
|
|
285
|
+
'Get a new token from https://v3.recall.team/app/settings');
|
|
286
|
+
}
|
|
287
|
+
return error(`API Error: ${err.message}`);
|
|
288
|
+
}
|
|
289
|
+
const message = err instanceof Error ? err.message : 'Unknown error';
|
|
290
|
+
return error(message);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
export async function logDecision(args) {
|
|
294
|
+
try {
|
|
295
|
+
const projectPath = resolveProjectPath(args.projectPath);
|
|
296
|
+
const repoInfo = getRepoInfo(projectPath);
|
|
297
|
+
if (!repoInfo) {
|
|
298
|
+
return error(`Could not determine repository info for: ${projectPath}\n` +
|
|
299
|
+
'Make sure this is a git repository with a GitHub remote origin.');
|
|
300
|
+
}
|
|
301
|
+
const { repoId } = await api.resolveRepo(repoInfo.fullName, repoInfo.defaultBranch);
|
|
302
|
+
const result = await api.logDecision(repoId, args.decision, args.reasoning);
|
|
303
|
+
return success(`Decision logged successfully.\nID: ${result.id}`);
|
|
304
|
+
}
|
|
305
|
+
catch (err) {
|
|
306
|
+
if (err instanceof api.RecallApiError) {
|
|
307
|
+
if (err.status === 401) {
|
|
308
|
+
return error('Authentication failed. Your token may be invalid or expired.\n' +
|
|
309
|
+
'Get a new token from https://v3.recall.team/app/settings');
|
|
310
|
+
}
|
|
311
|
+
return error(`API Error: ${err.message}`);
|
|
312
|
+
}
|
|
313
|
+
const message = err instanceof Error ? err.message : 'Unknown error';
|
|
314
|
+
return error(message);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAQhC,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACjC,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC;AAED,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACjC,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,WAAmB;IACtC,IAAI,CAAC;QACH,iBAAiB;QACjB,MAAM,SAAS,GAAG,QAAQ,CAAC,oCAAoC,EAAE;YAC/D,GAAG,EAAE,WAAW;YAChB,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;SAChC,CAAC,CAAC,IAAI,EAAE,CAAC;QAEV,qCAAqC;QACrC,IAAI,QAAgB,CAAC;QACrB,IAAI,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;YACrC,qCAAqC;YACrC,2CAA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/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "recall-mcp-v3",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Recall MCP server for Claude Code - team memory for AI coding assistants",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"recall-mcp": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "tsc --watch",
|
|
13
|
+
"start": "node dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/node": "^20.10.0",
|
|
20
|
+
"typescript": "^5.3.0"
|
|
21
|
+
},
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=18.0.0"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"keywords": [
|
|
29
|
+
"mcp",
|
|
30
|
+
"claude",
|
|
31
|
+
"recall",
|
|
32
|
+
"ai",
|
|
33
|
+
"memory"
|
|
34
|
+
],
|
|
35
|
+
"author": "Recall Team",
|
|
36
|
+
"license": "MIT"
|
|
37
|
+
}
|