{"slug": "tma-devkit-v2-local-emulator-for-telegram-mini-apps-mcp-ai-debugging", "title": "TMA DevKit v2: Local Emulator for Telegram Mini Apps + MCP AI Debugging", "summary": "A developer released TMA DevKit v2, a local emulator and bridge inspector for Telegram Mini Apps that runs apps in an iframe with full Telegram client emulation, eliminating the need for ngrok, BotFather, and physical devices. The update adds an MCP server for AI-powered debugging, a cryptographically valid initData mock, one-click scenario presets, and a bridge event inspector. The project is open-source under MIT and actively developed.", "body_md": "😤 The Problem That Drives Everyone Crazy\n\nEver tried building a Telegram Mini App?\n\n```\n    Write your code.\n\n    Spin up ngrok (and pray it doesn't crash).\n\n    Go to @BotFather, paste the tunnel URL.\n\n    Grab your phone, open the bot, type console.log() — and pray again.\n\n    Repeat for every theme, platform, and user type you need to test.\n```\n\nIt's 2015, folks. And there's still no official emulator.\n\n```\n\"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.\"\n— Habr, March 2025\n```\n\n💡 Introducing: TMA DevKit\n\nA local emulator and bridge inspector for Telegram Mini Apps. Think Redux DevTools, but for window.Telegram.WebApp.\n\nIn 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.\n\n✨ What DevKit v2 Can Do (and Why It's Awesome)\n\n🧠 MCP Server for AI-Powered Debugging — Brand New!\n\nConnect 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.\n\n🔧 A Real Mock, Not a Stub\n\n```\nFull window.Telegram.WebApp API surface (all methods, properties, events).\n\nCryptographically valid initData generation with HMAC-SHA-256 signature using your bot token.\n\nBackend validation passes as in production.\n\nCompatible with @telegram-apps/sdk v3 out of the box.\n```\n\n⚡ 5 One‑Click Quick Scenarios\n\nScenario Description\n\niOS Premium iPhone user with Premium subscription\n\nAndroid Free Regular Android user\n\nNew User With referral parameter\n\nGroup Launch Emulates opening from a group chat\n\nDesktop Wide viewport on computer\n\nSwitch contexts in seconds — no manual input.\n\n📊 Bridge Event Inspector\n\n```\nAll web_app_* calls displayed in real time.\n\nGroup by type, filter, pause, export logs as .txt.\n\nemit console to fire client → app events (theme_changed, main_button_pressed, etc.).\n```\n\n☁️ CloudStorage Editor\n\nVisual key‑value editor. No more guessing what's stored or messing with localStorage manually.\n\n💾 Saved Presets\n\nSave your current config (platform, user, theme, viewport, bot token) as a named preset. Switch between them in one click — persists across sessions.\n\n🖥️ Polished Panel UX\n\n```\nResizable panels (like VS Code).\n\nZoomable device stage (25%–200%).\n\nMobile notch and desktop traffic lights react to platform selection.\n\nImport/export config as JSON.\n```\n\n🧰 Tech Stack\n\nComponent Technology\n\nFrontend React 19, TypeScript, Vite\n\nStyling Tailwind CSS, shadcn/ui\n\nMock Script ~90 KB of vanilla JS, zero dependencies\n\nTesting 22+ Vitest tests (base64url, config, protocol, events)\n\nLicense MIT\n\n🎯 What's Next?\n\nThe project is under active development. Planned:\n\n```\nMore scenario presets.\n\nEnhanced MCP integration with pre‑built prompts.\n\nVS Code plugin.\n```\n\n🔗 Links\n\n```\nGitHub: github.com/Deus-org/tma-devkit\n\nLive Demo (if available) — add your link or a screenshot.\n```\n\n👋 Call to Action\n\nIf you've ever built a TMA, I'd really appreciate:\n\n```\nFeedback on the README (is it clear?).\n\nFeature suggestions.\n\nBug reports (open an issue on GitHub).\n```\n\n⭐️ Star the repo if you find it useful — it helps a ton!\n\nBuilt by a developer who got tired of debugging on a phone.\n\nLet's make TMA development better together! 🚀", "url": "https://wpnews.pro/news/tma-devkit-v2-local-emulator-for-telegram-mini-apps-mcp-ai-debugging", "canonical_source": "https://dev.to/dl1ar/tma-devkit-v2-local-emulator-for-telegram-mini-apps-mcp-ai-debugging-5ekb", "published_at": "2026-08-01 21:02:41+00:00", "updated_at": "2026-08-01 21:43:39.708031+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["TMA DevKit", "Telegram", "MCP", "Claude", "GPT", "React", "TypeScript", "Vite"], "alternates": {"html": "https://wpnews.pro/news/tma-devkit-v2-local-emulator-for-telegram-mini-apps-mcp-ai-debugging", "markdown": "https://wpnews.pro/news/tma-devkit-v2-local-emulator-for-telegram-mini-apps-mcp-ai-debugging.md", "text": "https://wpnews.pro/news/tma-devkit-v2-local-emulator-for-telegram-mini-apps-mcp-ai-debugging.txt", "jsonld": "https://wpnews.pro/news/tma-devkit-v2-local-emulator-for-telegram-mini-apps-mcp-ai-debugging.jsonld"}}