Skip to content

Conversation

@mattzcarey
Copy link
Contributor

@mattzcarey mattzcarey commented Aug 20, 2025

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

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.

  • New Features
    • workflowy_create_bullet: Create bullets at a path or default location; optional description.
    • workflowy_read_tasks: Read tasks from the whole doc or a location; filter completed; limit results.
    • workflowy_search_tasks: Search names/descriptions; optional include completed; returns paths.
    • workflowy_get_structure: Browse hierarchy with maxDepth and item counts; optional location scope.
    • Typed schemas (Zod), MSW tests, and clear errors for auth failures and missing locations.

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 <[email protected]>
Copilot AI review requested due to automatic review settings August 20, 2025 13:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(),
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
client_timestamp: Date.now(),
client_timestamp: timestamp,

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

})
);

server.listen();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 &quot;vitest&quot;;
+import type { MCPToolDefinition } from &quot;@stackone/mcp-config-types&quot;;
+import { http, HttpResponse } from &quot;msw&quot;;
+import { setupServer } from &quot;msw/node&quot;;
+import { createMockConnectorContext } from &quot;../__mocks__/context&quot;;
+import { WorkFlowyConnectorConfig } from &quot;./workflowy&quot;;
+
+const mockLoginResponse = {
+  success: true,
</file context>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workflowy MCP server.

2 participants