mcp-server-moscow 0.0.3 → 0.0.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.
Files changed (2) hide show
  1. package/dist/index.js +33 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11,7 +11,6 @@ const __dirname = path.dirname(__filename);
11
11
  // Load .env from the project root relative to this file's location
12
12
  dotenv.config({ path: path.resolve(__dirname, '../.env') });
13
13
  const SUPABASE_URL = process.env.SUPABASE_URL || 'https://jnxbtfiwzaxwheifuhuf.supabase.co';
14
- const DEFAULT_TOPIC = process.env.TOPIC || 'default';
15
14
  const DEFAULT_BOARD_ID = process.env.BOARD_ID || undefined;
16
15
  if (!SUPABASE_URL) {
17
16
  console.error('Missing SUPABASE_URL environment variable');
@@ -79,6 +78,14 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
79
78
  type: 'string',
80
79
  description: 'Optional board ID to assign the task to.',
81
80
  },
81
+ github_commit_hash: {
82
+ type: 'string',
83
+ description: 'Optional GitHub commit hash related to this task.',
84
+ },
85
+ duration_minutes: {
86
+ type: 'integer',
87
+ description: 'Estimated duration in minutes.',
88
+ },
82
89
  },
83
90
  required: ['title'],
84
91
  },
@@ -119,6 +126,14 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
119
126
  type: 'string',
120
127
  description: 'Move the task to a different board by providing the new board ID.',
121
128
  },
129
+ github_commit_hash: {
130
+ type: 'string',
131
+ description: 'The new GitHub commit hash.',
132
+ },
133
+ duration_minutes: {
134
+ type: 'integer',
135
+ description: 'The new estimated duration in minutes.',
136
+ },
122
137
  },
123
138
  required: ['id'],
124
139
  },
@@ -176,13 +191,20 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
176
191
  // Extract dynamic auth from the transport metadata if available
177
192
  const env = extra?.env || {};
178
193
  const mcpToken = env.MCP_TOKEN || process.env.MCP_TOKEN;
179
- const topicScope = request.params.arguments?.topic || env.TOPIC || DEFAULT_TOPIC;
180
- const boardScope = request.params.arguments?.board_id || env.BOARD_ID || DEFAULT_BOARD_ID;
194
+ const topicScope = request.params.arguments?.topic;
195
+ // Board from env takes priority (locks MCP to single board), otherwise use request arg or default
196
+ const envBoardId = env.BOARD_ID || DEFAULT_BOARD_ID;
197
+ const boardScope = envBoardId || request.params.arguments?.board_id;
181
198
  const authValue = mcpToken;
182
199
  switch (request.params.name) {
183
200
  case 'list_tasks': {
184
201
  try {
185
- const params = { topic: topicScope };
202
+ const params = {};
203
+ // Only filter by topic if explicitly provided
204
+ const explicitTopic = request.params.arguments?.topic;
205
+ if (explicitTopic) {
206
+ params.topic = explicitTopic;
207
+ }
186
208
  if (boardScope) {
187
209
  params.board_id = boardScope;
188
210
  }
@@ -209,7 +231,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
209
231
  }
210
232
  }
211
233
  case 'create_task': {
212
- const { title, description, topic, priority, status, board_id } = request.params.arguments || {};
234
+ const { title, description, topic, priority, status, board_id, github_commit_hash, duration_minutes } = request.params.arguments || {};
235
+ // Use env board if locked, otherwise use provided board_id
236
+ const taskBoardId = envBoardId || board_id || null;
213
237
  try {
214
238
  const response = await axios.post(getEdgeFunctionUrl(), {
215
239
  title,
@@ -217,7 +241,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
217
241
  topic: topic || topicScope,
218
242
  priority,
219
243
  status,
220
- board_id: board_id || boardScope || null,
244
+ board_id: taskBoardId,
245
+ github_commit_hash,
246
+ duration_minutes,
221
247
  }, {
222
248
  headers: {
223
249
  Authorization: `Bearer ${authValue}`,
@@ -302,8 +328,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
302
328
  }
303
329
  }
304
330
  case 'find_task': {
305
- const { id, name, topic, board_id } = request.params.arguments ||
306
- {};
331
+ const { id, name, topic, board_id } = request.params.arguments || {};
307
332
  if (!id && !name) {
308
333
  return {
309
334
  content: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-server-moscow",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "description": "MCP for Moscow task management",
6
6
  "main": "dist/index.js",