🚀 TMA DevKit v2: Local Emulator for Telegram Mini Apps + MCP AI Debugging
😤 The Problem That Drives Everyone Crazy Ever tried building a Telegram Mini App? Write your code. Spin up ngrok (and pray it doesn't crash). Go to @BotFather, paste the tunnel URL. Grab your phone, open the bot, type console.log() — and pray again. Repeat for every theme, platform, and user type you need to test. It's 2015, folks. And there's still no official emulator. "The main difficulty is the inability to run a project as easily as in a browser via localhost — and the absence of a developer console." — Habr, March 2025 💡 Introducing: TMA DevKit A local emulator and bridge inspector for Telegram Mini Apps. Think Redux DevTools, but for window.Telegram.WebApp. In one sentence: paste your Mini App URL into the panel, and it runs inside an iframe with a full emulation of the Telegram client — no phone, no ngrok, no BotFather. ✨ What DevKit v2 Can Do (and Why It's Awesome) 🧠 MCP Server for AI-Powered Debugging — Brand New! Connect any AI assistant (Claude, GPT, local models) via the Model Context Protocol. Ask questions about your app's state, event flow, or initData validation — and get instant debugging suggestions. 🔧 A Real Mock, Not a Stub Full window.Telegram.WebApp API surface (all methods, properties, events). Cryptographically valid initData generation with HMAC-SHA-256 signature using your bot token. Backend validation passes as in production. Compatible with @telegram-apps/sdk v3 out of the box. ⚡ 5 One‑Click Quick Scenarios Scenario Description iOS Premium iPhone user with Premium subscription Android Free Regular Android user New User With referral parameter Group Launch Emulates opening from a group chat Desktop Wide viewport on computer Switch contexts in seconds — no manual input. 📊 Bridge Event Inspector All web_app_* calls displayed in real time. Group by type, filter, pause, export logs as .txt. emit console to fire client → app events (theme_changed, main_button_pressed, etc.). ☁️ CloudStorage Editor Visual key‑value editor. No more guessing what