MCP ExplorerExplorer

Appflowy Mcp

@LucasXu0on a year ago
1 MIT
FreeCommunity
AI Systems
AppFlowy MCP Server for API integration and interaction.

Overview

What is Appflowy Mcp

appflowy_mcp is an MCP server implementation designed for integrating with the AppFlowy API. It provides tools to facilitate interaction with AppFlowy’s REST API.

Use cases

Use cases include managing personal projects, collaborating on team documentation, organizing notes, and maintaining a structured workspace for various tasks.

How to use

To use appflowy_mcp, install the required dependencies using ‘pip install -r requirements.txt’, configure environment variables for the AppFlowy instance and authentication token, and then run the server with ‘python appflowy_mcp.py’.

Key features

Key features include tools for listing workspaces, retrieving workspace folder structures, creating and updating pages, managing trash, and handling favorites.

Where to use

appflowy_mcp can be used in project management, note-taking applications, and any scenario requiring organization and collaboration through the AppFlowy platform.

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:
pip install -r requirements.txt
  1. Configure environment variables (optional):
# 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"
  1. Run the server:
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:

    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:

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:

{
  "error": "Error message details"
}

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers