appflowy-mcp 0.1.0__tar.gz
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.
- appflowy_mcp-0.1.0/.gitignore +8 -0
- appflowy_mcp-0.1.0/.python-version +1 -0
- appflowy_mcp-0.1.0/PKG-INFO +130 -0
- appflowy_mcp-0.1.0/README.md +116 -0
- appflowy_mcp-0.1.0/appflowy_mcp/__init__.py +3 -0
- appflowy_mcp-0.1.0/appflowy_mcp/__main__.py +5 -0
- appflowy_mcp-0.1.0/appflowy_mcp/models.py +103 -0
- appflowy_mcp-0.1.0/appflowy_mcp/server.py +489 -0
- appflowy_mcp-0.1.0/main.py +5 -0
- appflowy_mcp-0.1.0/pyproject.toml +27 -0
- appflowy_mcp-0.1.0/uv.lock +1046 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: appflowy-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: AppFlowy Cloud MCP server for workspace, space, page, database, and row operations
|
|
5
|
+
Project-URL: Homepage, https://github.com/weironz/appflowy_mcp
|
|
6
|
+
Project-URL: Repository, https://github.com/weironz/appflowy_mcp
|
|
7
|
+
Requires-Python: <3.15,>=3.14
|
|
8
|
+
Requires-Dist: appflowysdk>=0.1.2
|
|
9
|
+
Requires-Dist: fastmcp>=3.1.1
|
|
10
|
+
Requires-Dist: httpx>=0.27.0
|
|
11
|
+
Requires-Dist: pydantic>=2.6.0
|
|
12
|
+
Requires-Dist: python-dotenv>=1.2.2
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
# AppFlowy MCP
|
|
16
|
+
|
|
17
|
+
An MCP server for AppFlowy Cloud. This fork adds workspace folder, space, page, trash, favorite, and basic page-content tools on top of the original workspace/database/row tools.
|
|
18
|
+
|
|
19
|
+
## Requirements
|
|
20
|
+
|
|
21
|
+
- Python 3.14
|
|
22
|
+
- uv
|
|
23
|
+
- AppFlowy Cloud account credentials
|
|
24
|
+
|
|
25
|
+
## Configure In Codex
|
|
26
|
+
|
|
27
|
+
After publishing to PyPI, use `uvx` as the command:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
uvx
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Use these arguments:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
appflowy-mcp
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Set these environment variables:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
APPFLOWY_EMAIL=your-email@example.com
|
|
43
|
+
APPFLOWY_PASSWORD=your-password
|
|
44
|
+
FASTMCP_SHOW_SERVER_BANNER=false
|
|
45
|
+
FASTMCP_CHECK_FOR_UPDATES=off
|
|
46
|
+
FASTMCP_LOG_ENABLED=false
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The FastMCP variables keep stdio clean for MCP handshakes.
|
|
50
|
+
|
|
51
|
+
## AppFlowy Structure
|
|
52
|
+
|
|
53
|
+
Most write operations need both a workspace and a parent view:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
workspace -> space -> page/database
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
To create a page inside a space, pass the workspace ID and use the space `view_id` as `parent_view_id`.
|
|
60
|
+
|
|
61
|
+
## Tools
|
|
62
|
+
|
|
63
|
+
### Authentication
|
|
64
|
+
|
|
65
|
+
- `appflowy_login`
|
|
66
|
+
- `appflowy_refresh_token`
|
|
67
|
+
|
|
68
|
+
### Workspaces And Spaces
|
|
69
|
+
|
|
70
|
+
- `appflowy_list_workspaces`
|
|
71
|
+
- `appflowy_get_workspace_folder`
|
|
72
|
+
- `appflowy_list_spaces`
|
|
73
|
+
- `appflowy_create_space`
|
|
74
|
+
- `appflowy_update_space`
|
|
75
|
+
|
|
76
|
+
### Pages
|
|
77
|
+
|
|
78
|
+
- `appflowy_create_page`
|
|
79
|
+
- `appflowy_get_page`
|
|
80
|
+
- `appflowy_update_page`
|
|
81
|
+
- `appflowy_move_page_to_trash`
|
|
82
|
+
- `appflowy_restore_page_from_trash`
|
|
83
|
+
- `appflowy_delete_page_from_trash`
|
|
84
|
+
- `appflowy_favorite_page`
|
|
85
|
+
- `appflowy_list_trash`
|
|
86
|
+
- `appflowy_list_favorites`
|
|
87
|
+
|
|
88
|
+
### Page Content
|
|
89
|
+
|
|
90
|
+
- `appflowy_append_text_to_page`
|
|
91
|
+
- `appflowy_append_blocks_to_page`
|
|
92
|
+
|
|
93
|
+
Page-content support currently covers appending new document blocks. AppFlowy Cloud exposes a high-level `append-block` endpoint, but not a matching high-level REST endpoint for deleting or editing arbitrary existing blocks. Page-level deletion through trash is supported.
|
|
94
|
+
|
|
95
|
+
Example paragraph block:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"type": "paragraph",
|
|
100
|
+
"data": {
|
|
101
|
+
"delta": [
|
|
102
|
+
{
|
|
103
|
+
"insert": "Hello from MCP"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Databases And Rows
|
|
111
|
+
|
|
112
|
+
- `appflowy_list_databases`
|
|
113
|
+
- `appflowy_get_database_fields`
|
|
114
|
+
- `appflowy_list_rows`
|
|
115
|
+
- `appflowy_get_row_details`
|
|
116
|
+
- `appflowy_create_row`
|
|
117
|
+
- `appflowy_upsert_row`
|
|
118
|
+
- `appflowy_get_updated_rows`
|
|
119
|
+
|
|
120
|
+
## Local Run
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
uv run appflowy-mcp
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Notes
|
|
127
|
+
|
|
128
|
+
- Tokens are stored in memory by the MCP server process.
|
|
129
|
+
- `APPFLOWY_EMAIL` and `APPFLOWY_PASSWORD` can also be provided through a local `.env` file.
|
|
130
|
+
- Some page and space endpoints are implemented from AppFlowy Cloud source routes that are not present in the public OpenAPI document.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# AppFlowy MCP
|
|
2
|
+
|
|
3
|
+
An MCP server for AppFlowy Cloud. This fork adds workspace folder, space, page, trash, favorite, and basic page-content tools on top of the original workspace/database/row tools.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Python 3.14
|
|
8
|
+
- uv
|
|
9
|
+
- AppFlowy Cloud account credentials
|
|
10
|
+
|
|
11
|
+
## Configure In Codex
|
|
12
|
+
|
|
13
|
+
After publishing to PyPI, use `uvx` as the command:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
uvx
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Use these arguments:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
appflowy-mcp
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Set these environment variables:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
APPFLOWY_EMAIL=your-email@example.com
|
|
29
|
+
APPFLOWY_PASSWORD=your-password
|
|
30
|
+
FASTMCP_SHOW_SERVER_BANNER=false
|
|
31
|
+
FASTMCP_CHECK_FOR_UPDATES=off
|
|
32
|
+
FASTMCP_LOG_ENABLED=false
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The FastMCP variables keep stdio clean for MCP handshakes.
|
|
36
|
+
|
|
37
|
+
## AppFlowy Structure
|
|
38
|
+
|
|
39
|
+
Most write operations need both a workspace and a parent view:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
workspace -> space -> page/database
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
To create a page inside a space, pass the workspace ID and use the space `view_id` as `parent_view_id`.
|
|
46
|
+
|
|
47
|
+
## Tools
|
|
48
|
+
|
|
49
|
+
### Authentication
|
|
50
|
+
|
|
51
|
+
- `appflowy_login`
|
|
52
|
+
- `appflowy_refresh_token`
|
|
53
|
+
|
|
54
|
+
### Workspaces And Spaces
|
|
55
|
+
|
|
56
|
+
- `appflowy_list_workspaces`
|
|
57
|
+
- `appflowy_get_workspace_folder`
|
|
58
|
+
- `appflowy_list_spaces`
|
|
59
|
+
- `appflowy_create_space`
|
|
60
|
+
- `appflowy_update_space`
|
|
61
|
+
|
|
62
|
+
### Pages
|
|
63
|
+
|
|
64
|
+
- `appflowy_create_page`
|
|
65
|
+
- `appflowy_get_page`
|
|
66
|
+
- `appflowy_update_page`
|
|
67
|
+
- `appflowy_move_page_to_trash`
|
|
68
|
+
- `appflowy_restore_page_from_trash`
|
|
69
|
+
- `appflowy_delete_page_from_trash`
|
|
70
|
+
- `appflowy_favorite_page`
|
|
71
|
+
- `appflowy_list_trash`
|
|
72
|
+
- `appflowy_list_favorites`
|
|
73
|
+
|
|
74
|
+
### Page Content
|
|
75
|
+
|
|
76
|
+
- `appflowy_append_text_to_page`
|
|
77
|
+
- `appflowy_append_blocks_to_page`
|
|
78
|
+
|
|
79
|
+
Page-content support currently covers appending new document blocks. AppFlowy Cloud exposes a high-level `append-block` endpoint, but not a matching high-level REST endpoint for deleting or editing arbitrary existing blocks. Page-level deletion through trash is supported.
|
|
80
|
+
|
|
81
|
+
Example paragraph block:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"type": "paragraph",
|
|
86
|
+
"data": {
|
|
87
|
+
"delta": [
|
|
88
|
+
{
|
|
89
|
+
"insert": "Hello from MCP"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Databases And Rows
|
|
97
|
+
|
|
98
|
+
- `appflowy_list_databases`
|
|
99
|
+
- `appflowy_get_database_fields`
|
|
100
|
+
- `appflowy_list_rows`
|
|
101
|
+
- `appflowy_get_row_details`
|
|
102
|
+
- `appflowy_create_row`
|
|
103
|
+
- `appflowy_upsert_row`
|
|
104
|
+
- `appflowy_get_updated_rows`
|
|
105
|
+
|
|
106
|
+
## Local Run
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
uv run appflowy-mcp
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Notes
|
|
113
|
+
|
|
114
|
+
- Tokens are stored in memory by the MCP server process.
|
|
115
|
+
- `APPFLOWY_EMAIL` and `APPFLOWY_PASSWORD` can also be provided through a local `.env` file.
|
|
116
|
+
- Some page and space endpoints are implemented from AppFlowy Cloud source routes that are not present in the public OpenAPI document.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
from typing import Optional, Dict, Any, List
|
|
3
|
+
|
|
4
|
+
# AppFlowy Cloud Models
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class LoginRequest(BaseModel):
|
|
8
|
+
email: Optional[str] = None
|
|
9
|
+
password: Optional[str] = None
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class RefreshTokenRequest(BaseModel):
|
|
13
|
+
refresh_token: str
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class AuthResponse(BaseModel):
|
|
17
|
+
access_token: str
|
|
18
|
+
token_type: str
|
|
19
|
+
expires_in: int
|
|
20
|
+
refresh_token: str
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Workspace(BaseModel):
|
|
24
|
+
id: str
|
|
25
|
+
name: str
|
|
26
|
+
database_id: Optional[str] = None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class Database(BaseModel):
|
|
30
|
+
id: str
|
|
31
|
+
name: str
|
|
32
|
+
workspace_id: str
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class RowDetail(BaseModel):
|
|
36
|
+
id: str
|
|
37
|
+
cells: Dict[str, Any]
|
|
38
|
+
document: Optional[str] = None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class RowCreateRequest(BaseModel):
|
|
42
|
+
cells: Dict[str, Any]
|
|
43
|
+
document: Optional[str] = None
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class RowUpdateRequest(BaseModel):
|
|
47
|
+
pre_hash: Optional[str] = None
|
|
48
|
+
cells: Dict[str, Any]
|
|
49
|
+
document: Optional[str] = None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class CreateSpaceRequest(BaseModel):
|
|
53
|
+
name: str
|
|
54
|
+
space_permission: int = 0
|
|
55
|
+
space_icon: str = "interface_essential/home-3"
|
|
56
|
+
space_icon_color: str = "0xFFA34AFD"
|
|
57
|
+
view_id: Optional[str] = None
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class UpdateSpaceRequest(BaseModel):
|
|
61
|
+
name: str
|
|
62
|
+
space_permission: int = 0
|
|
63
|
+
space_icon: str = "interface_essential/home-3"
|
|
64
|
+
space_icon_color: str = "0xFFA34AFD"
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class CreatePageRequest(BaseModel):
|
|
68
|
+
parent_view_id: str
|
|
69
|
+
name: Optional[str] = None
|
|
70
|
+
layout: int = 0
|
|
71
|
+
page_data: Optional[Dict[str, Any]] = None
|
|
72
|
+
view_id: Optional[str] = None
|
|
73
|
+
collab_id: Optional[str] = None
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class UpdatePageRequest(BaseModel):
|
|
77
|
+
name: str
|
|
78
|
+
icon: Optional[Dict[str, Any]] = None
|
|
79
|
+
is_locked: Optional[bool] = None
|
|
80
|
+
extra: Optional[Dict[str, Any]] = None
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class FavoritePageRequest(BaseModel):
|
|
84
|
+
is_favorite: bool = True
|
|
85
|
+
is_pinned: bool = False
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class AppendBlocksRequest(BaseModel):
|
|
89
|
+
blocks: List[Dict[str, Any]]
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class AppendTextRequest(BaseModel):
|
|
93
|
+
texts: List[str]
|
|
94
|
+
block_type: str = "paragraph"
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
# Todoist Models (existing)
|
|
98
|
+
class Task(BaseModel):
|
|
99
|
+
id: str | None = None
|
|
100
|
+
content: str
|
|
101
|
+
description: str
|
|
102
|
+
project_id: str | None = None
|
|
103
|
+
priority: int
|