Connect to AI Assistants
FeynmanLM includes a built-in MCP (Model Context Protocol) server that lets Claude and ChatGPT access your flashcard knowledge base — searching cards, creating new ones, generating articles, and more.
How It Works
The MCP server runs locally on your Mac. A secure Cloudflare tunnel exposes it to the internet so Claude or ChatGPT can reach it. All data stays on your machine.
Getting Started
1. Install Dependencies
Open Terminal and install two tools:
brew install uv cloudflared- uv — runs the Python server
- cloudflared — creates a secure tunnel (no Cloudflare account needed)
2. Start the Server
In the FeynmanLM macOS app, go to Settings → MCP Server and click Start Server.
Or start it manually from Terminal:
cd /path/to/feynman-flashcards
./servers/start_mcp.shThe server starts up and prints the connection details:
MCP URL: https://abc123.trycloudflare.com/mcp
Client ID: feynman-mcp-a1b2c3d4
Client Secret: e5f6a7b8c9d0...Keep this terminal window open while you want the MCP to be accessible.
3. Copy Your Credentials
The MCP URL, Client ID, and Client Secret are shown both in Terminal and in the app's Settings → MCP Server section. Use the copy buttons in the app to grab them.
4. Connect Your AI Assistant
Using Sources with Your AI Assistant
In the macOS app, you can drag sources from your knowledge base into the MCP context. Once a source is in context, your connected AI assistant (Claude or ChatGPT) automatically picks it up via a tool call — no need to copy-paste text or upload files.
From there you can chat with your sources naturally:
- Ask questions about the content
- Compare ideas across multiple sources
- Get explanations of specific sections
- Debate the arguments or methodology
When you're done, you can export the results back into your knowledge system — as new flashcard proposals, explorable explanations, or articles. Everything stays connected to the original source.
What Your AI Assistant Can Do
Once connected, your AI assistant can:
| Tool | What it does |
|---|---|
list_decks | See all your flashcard decks |
search_cards | Find cards matching a pattern |
get_due_cards | See which cards are due for review |
create_flashcard | Propose a new flashcard |
create_flashcards_batch | Propose multiple cards at once |
list_sources | Browse your knowledge base |
get_source_content | Read source text |
draft_article | Generate an explainer article |
save_artifact | Save interactive explorable explanations |
Troubleshooting
Port already in use:
lsof -ti:8522 | xargs kill -9Missing dependencies:
brew install uv cloudflaredServer won't start: Make sure you have a .env file in the project root with at least ANTHROPIC_API_KEY set. The server auto-generates OAuth credentials if they're missing.
Tunnel URL changed: Quick tunnels generate a new URL each restart. Update the URL in your AI assistant's settings after restarting.