Content
# AppFlowy MCP Server
This is an MCP server implementation for AppFlowy API integration. It provides tools to interact with AppFlowy's REST API through MCP.
## Setup
1. Install dependencies:
```bash
pip install -r requirements.txt
```
2. Configure environment variables (optional):
```bash
# Base URL of your AppFlowy instance
export APPFLOWY_BASE_URL="https://your-appflowy-instance.com"
# Your authentication token
export APPFLOWY_ACCESS_TOKEN="your-token-here"
```
3. Run the server:
```bash
python appflowy_mcp.py
```
## Authentication
There are two ways to provide authentication credentials:
1. **Environment Variables** (recommended):
- Set `APPFLOWY_BASE_URL` for the API base URL
- Set `APPFLOWY_ACCESS_TOKEN` for authentication
2. **Direct Parameter Passing**:
```python
await client.invoke(
"Get workspace list",
base_url="https://your-appflowy-instance.com",
access_token="your-token-here"
)
```
## Available Tools
The server provides the following tools for interacting with AppFlowy:
- **Get workspace list**: List all workspaces for the authenticated user
- **Get workspace folder**: Get the folder structure of a workspace
- **Create new page**: Create a new page in the workspace
- **Update page**: Update a page's properties
- **Get page details**: Get details of a specific page
- **Move page to trash**: Move a page to trash
- **Get trash**: Get all items in trash
- **Restore from trash**: Restore a page from trash
- **Delete from trash**: Permanently delete a page from trash
- **Get favorites**: Get favorite pages
- **Toggle favorite**: Add or remove a page from favorites
## Required Parameters
Most tools require the following base parameters:
- `base_url`: The base URL of your AppFlowy instance
- `access_token`: Your authentication token
- `workspace_id`: The ID of the workspace you're operating in
## Example Usage
Here's an example of how to use the tools in Python:
```python
from mcp.clients import LocalClient
async def main():
client = LocalClient()
# List workspaces
workspaces = await client.invoke(
"Get workspace list",
base_url="https://your-appflowy-instance.com",
access_token="your-token"
)
# Create a new page
new_page = await client.invoke(
"Create new page",
base_url="https://your-appflowy-instance.com",
access_token="your-token",
workspace_id="your-workspace-id",
parent_view_id="parent-view-id",
name="My New Page"
)
if __name__ == "__main__":
import asyncio
asyncio.run(main())
```
## Error Handling
All API calls include proper error handling and will return an error object if something goes wrong:
```json
{
"error": "Error message details"
}
```
Connection Info
You Might Also Like
MarkItDown MCP
Converting files and office documents to Markdown.
Time
Obtaining current time information and converting time between different...
Filesystem
Model Context Protocol Servers
easy-code-reader
A powerful MCP (Model Context Protocol) server for intelligently reading...
strudel-mcp-server
A Model Context Protocol (MCP) server that gives Claude direct control over...
awesome-context-engineering
A curated list of awesome open-source libraries for context engineering...