NotesUpdated November 28, 2026

Building a Free MCP Server for Language Learning

Maxime Peabody

Maxime Peabody

Founder

Many language learners already practice inside ChatGPT or Claude. The friction is state: every new conversation forgets which words they know, which words they keep looking up, and which grammar patterns actually have evidence behind them.

We built Fabling’s free MCP server so a learner’s Spanish and French record can travel across compatible assistants without trapping them in one chat window or charging per saved word.

One learning service behind MCP and REST

Our endpoint at https://fabling.app/api/mcp runs stateless Streamable HTTP inside the same Next.js app that powers Fabling. Every request creates a fresh McpServer instance bound to the authenticated member, so one learner’s state can never leak across requests.

Six tools share one Zod schema and authorization layer with our OpenAPI 3.1 REST endpoints:

  • get_learning_context, get_vocabulary, and get_grammar_focus for reading current evidence.
  • save_vocabulary for explicit learner corrections (up to 20 resolved lemmas per atomic batch).
  • record_practice and update_practice_focus for saving brief practice observations and next-session focus.

Scoped OAuth, not pasted API keys

Early integrations often ask people to copy a personal API key into a prompt or settings box. That gives every tool full access and leaves credentials sitting in chat history.

Fabling exposes OAuth 2.1 authorization code flow with S256 PKCE, Dynamic Client Registration, and 30-day rotating refresh tokens whose replay revokes the grant. On the consent screen, only learning:read is checked by default. Writing word corrections (vocabulary:write) and logging practice (practice:write) require separate approval, and the server checks revocation inside every write transaction.

Honest evidence over inflated CEFR labels

When someone finishes onboarding, an app often seeds an assumed vocabulary around their chosen level. If an MCP server treated those seeded guesses as verified knowledge, an assistant would assume mastery that was never tested.

get_learning_context recalculates vocabulary and grammar bands from observed evidence and reports onboarding assumptions separately. When records are thin, the suggested practice level stays conservative and carries an explicit provisional: true flag. We saw this matter during our live ChatGPT read test: the model spotted a partial-band mismatch and explained the uncertainty instead of lecturing at the wrong level.

Idempotency and prompt-injection boundaries

Assistants retry tool calls when networks hiccup. Every write operation requires a client-generated UUID actionId. The service serializes mutations per learner, stores the outcome in the same database transaction, returns the original response on identical retries, and rejects mismatched inputs with a 409 conflict.

Two guardrails keep external chats from corrupting native learning state: stored 240-character practice notes are labeled as untrusted data rather than instructions, and external practice is marked unverified so it never advances spaced-repetition schedules or certifies grammar mastery.

You can inspect the public MCP server card, try the Claude setup guide, or follow the ChatGPT setup guide.

Maxime Peabody

About the Author: Maxime Peabody

Founder

Building Fabling to bring personalized stories, listening, vocabulary review, and speaking practice together in Spanish and French.

Try a free story

Your first personalized story is free. No card needed.

Questions

Where is Fabling’s MCP server hosted?
The remote Streamable HTTP endpoint runs at https://fabling.app/api/mcp inside the existing Next.js application, backed by the same PostgreSQL learning tables as the web and mobile apps.
Why use OAuth 2.1 instead of pasting an API key?
OAuth with S256 PKCE lets a learner grant read-only access by default and add vocabulary or practice write permissions separately, without pasting a long-lived secret into a chat prompt.
Can developers inspect the schema without authenticating?
Yes. The public MCP server card at /.well-known/mcp/server-card.json and the OpenAPI 3.1 document at /api/connect/openapi publish tool schemas and scope requirements without exposing member data.