Conversation
Implements a comprehensive WorkFlowy connector with native fetch: - Create bullet points under specific locations or default location - Read tasks from WorkFlowy documents with filtering for completed/incomplete - Search tasks by content with regex support - Get hierarchical document structure overview - Username/password authentication with session management - Full TypeScript support with Zod schemas - Comprehensive test coverage using MSW - Error handling for auth failures and missing locations Features: - workflowy_create_bullet: Create new bullet points with optional descriptions - workflowy_read_tasks: Read and filter tasks from entire document or specific locations - workflowy_search_tasks: Search tasks by content in names and descriptions - workflowy_get_structure: Get document hierarchy with item counts Fixes #1 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Matt <mattzcarey@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR implements a comprehensive WorkFlowy MCP connector that provides task management capabilities through WorkFlowy's API with native fetch. The connector enables creating bullet points, reading tasks with filtering options, searching content, and viewing document structure hierarchically.
Key changes:
- Added full WorkFlowy API integration with session-based authentication
- Implemented four main tools: CREATE_BULLET, READ_TASKS, SEARCH_TASKS, and GET_STRUCTURE
- Comprehensive test coverage using MSW for API mocking
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/mcp-connectors/src/index.ts | Adds WorkFlowy connector to the main exports and connector registry |
| packages/mcp-connectors/src/connectors/workflowy.ts | Core implementation with WorkFlowy client, authentication, and tool handlers |
| packages/mcp-connectors/src/connectors/workflowy.spec.ts | Complete test suite covering all tools and error scenarios with MSW mocking |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| parentid: parentId || null, | ||
| priority: 0, | ||
| }, | ||
| client_timestamp: Date.now(), |
There was a problem hiding this comment.
The Date.now() is called multiple times which could result in different timestamps. Consider storing the timestamp in a variable and reusing it for consistency.
| client_timestamp: Date.now(), | |
| client_timestamp: timestamp, |
| }) | ||
| ); | ||
|
|
||
| server.listen(); |
There was a problem hiding this comment.
Start/stop MSW server in test lifecycle hooks instead of inside each test to avoid resource leaks and cross-test interference
Prompt for AI agents
Address the following comment on packages/mcp-connectors/src/connectors/workflowy.spec.ts at line 74:
<comment>Start/stop MSW server in test lifecycle hooks instead of inside each test to avoid resource leaks and cross-test interference</comment>
<file context>
@@ -0,0 +1,623 @@
+import { describe, expect, it } from "vitest";
+import type { MCPToolDefinition } from "@stackone/mcp-config-types";
+import { http, HttpResponse } from "msw";
+import { setupServer } from "msw/node";
+import { createMockConnectorContext } from "../__mocks__/context";
+import { WorkFlowyConnectorConfig } from "./workflowy";
+
+const mockLoginResponse = {
+ success: true,
</file context>
Implements a comprehensive WorkFlowy connector with native fetch:
Fixes #1
🤖 Generated with Claude Code
Summary by cubic
Adds a WorkFlowy MCP connector to create bullets, read/search tasks, and view document structure. Uses username/password auth with session cookies and is registered in the connectors index.