@flowrelay/mcp-server 0.3.3 → 0.3.5
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 +11 -0
- package/dist/api.js +9 -0
- package/dist/index.js +34 -4
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -55,4 +55,15 @@ export declare class FlowRelayAPI {
|
|
|
55
55
|
created_at: string;
|
|
56
56
|
}>;
|
|
57
57
|
}>;
|
|
58
|
+
discordListChannels(): Promise<{
|
|
59
|
+
channels: Array<{
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
topic: string;
|
|
63
|
+
}>;
|
|
64
|
+
}>;
|
|
65
|
+
discordSendMessage(channelId: string, content: string): Promise<{
|
|
66
|
+
ok: boolean;
|
|
67
|
+
message_id: string;
|
|
68
|
+
}>;
|
|
58
69
|
}
|
package/dist/api.js
CHANGED
|
@@ -49,4 +49,13 @@ export class FlowRelayAPI {
|
|
|
49
49
|
params.set('limit', String(limit));
|
|
50
50
|
return this.request(`/events?${params}`);
|
|
51
51
|
}
|
|
52
|
+
async discordListChannels() {
|
|
53
|
+
return this.request('/discord/channels');
|
|
54
|
+
}
|
|
55
|
+
async discordSendMessage(channelId, content) {
|
|
56
|
+
return this.request('/discord/send', {
|
|
57
|
+
method: 'POST',
|
|
58
|
+
body: JSON.stringify({ channel_id: channelId, content }),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
52
61
|
}
|
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.3.
|
|
15
|
+
version: '0.3.5',
|
|
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.', {
|
|
@@ -42,7 +42,7 @@ server.tool('list_handoffs', 'List your Flow Relay handoffs. Returns recent hand
|
|
|
42
42
|
});
|
|
43
43
|
// ── Tool: generate handoff ───────────────────────────────────────────
|
|
44
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.', {
|
|
45
|
-
sources: z.array(z.enum(['github', 'slack', 'linear', 'notion', 'jira', 'gitlab', 'bitbucket', 'azure_devops', 'figma']))
|
|
45
|
+
sources: z.array(z.enum(['github', 'slack', 'discord', 'linear', 'notion', 'jira', 'gitlab', 'bitbucket', 'azure_devops', 'figma']))
|
|
46
46
|
.optional()
|
|
47
47
|
.describe('Specific sources to include (omit for all connected sources)'),
|
|
48
48
|
filters: z.record(z.string(), z.object({
|
|
@@ -67,7 +67,7 @@ server.tool('generate_handoff', 'Generate a new context handoff from your connec
|
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
// ── Tool: list integrations ─────────────────────────────────────────
|
|
70
|
-
server.tool('list_integrations', 'List your connected Flow Relay integrations (GitHub, Slack, Linear, Notion, Jira, GitLab, Bitbucket, Azure DevOps, Figma).', {}, async () => {
|
|
70
|
+
server.tool('list_integrations', 'List your connected Flow Relay integrations (GitHub, Slack, Discord, Linear, Notion, Jira, GitLab, Bitbucket, Azure DevOps, Figma).', {}, async () => {
|
|
71
71
|
const { integrations } = await api.listIntegrations();
|
|
72
72
|
if (integrations.length === 0) {
|
|
73
73
|
return { content: [{ type: 'text', text: 'No integrations connected. Visit https://www.flowrelay.it/integrations to set up.' }] };
|
|
@@ -80,7 +80,7 @@ server.tool('list_integrations', 'List your connected Flow Relay integrations (G
|
|
|
80
80
|
});
|
|
81
81
|
// ── Tool: list recent events ─────────────────────────────────────────
|
|
82
82
|
server.tool('list_events', 'List recent context events (commits, messages, issues, etc.) from your connected integrations.', {
|
|
83
|
-
source: z.enum(['github', 'slack', 'linear', 'notion', 'jira', 'gitlab', 'bitbucket', 'azure_devops', 'figma'])
|
|
83
|
+
source: z.enum(['github', 'slack', 'discord', 'linear', 'notion', 'jira', 'gitlab', 'bitbucket', 'azure_devops', 'figma'])
|
|
84
84
|
.optional()
|
|
85
85
|
.describe('Filter by integration source'),
|
|
86
86
|
limit: z.number().min(1).max(100).default(20).describe('Max number of events'),
|
|
@@ -95,6 +95,36 @@ server.tool('list_events', 'List recent context events (commits, messages, issue
|
|
|
95
95
|
}).join('\n');
|
|
96
96
|
return { content: [{ type: 'text', text: `**Recent events:**\n${text}` }] };
|
|
97
97
|
});
|
|
98
|
+
// ── Tool: discord list channels ──────────────────────────────────────
|
|
99
|
+
server.tool('discord_list_channels', 'List text channels in your connected Discord server.', {}, async () => {
|
|
100
|
+
try {
|
|
101
|
+
const { channels } = await api.discordListChannels();
|
|
102
|
+
if (channels.length === 0) {
|
|
103
|
+
return { content: [{ type: 'text', text: 'No text channels found in the connected Discord server.' }] };
|
|
104
|
+
}
|
|
105
|
+
const text = channels.map((ch) => {
|
|
106
|
+
const topic = ch.topic ? ` — ${ch.topic}` : '';
|
|
107
|
+
return `- **#${ch.name}** (${ch.id})${topic}`;
|
|
108
|
+
}).join('\n');
|
|
109
|
+
return { content: [{ type: 'text', text: `**Discord channels:**\n${text}` }] };
|
|
110
|
+
}
|
|
111
|
+
catch (err) {
|
|
112
|
+
return { content: [{ type: 'text', text: `Could not list Discord channels: ${err.message}` }] };
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
// ── Tool: discord send message ──────────────────────────────────────
|
|
116
|
+
server.tool('discord_send_message', 'Send a message to a Discord channel in your connected server.', {
|
|
117
|
+
channel_id: z.string().describe('The Discord channel ID to send the message to'),
|
|
118
|
+
content: z.string().describe('The message content to send'),
|
|
119
|
+
}, async ({ channel_id, content }) => {
|
|
120
|
+
try {
|
|
121
|
+
const result = await api.discordSendMessage(channel_id, content);
|
|
122
|
+
return { content: [{ type: 'text', text: `Message sent (ID: ${result.message_id})` }] };
|
|
123
|
+
}
|
|
124
|
+
catch (err) {
|
|
125
|
+
return { content: [{ type: 'text', text: `Failed to send message: ${err.message}` }] };
|
|
126
|
+
}
|
|
127
|
+
});
|
|
98
128
|
// ── Start ────────────────────────────────────────────────────────────
|
|
99
129
|
const transport = new StdioServerTransport();
|
|
100
130
|
await server.connect(transport);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowrelay/mcp-server",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
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",
|