Skip to content

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:

bash
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 SettingsMCP Server and click Start Server.

Or start it manually from Terminal:

bash
cd /path/to/feynman-flashcards
./servers/start_mcp.sh

The 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:

ToolWhat it does
list_decksSee all your flashcard decks
search_cardsFind cards matching a pattern
get_due_cardsSee which cards are due for review
create_flashcardPropose a new flashcard
create_flashcards_batchPropose multiple cards at once
list_sourcesBrowse your knowledge base
get_source_contentRead source text
draft_articleGenerate an explainer article
save_artifactSave interactive explorable explanations

Troubleshooting

Port already in use:

bash
lsof -ti:8522 | xargs kill -9

Missing dependencies:

bash
brew install uv cloudflared

Server 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.