MCP server

BaiShou can start an MCP service on your machine that exposes its diary, memory, and retrieval tools so MCP-capable clients can call them directly.

To click through the UI, see Turn on MCP. This page is the URL, tool list, and troubleshooting reference.

Get the direction straight first: BaiShou is the MCP server. It offers its own capabilities to external AI; it isn’t a way to connect to someone else’s MCP servers. That’s why there’s nowhere in BaiShou to fill in mcpServers — that part lives on the client side.

Desktop and Android both support it, and on both the BaiShou app has to stay running.

Turning it on

Go to Settings → MCP Service and switch on Enable MCP Server.

ItemNotes
Port31004 by default; you can use any port between 1000 and 65535. The dev build defaults to 31005 so it doesn’t collide with the release build
Connection URLhttp://127.0.0.1:31004/mcp
Access TokenGenerated automatically the first time you enable it; you can hit refresh to regenerate at any point

The settings page shows both the local address and the LAN address. Clients on the same machine use 127.0.0.1; other devices connecting in use the LAN IP.

Configuring your client

Taking Cursor as the example, edit ~/.cursor/mcp.json (on Windows, %USERPROFILE%\.cursor\mcp.json). For the click-through, see Connect Cursor.

{
  "mcpServers": {
    "baishou": {
      "url": "http://127.0.0.1:31004/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_ACCESS_TOKEN"
      }
    }
  }
}

Copy the token from BaiShou’s settings page. If you changed the port, change the URL to match; to reach BaiShou on your phone, swap the host for the phone’s IP.

Other MCP clients keep their config files elsewhere, but there are only two things to fill in: a URL ending in /mcp, plus an Authorization: Bearer header.

Which tools get exposed

There are 14 of them, and their external names all carry the baishou_ prefix.

Tool nameWhat it doesMain parameters
baishou_diary_readReads full diaries by date, up to 20 at a timedates
baishou_diary_writeCreates a new diary on a given datedate, content, tags
baishou_diary_editAppends to or overwrites an existing diarydate, content, mode
baishou_diary_deleteDeletes the diary on a given datedate
baishou_diary_listLists the days with diaries in a date range, with previewsstart_date, end_date
baishou_diary_searchFull-text keyword search over diariesquery, limit
baishou_summary_readReads weekly journals, monthly reports, quarterly reports, and yearbookstype, start_date
baishou_message_searchKeyword search over past messages across sessionsquery, limit
baishou_vector_searchSemantic or hybrid retrieval over memoriesquery, mode, min_score
baishou_memory_storeWrites into long-term memorycontent, tags
baishou_memory_deleteFinds memories and then deletes themquery
baishou_web_searchWeb search, 1 to 3 queries per callqueries
baishou_url_readFetches the body text of a given pageurl, query
baishou_current_timeGets the real current timenone

External clients and BaiShou’s own companions use the same set of tools, so the behavior is identical.

Sending stickers and context compression are internal tools and aren’t exposed.

Fewer tools than you expected?

The tools an external client sees are filtered dynamically, based directly on your settings in BaiShou:

  • Anything you turned off under Settings → Tool management won’t show up over MCP either.
  • With RAG off or no embedding model configured, baishou_vector_search and baishou_memory_store disappear.
  • If the web search toggle in the session toolbar is off, baishou_web_search isn’t exposed.
  • baishou_current_time can’t be turned off, so it’s always there.

Also, MCP always operates on the currently active workspace. Switch workspaces and the data your external client reads switches with it.

Troubleshooting

SymptomWhat to check
Can’t connectIs BaiShou running? Does the address end in /mcp? Is the port taken by another program or blocked by the firewall?
401Is the token right? If you refreshed it, the client needs updating too
No tools at allIs the MCP switch actually on?
A few tools missingSee the dynamic filtering rules in the section above
Can’t connect over the LANUse the LAN IP rather than 127.0.0.1, and confirm both devices are on the same network
No MCP option on the phoneYou need a release APK that includes the native module; it doesn’t work inside Expo Go

Security