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.
Recommended Servers
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.
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.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.