An MCP (Model Context Protocol) server that provides tools for interacting with a Memos instance. This server allows AI assistants to search, create, and update memos through the Memos API.
- Search Memos: Search for memos with filters like creator, tags, visibility, and content
- Create Memos: Create new memos with markdown support
- Update Memos: Update existing memos (content, visibility, pinned status)
- Get Memo: Retrieve a specific memo by UID
- Clone this repository:
git clone <repository-url>
cd memos_mcp- Install dependencies:
uv syncpip install -r requirements.txtSet the following environment variables:
MEMOS_BASE_URL: The base URL of your Memos instance (default:http://localhost:5230)MEMOS_API_TOKEN: Your Memos API authentication token (optional for public instances)
- Log into your Memos instance
- Go to Settings → Access Tokens
- Create a new access token
- Copy the token and set it as the
MEMOS_API_TOKENenvironment variable
Example:
export MEMOS_BASE_URL="https://memos.example.com"
export MEMOS_API_TOKEN="your-token-here"# Run directly with uvx
uvx --from . memos-mcp# After running 'uv sync'
uv run memos-mcpfastmcp run server.pyfrom server import mcp
# The server is ready to useSearch for memos with optional filters.
Parameters:
query(optional): Text to search for in memo contentcreator_id(optional): Filter by creator user IDtag(optional): Filter by tag namevisibility(optional): Filter by visibility (PUBLIC, PROTECTED, PRIVATE)limit(default: 10): Maximum number of resultsoffset(default: 0): Number of results to skip
Example:
result = await search_memos(query="meeting notes", limit=5)Create a new memo.
Parameters:
content: The content of the memo (supports Markdown)visibility(default: PRIVATE): Visibility level (PUBLIC, PROTECTED, PRIVATE)
Example:
result = await create_memo(
content="# Meeting Notes\n\n- Discuss project timeline\n- Review budget",
visibility="PRIVATE"
)Update an existing memo.
Parameters:
memo_uid: The UID of the memo to updatecontent(optional): New content for the memovisibility(optional): New visibility levelpinned(optional): Whether to pin the memo
Example:
result = await update_memo(
memo_uid="abc123",
content="Updated content",
pinned=True
)Get a specific memo by its UID.
Parameters:
memo_uid: The UID of the memo to retrieve
Example:
result = await get_memo(memo_uid="abc123")Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"memos": {
"command": "uvx",
"args": ["--from", "/path/to/memos_mcp", "memos-mcp"],
"env": {
"MEMOS_BASE_URL": "http://localhost:5230",
"MEMOS_API_TOKEN": "your-token-here"
}
}
}
}{
"mcpServers": {
"memos": {
"command": "uv",
"args": ["run", "--directory", "/path/to/memos_mcp", "memos-mcp"],
"env": {
"MEMOS_BASE_URL": "http://localhost:5230",
"MEMOS_API_TOKEN": "your-token-here"
}
}
}
}{
"mcpServers": {
"memos": {
"command": "python",
"args": ["-m", "fastmcp", "run", "/path/to/memos_mcp/server.py"],
"env": {
"MEMOS_BASE_URL": "http://localhost:5230",
"MEMOS_API_TOKEN": "your-token-here"
}
}
}
}This server is built on the Memos API v1. The API follows Google's API Improvement Proposals (AIPs) design guidelines.
GET /api/v1/memos- List/search memosPOST /api/v1/memos- Create a memoGET /api/v1/memos/{uid}- Get a specific memoPATCH /api/v1/memos/{uid}- Update a memo
The server supports Bearer token authentication. Include your access token in the Authorization header:
Authorization: Bearer your-token-here
pytestserver.py: Main MCP server implementation with all toolsrequirements.txt: Python dependencies
Memos is a lightweight, self-hosted memo hub with knowledge management and social networking features. Learn more at:
- Website: https://www.usememos.com/
- GitHub: https://github.com/usememos/memos
MIT License - see LICENSE file for details
Contributions are welcome! Please feel free to submit a Pull Request.