MCP Server for Flomo

MCP Server for Flomo

jamesfeng2009

Developer Tools
Visit Server

README

MCP Server for Flomo

这个项目提供了一个基于MCP (Model Context Protocol)的Web服务器和命令行工具,用于与Flomo API交互,以便在不同环境中方便地添加笔记到Flomo。

安装

从PyPI安装(推荐)

# 安装基本包
pip install mcp-server-flomo

# 安装开发依赖(可选)
pip install mcp-server-flomo[dev]

从源码安装

git clone https://github.com/yourusername/mcp-server-flomo-python.git
cd mcp-server-flomo-python
pip install -r requirements.txt

项目结构

.
├── flomo_cli.py         # 命令行工具入口脚本
├── flomo_server.py      # Web服务器入口脚本
├── src                  # 源代码目录
│   ├── cli              # 命令行工具模块
│   │   ├── __init__.py
│   │   ├── __main__.py  # CLI主入口
│   │   └── commands.py  # CLI命令实现
│   ├── server           # Web服务器模块
│   │   ├── __init__.py
│   │   ├── __main__.py  # 服务器主入口
│   │   └── app.py       # Flask应用实现
│   └── utils            # 工具模块
│       ├── __init__.py
│       ├── config.py    # 配置管理
│       └── flomo_client.py  # Flomo API客户端
├── tests                # 测试目录
└── docs                 # 文档目录

配置

  1. 在项目根目录创建 .env 文件:
FLOMO_API_URL=https://flomoapp.com/iwh/你的ID/你的API密钥/

注意:FLOMO_API_URL 是必需的,你可以从 Flomo 网站的 设置 > API 页面获取。

使用方法

命令行工具

安装后,你可以直接使用 flomo-cli 命令:

# 测试连接
flomo-cli test

# 发送笔记
flomo-cli write "这是一条测试笔记"

# 从文件读取内容
flomo-cli write -f notes.md

Web服务器

安装后,你可以直接使用 flomo-server 命令启动服务器:

flomo-server

或者使用参数:

flomo-server --port 8080 --host 127.0.0.1

服务器默认在 http://localhost:12345 上运行,提供以下端点:

  • GET / - 显示使用说明
  • GET /test - 测试服务器连接
  • POST /write_note - 写入笔记到 Flomo

示例:写入笔记

curl -X POST http://localhost:12345/write_note \
    -H "Content-Type: application/json" \
    -d '{"content": "这是一条测试笔记!\n\n支持 **Markdown** 格式\n- 列表1\n- 列表2\n\n> 引用文本"}'

开发

安装开发依赖

pip install -r requirements.txt

运行测试

pytest

代码格式化

black .

类型检查

mypy src

故障排除

  1. 如果 Web 服务器无法启动,请检查端口 12345 是否已被占用
  2. 如果连接到 Flomo API 失败,请检查 API URL 是否正确
  3. 确保 .env 文件中的 FLOMO_API_URL 设置正确

贡献

欢迎提交 Issue 和 Pull Request!

许可证

本项目采用 MIT 许可证。详见 LICENSE 文件。

相关链接

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python