TLang ships a Model Context Protocol server that gives AI coding assistants — Claude, Cursor, GitHub Copilot, and others — full access to TLang's compiler, runtime, and embedded documentation. The MCP server turns any MCP-compatible assistant into a TLang-aware pair programmer.
tlang mcp-server
The server communicates over stdin/stdout using JSON-RPC 2.0, following the MCP 2024-11-05 specification. Connect it to your AI assistant using the assistant's MCP configuration. Example configuration for Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"tlang": {
"command": "tlang",
"args": ["mcp-server"]
}
}
}
The MCP server exposes a set of tools that mirror the TLang CLI. The assistant can call these tools directly during a conversation:
When a project context is active, the server also exposes dynamic tools derived from the project's exposed functions, allowing the assistant to call specific generators directly.
The MCP server exposes embedded documentation as resources the assistant can read to understand TLang before generating code:
These resources are served directly from the binary — no internet connection required.
The MCP server provides a ready-made system prompt for AI assistants. When connected, the assistant automatically receives context about:
This eliminates the need to paste TLang documentation into every conversation. The assistant starts with full context.
The intended workflow with TLang and an AI assistant:
The AI does the creative work (understanding your domain and writing the template) once. TLang handles the mechanical work (generating the same pattern across all entities) at zero additional AI cost. A project with 200 entities costs the same in AI tokens as a project with 2 — because the AI writes one template, not 200 files.
Use the set_project_context tool to point the MCP server at a TLang project:
# In the assistant conversation:
# "Set the project context to my-app/"
Once set, the server indexes the project and exposes its exposed functions as dynamic tools. The assistant can then call your project's generators directly without writing any CLI commands.