reflect-mcp
Enables AI assistants to create notes, save links, append to daily notes, and manage knowledge graphs in Reflect via the Reflect Notes API, with OAuth2 authentication and token management.
README
Reflect MCP Server
A Python MCP (Model Context Protocol) server that provides seamless integration with the Reflect Notes API. This server enables AI assistants to interact with your Reflect notes, allowing you to create notes, save links, append to daily notes, and manage your knowledge graph programmatically.
Features
- OAuth2 Authentication: Secure authentication flow with automatic token management
- Note Management: Create new notes with Markdown content
- Daily Notes: Append text to daily notes with optional list targeting
- Link Saving: Save web links with titles, descriptions, and highlights
- Graph Operations: List and manage multiple knowledge graphs
- User Management: Get current user information and default graph settings
Installation
Quick Start with uvx (Recommended)
No need to clone the repository! Simply configure and run:
{
"mcpServers": {
"reflect": {
"command": "uvx",
"args": ["reflect-mcp"],
"env": {
"REFLECT_ACCESS_TOKEN": "your_access_token_here"
}
}
}
}
To get your access token:
- Go to Reflect Developer OAuth
- Create credentials if you haven't already
- Generate an access token
- Copy the token and add it to the configuration above
Manual Installation
pip install reflect-mcp
Or with uv:
uv pip install reflect-mcp
Configuration
Using an Access Token (Recommended)
The simplest way to use the server is with a direct access token:
REFLECT_ACCESS_TOKEN=your_access_token_here
REFLECT_DEFAULT_GRAPH_ID=your_default_graph_id # Optional
To get your access token:
- Go to Reflect Developer OAuth
- Create credentials if you haven't already
- Generate an access token
- Copy the token and add it to your configuration
Using OAuth2 (Alternative)
If you prefer OAuth2 authentication:
REFLECT_CLIENT_ID=your_oauth_client_id
REFLECT_CLIENT_SECRET=your_oauth_client_secret
REFLECT_REDIRECT_URI=http://localhost:8080/callback # Optional
REFLECT_DEFAULT_GRAPH_ID=your_default_graph_id # Optional
Claude Desktop Configuration
Add the server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Using the published package with access token:
{
"mcpServers": {
"reflect": {
"command": "uvx",
"args": ["reflect-mcp"],
"env": {
"REFLECT_ACCESS_TOKEN": "your_access_token_here"
}
}
}
}
If running from source:
{
"mcpServers": {
"reflect": {
"command": "/path/to/uv",
"args": [
"--directory",
"/path/to/reflect-mcp",
"run",
"reflect_server.py"
],
"env": {
"REFLECT_ACCESS_TOKEN": "your_access_token_here"
}
}
}
}
Alternative OAuth2 configuration (if not using access token):
{
"mcpServers": {
"reflect": {
"command": "uvx",
"args": ["reflect-mcp"],
"env": {
"REFLECT_CLIENT_ID": "your_client_id",
"REFLECT_CLIENT_SECRET": "your_client_secret"
}
}
}
}
Available Tools
Authentication
authenticate- Start OAuth2 authentication flow (opens browser)set_access_token- Complete OAuth2 flow with authorization codeset_token_directly- Set access token manually (useful if you already have one)
Graphs
list_graphs- Get all accessible graphs with IDs, names, and timestampsget_default_graph- Get the default graph ID from configuration or user profile
Notes & Content
create_note- Create a new note with title and Markdown contentappend_daily_note- Append text to daily note (today or specific date)list_books- Get all books in a graphlist_links- Get all links in a graphcreate_link- Save a web link with optional metadata
User
get_current_user- Get information about the authenticated user
Authentication
Using Access Token (Recommended)
If you've configured the server with REFLECT_ACCESS_TOKEN, you're already authenticated and can start using all tools immediately.
Using OAuth2 Flow
If you're using OAuth2 credentials instead of a direct access token:
-
Start the authentication process:
authenticateThis opens your browser to the Reflect OAuth page.
-
After authorizing, you'll be redirected to a URL containing an authorization code.
-
Complete authentication by providing the code:
set_access_token code="your_authorization_code" -
The server will handle token exchange and refresh automatically.
Usage Examples
Create a Note
create_note(
subject="Meeting Notes",
content="## Project Review\n\n- Discussed timeline\n- Set Q2 goals",
pinned=false
)
Append to Daily Note
# Append to today's daily note
append_daily_note(
text="Remember to review the project proposal"
)
# Append to a specific list in yesterday's note
append_daily_note(
text="Completed user authentication feature",
date="2024-01-18",
list_name="Done"
)
Save a Link
create_link(
url="https://example.com/article",
title="Interesting Article",
description="Key insights about productivity",
highlights=["Important quote from the article", "Another highlight"]
)
List and Manage Graphs
# Get all accessible graphs
list_graphs()
# Get the default graph ID
get_default_graph()
# List all links in a specific graph
list_links(graph_id="your_graph_id")
Resources
The server provides these MCP resources for checking status:
- get_auth_status (
reflect://auth/status): Check current authentication status - get_config (
reflect://config): View current configuration (excluding secrets)
Prompts
Built-in workflow prompts for common tasks:
- create_reading_list: Template for creating organized reading lists in Reflect
- daily_journal_workflow: Structured template for daily journaling
Development
Running from Source
# Clone the repository
git clone https://github.com/yourusername/reflect-mcp
cd reflect-mcp
# Install dependencies
uv sync
# Run in development mode
uv run mcp dev reflect_mcp/server.py
Testing
# Run with MCP inspector for testing
uv run mcp inspector reflect_mcp/server.py
Building and Publishing
# Build the package
uv build
# Publish to PyPI (requires credentials)
uv publish
API Reference
The server implements the Reflect API v0.1.0 with the following endpoints:
GET /graphs- List all graphsGET /graphs/{id}/books- List books in a graphGET /graphs/{id}/links- List links in a graphPOST /graphs/{id}/links- Create a new linkPOST /graphs/{id}/notes- Create a new notePUT /graphs/{id}/daily-notes- Append to daily noteGET /users/me- Get current user info
Authentication
The Reflect API uses OAuth2 with the following flows:
- Authorization URL:
https://reflect.app/oauth - Token URL:
https://reflect.app/api/oauth/token - Scopes:
read:graph- Read access to protected resourceswrite:graph- Write access to protected resources
Troubleshooting
Authentication Issues
- Missing credentials: Ensure
REFLECT_CLIENT_IDandREFLECT_CLIENT_SECRETare set - Invalid redirect: Check that your OAuth app's redirect URI matches the server's expected callback
- Token refresh: The server automatically handles token refresh using the
authliblibrary
Connection Errors
- Verify your internet connection
- Check if the Reflect API is accessible at
https://api.reflect.app - Review server logs for detailed error messages
- Ensure your OAuth app has the necessary scopes enabled
Common Issues
-
"Server disconnected" error in Claude: Usually means the server couldn't start. Check:
- OAuth credentials are correctly set
- No syntax errors in configuration
- The
reflect_server.pyfile exists (if running from source)
-
"Not authenticated" errors: Run the
authenticatetool first to set up OAuth -
Graph ID errors: Use
list_graphsto find valid graph IDs, or setREFLECT_DEFAULT_GRAPH_ID
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details
Support
For issues and feature requests, please use the GitHub issue tracker.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。