Skip to content

feat(mcp): add flomo built-in server and connection timeout#13928

Merged
kangfenmao merged 1 commit intomainfrom
feat/flomo-mcp
Apr 1, 2026
Merged

feat(mcp): add flomo built-in server and connection timeout#13928
kangfenmao merged 1 commit intomainfrom
feat/flomo-mcp

Conversation

@kangfenmao
Copy link
Copy Markdown
Collaborator

What this PR does

Before this PR:

  • flomo was not available as a built-in MCP server
  • MCP server activation had no connection timeout — if a server hung during startup, it would wait indefinitely

After this PR:

  • Adds flomo as the first built-in MCP server (streamableHttp transport via https://flomoapp.com/mcp), allowing users to capture notes and ideas through AI
  • Adds a 60-second connection timeout for all MCP server activations to prevent indefinite hangs

Why we need it and why it was done in this way

The following tradeoffs were made:

  • flomo is typed as inMemory (following the existing nowledgeMem pattern) with a special-case HTTP transport in MCPService, to maintain consistency with the current built-in server architecture
  • The 60s timeout wraps both initTransport() and client.connect() via Promise.race, covering the full connection lifecycle without modifying the MCP SDK internals

The following alternatives were considered:

  • Using streamableHttp type directly for flomo — rejected because BuiltinMCPServer type requires inMemory
  • Per-step timeouts (separate for transport init and connect) — rejected in favor of a simpler single timeout for the entire flow

Breaking changes

None.

Special notes for your reviewer

  • The nowledgeMem and flomo HTTP transport special cases have been consolidated into a single code block with a URL map for cleaner handling
  • i18n strings added for en-us, zh-cn, zh-tw; other locales synced via pnpm i18n:sync

Checklist

Release note

Add flomo as a built-in MCP server for capturing notes and ideas via AI. Add 60-second connection timeout for MCP server activation to prevent indefinite hangs.

@DeJeune DeJeune added the ready-to-merge This PR has sufficient reviewer approvals but is awaiting code owner approval. label Apr 1, 2026
@kangfenmao kangfenmao merged commit 022b338 into main Apr 1, 2026
5 checks passed
@kangfenmao kangfenmao deleted the feat/flomo-mcp branch April 1, 2026 04:28
@kangfenmao kangfenmao mentioned this pull request Apr 2, 2026
4 tasks
kangfenmao added a commit that referenced this pull request Apr 3, 2026
### What this PR does

Before this PR:
- flomo was not available as a built-in MCP server
- MCP server activation had no connection timeout — if a server hung
during startup, it would wait indefinitely

After this PR:
- Adds flomo as the first built-in MCP server (streamableHttp transport
via `https://flomoapp.com/mcp`), allowing users to capture notes and
ideas through AI
- Adds a 60-second connection timeout for all MCP server activations to
prevent indefinite hangs

### Why we need it and why it was done in this way

The following tradeoffs were made:
- flomo is typed as `inMemory` (following the existing `nowledgeMem`
pattern) with a special-case HTTP transport in MCPService, to maintain
consistency with the current built-in server architecture
- The 60s timeout wraps both `initTransport()` and `client.connect()`
via `Promise.race`, covering the full connection lifecycle without
modifying the MCP SDK internals

The following alternatives were considered:
- Using `streamableHttp` type directly for flomo — rejected because
`BuiltinMCPServer` type requires `inMemory`
- Per-step timeouts (separate for transport init and connect) — rejected
in favor of a simpler single timeout for the entire flow

### Breaking changes

None.

### Special notes for your reviewer

- The `nowledgeMem` and `flomo` HTTP transport special cases have been
consolidated into a single code block with a URL map for cleaner
handling
- i18n strings added for en-us, zh-cn, zh-tw; other locales synced via
`pnpm i18n:sync`

### Checklist

- [x] PR: The PR description is expressive enough and will help future
contributors
- [x] Code: [Write code that humans can
understand](https://en.wikiquote.org/wiki/Martin_Fowler#code-for-humans)
and [Keep it simple](https://en.wikipedia.org/wiki/KISS_principle)
- [x] Refactor: You have [left the code cleaner than you found it (Boy
Scout
Rule)](https://learning.oreilly.com/library/view/97-things-every/9780596809515/ch08.html)
- [x] Upgrade: Impact of this change on upgrade flows was considered and
addressed if required
- [x] Documentation: A [user-guide update](https://docs.cherry-ai.com)
was considered and is present (link) or not required. Check this only
when the PR introduces or changes a user-facing feature or behavior.
- [x] Self-review: I have reviewed my own code (e.g., via
[`/gh-pr-review`](/.claude/skills/gh-pr-review/SKILL.md), `gh pr diff`,
or GitHub UI) before requesting review from others

### Release note

```release-note
Add flomo as a built-in MCP server for capturing notes and ideas via AI. Add 60-second connection timeout for MCP server activation to prevent indefinite hangs.
```
kangfenmao added a commit that referenced this pull request Apr 3, 2026
### What this PR does

This is a release PR for Cherry Studio v1.9.0-rc.0.

**Changes included:**
- Bumped version from 1.8.4 to 1.9.0-rc.0
- Updated bilingual release notes in `electron-builder.yml`

**Release Notes Summary:**

✨ New Features
- CherryClaw autonomous agent type with personality-driven scheduling,
Telegram integration, and sandbox mode
- Terminal-style syntax highlighting for shell tool outputs
- Flomo MCP integration for note capture
- rtk token optimization (60-90% reduction) for agent shell commands
- Improved agent tool rendering with syntax-highlighted diffs and file
icons
- AI-powered error diagnosis with classification and guided resolution
- Topics list now respects pinTopicsToTop setting
- Added endpoint option for aionly provider

🐛 Bug Fixes
- new-api provider now uses configured host for Anthropic format
requests
- Claude Code sessions now respect proxy settings for child processes
- Code tool validates working directory before launch
- Fixed epub embedding failure
- Fixed KaTeX backslash corruption in Notes editor
- Fixed thinking time display race condition
- Fixed Poe provider model loading
- Fixed kimi-cli crash when uv binary not found
- Fixed invalid env variable names for providers with dots in name
- Fixed NVIDIA provider reasoning parameters for
Qwen/DeepSeek/Kimi/Zhipu
- Fixed Google Gemini web search for API-fetched models
- Fixed Qwen3.5 model detection for 3.9 series
- Fixed backup file size regression

💄 Improvements
- Fixed macOS traffic light alignment

⚡ Performance
- Optimized backup compression level for faster backups

### Checklist

- [x] Review generated release notes in `electron-builder.yml`
- [x] Verify version bump in `package.json`
- [ ] CI passes
- [ ] Merge to trigger release build

### Included Commits

52 commits since v1.8.4, including:
- feat(agents): add CherryClaw autonomous agent type (#13359)
- feat: add AI-powered error diagnosis and guided resolution (#13894)
- feat: integrate rtk for reducing LLM token consumption (#13615)
- feat(mcp): add flomo built-in server (#13928)
- fix: resolve CherryIN supported_endpoint_types not being detected
- fix: use configured host for new-api anthropic format requests
(#13724)
- fix(agents): route Claude Code child process through proxies (#13895)
- fix: migrate epub to v2 async api (#13939)
- fix(notes): prevent KaTeX backslash corruption (#13910)
- fix(ThinkingBlock): prevent race condition in thinking time display
(#13934)
- fix(models): strip `models/` prefix from Google API model IDs (#13861)
- perf(backup): adjust compression level for speed optimization (#13882)
- And 40 more bug fixes and improvements

---------

Co-authored-by: SuYao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has sufficient reviewer approvals but is awaiting code owner approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants