@flowrelay/mcp-server 0.1.0 → 0.3.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 +6 -1
- package/dist/api.js +7 -2
- package/dist/index.js +12 -4
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare class FlowRelayAPI {
|
|
|
13
13
|
summary: string;
|
|
14
14
|
status: string;
|
|
15
15
|
sources: string[];
|
|
16
|
+
key_changes?: string[];
|
|
16
17
|
decisions: string[];
|
|
17
18
|
open_questions: string[];
|
|
18
19
|
next_steps: string[];
|
|
@@ -20,12 +21,16 @@ export declare class FlowRelayAPI {
|
|
|
20
21
|
updated_at: string;
|
|
21
22
|
}>;
|
|
22
23
|
}>;
|
|
23
|
-
generateHandoff(sources?: string[]
|
|
24
|
+
generateHandoff(sources?: string[], filters?: Record<string, {
|
|
25
|
+
projects?: string[];
|
|
26
|
+
eventTypes?: string[];
|
|
27
|
+
}>): Promise<{
|
|
24
28
|
handoff: {
|
|
25
29
|
id: string;
|
|
26
30
|
title: string;
|
|
27
31
|
summary: string;
|
|
28
32
|
sources: string[];
|
|
33
|
+
key_changes?: string[];
|
|
29
34
|
decisions: string[];
|
|
30
35
|
open_questions: string[];
|
|
31
36
|
next_steps: string[];
|
package/dist/api.js
CHANGED
|
@@ -28,10 +28,15 @@ export class FlowRelayAPI {
|
|
|
28
28
|
async listHandoffs(status = 'active', limit = 10) {
|
|
29
29
|
return this.request(`/handoffs?status=${status}&limit=${limit}`);
|
|
30
30
|
}
|
|
31
|
-
async generateHandoff(sources) {
|
|
31
|
+
async generateHandoff(sources, filters) {
|
|
32
|
+
const body = {};
|
|
33
|
+
if (sources?.length)
|
|
34
|
+
body.sources = sources;
|
|
35
|
+
if (filters && Object.keys(filters).length > 0)
|
|
36
|
+
body.filters = filters;
|
|
32
37
|
return this.request('/handoffs', {
|
|
33
38
|
method: 'POST',
|
|
34
|
-
body: JSON.stringify(
|
|
39
|
+
body: JSON.stringify(body),
|
|
35
40
|
});
|
|
36
41
|
}
|
|
37
42
|
async listIntegrations() {
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ if (!apiKey) {
|
|
|
12
12
|
const api = new FlowRelayAPI(apiKey, process.env.FLOWRELAY_BASE_URL);
|
|
13
13
|
const server = new McpServer({
|
|
14
14
|
name: 'flowrelay',
|
|
15
|
-
version: '0.
|
|
15
|
+
version: '0.3.0',
|
|
16
16
|
});
|
|
17
17
|
// ── Tool: list handoffs ──────────────────────────────────────────────
|
|
18
18
|
server.tool('list_handoffs', 'List your Flow Relay handoffs. Returns recent handoffs with summaries, decisions, and next steps.', {
|
|
@@ -28,6 +28,8 @@ server.tool('list_handoffs', 'List your Flow Relay handoffs. Returns recent hand
|
|
|
28
28
|
out += `**Status:** ${h.status} · **Sources:** ${h.sources.join(', ') || 'all'}\n`;
|
|
29
29
|
out += `**Created:** ${new Date(h.created_at).toLocaleString()}\n\n`;
|
|
30
30
|
out += `${h.summary}\n`;
|
|
31
|
+
if (h.key_changes?.length)
|
|
32
|
+
out += `\n**Key changes:**\n${h.key_changes.map((c) => `- ${c}`).join('\n')}\n`;
|
|
31
33
|
if (h.decisions.length)
|
|
32
34
|
out += `\n**Decisions:**\n${h.decisions.map((d) => `- ${d}`).join('\n')}\n`;
|
|
33
35
|
if (h.next_steps.length)
|
|
@@ -39,15 +41,21 @@ server.tool('list_handoffs', 'List your Flow Relay handoffs. Returns recent hand
|
|
|
39
41
|
return { content: [{ type: 'text', text }] };
|
|
40
42
|
});
|
|
41
43
|
// ── Tool: generate handoff ───────────────────────────────────────────
|
|
42
|
-
server.tool('generate_handoff', 'Generate a new context handoff from your connected integrations. Summarizes recent activity into decisions, open questions, and next steps.', {
|
|
44
|
+
server.tool('generate_handoff', 'Generate a new context handoff from your connected integrations. Summarizes recent activity into decisions, open questions, and next steps. Optionally filter by specific projects/repos/channels and event types per source.', {
|
|
43
45
|
sources: z.array(z.enum(['github', 'slack', 'linear', 'notion', 'jira', 'gitlab']))
|
|
44
46
|
.optional()
|
|
45
47
|
.describe('Specific sources to include (omit for all connected sources)'),
|
|
46
|
-
|
|
48
|
+
filters: z.record(z.string(), z.object({
|
|
49
|
+
projects: z.array(z.string()).optional().describe('Filter to specific repos, channels, projects, or teams'),
|
|
50
|
+
eventTypes: z.array(z.string()).optional().describe('Filter to specific event types (e.g. "push", "issue_created")'),
|
|
51
|
+
})).optional().describe('Per-source advanced filters'),
|
|
52
|
+
}, async ({ sources, filters }) => {
|
|
47
53
|
try {
|
|
48
|
-
const { handoff } = await api.generateHandoff(sources);
|
|
54
|
+
const { handoff } = await api.generateHandoff(sources, filters);
|
|
49
55
|
let text = `# ${handoff.title}\n\n${handoff.summary}\n`;
|
|
50
56
|
text += `\n**Sources:** ${handoff.sources.join(', ')}\n`;
|
|
57
|
+
if (handoff.key_changes?.length)
|
|
58
|
+
text += `\n**Key changes:**\n${handoff.key_changes.map((c) => `- ${c}`).join('\n')}\n`;
|
|
51
59
|
if (handoff.decisions.length)
|
|
52
60
|
text += `\n**Decisions:**\n${handoff.decisions.map((d) => `- ${d}`).join('\n')}\n`;
|
|
53
61
|
if (handoff.next_steps.length)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowrelay/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Flow Relay MCP Server for Claude Desktop and Claude Code — handoffs, integrations, and context events via natural conversation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|