# LangTrack for developers

> Connect AI assistants and tools to LangTrack: the MCP server, OAuth 2.1 with scoped permissions (read, write, offline_access), OpenAPI and self-serve client registration.

Connect an AI assistant or your own tool to a LangTrack account. It can read a learner's progress and log study sessions, with OAuth sign-in and scoped permissions.

## When to use LangTrack

- An assistant should know how much time someone has spent on a language: totals, this week against last week, time per activity, their streak, or how close they are to today's goals.
- A user says something like "I just watched 40 minutes of a Korean drama" or "log 20 minutes of Anki" and wants it written down without opening an app.
- You are building a study coach that reads someone's hours and adjusts their daily goals.
- Someone wants show, book or podcast suggestions in the language they learn, at their level (`search_catalog`).

LangTrack records time, not lessons. It doesn't teach, translate or grade. Use it for the log, the goals and the totals.

## MCP server

- **Endpoint:** `https://app.langtrack.app/api/mcp` (Streamable HTTP, JSON-RPC 2.0)
- **Setup guides** for Claude, ChatGPT and other clients: [app.langtrack.app/en/mcp](https://app.langtrack.app/en/mcp)

| Tool | What it does | Scope |
| --- | --- | --- |
| `get_learning_summary` | Totals, today and this week against last week, the last 30 days, streak, today's rings, and per-language totals with levels | `read` |
| `compare_study_periods` | Two periods side by side, in total or by language, activity or day | `read` |
| `activity_breakdown` | Time per activity and ring, optionally by hour of day | `read` |
| `list_languages`, `get_streak`, `recent_sessions`, `get_goals` | Languages and levels, the streak, recent sessions, daily goals | `read` |
| `search_catalog` | Curated shows, anime, books and podcasts by language and level | `read` |
| `log_study_session` | Log minutes in a language and activity; they count toward the streak and rings | `write` |
| `delete_session` | Undo a session this connection logged in the last 7 days | `write` |
| `set_daily_goals` | Change the daily goals from today on | `write` |

## Authentication and scopes

Access uses OAuth 2.1: the authorization code flow with PKCE (`S256`). It's self-serve: register your client with Dynamic Client Registration (RFC 7591) at `https://app.langtrack.app/api/oauth/register`. There is no API key to apply for and nobody to contact first.

| Scope | Allows |
| --- | --- |
| `read` | Reading progress: totals, streak, rings, goals, languages, recent sessions and the catalog |
| `write` | Logging sessions, deleting sessions the same connection logged, and changing daily goals |
| `offline_access` | A refresh token, so the connection keeps working without signing in again |

Ask only for what you need. On the consent screen the learner can approve reading without logging, and they can disconnect any app later in Settings → Connected apps.

- **Protected resource metadata (RFC 9728):** [/.well-known/oauth-protected-resource/api/mcp](https://app.langtrack.app/.well-known/oauth-protected-resource/api/mcp)
- **Authorization server metadata (RFC 8414):** [/.well-known/oauth-authorization-server](https://app.langtrack.app/.well-known/oauth-authorization-server)

## Machine-readable descriptions

- **OpenAPI 3.1** with the OAuth security scheme and its scopes: [app.langtrack.app/openapi.json](https://app.langtrack.app/openapi.json)
- **API catalog (RFC 9727):** [langtrack.app/.well-known/api-catalog](https://langtrack.app/.well-known/api-catalog)
- **llms.txt:** [langtrack.app/llms.txt](https://langtrack.app/llms.txt) and [app.langtrack.app/llms.txt](https://app.langtrack.app/llms.txt)
- **Markdown:** every page on this site is also available as Markdown: add `.md` to the path (for example [/developers.md](https://langtrack.app/developers.md)).

## Cost, limits and testing

- **Free:** any LangTrack account can connect, including the free plan, and no card is needed.
- **Limits:** 120 MCP requests a minute per account and 300 per IP address. Client registration is limited to 10 an hour per IP address.
- **Testing:** there is no separate sandbox. Create a free account to test with. Sessions your client logs can be undone with `delete_session` for 7 days, or deleted in the app.

## Questions

A REST API beyond the MCP server is being considered. If you'd build on one, or something here doesn't work, write to [contact@langtrack.app](mailto:contact@langtrack.app).

---

[HTML version](https://langtrack.app/developers) · [LangTrack](https://langtrack.app/) · [About](https://langtrack.app/about) · [Developers](https://langtrack.app/developers) · [llms.txt](https://langtrack.app/llms.txt)
