sncro
sncro-relay
sncroのオープンソースコンポーネント — MCPリレー、ブラウザ側エージェント、およびAIコーディングアシスタントがライブブラウザを検査できるようにするフレームワークプラグインです。
このリポジトリの内容
パス | 内容 |
| MCPサーバーとagent.js用のロングポーリングエンドポイントを公開するFastAPIアプリ |
| ミドルウェアによって注入されるブラウザ側スクリプト。コンソールとDOMデータをリレーにプッシュします |
| FastAPI / Starletteプラグイン — FastAPIアプリ用のドロップインミドルウェア |
| Flaskプラグイン — Flaskアプリ用のドロップインミドルウェア |
|
|
Related MCP server: agnt
仕組み
┌──────────────┐ MCP ┌──────────┐ long-poll ┌─────────────┐
│ Claude Code │──tools────▶│ relay │◀──────────────│ agent.js │
│ (or other │ │ (relay/) │ snapshots │ (injected │
│ MCP client) │◀──results──│ │──────────────▶│ by plugin) │
└──────────────┘ └──────────┘ └─────────────┘
▲
│ same-origin
│ cookies
┌─────────────┐
│ your app │
│ (plugin is │
│ installed) │
└─────────────┘Claudeが
create_session(MCPツール) を呼び出す → リレーが9桁のセッションキーとURLを返すユーザーがアプリを実行しているブラウザでそのURLにアクセスし、「sncroデバッグを許可しますか?」を確認する
プラグインがクッキーをドロップし、そのオリジンへの後続のHTMLレスポンスにagent.jsが注入される
agent.jsがベースラインデータ (コンソール、エラー) をプッシュし、オンデマンドクエリ (
query_element,get_page_snapshotなど) をロングポーリングする
sncroの使用方法
ほとんどのユーザーは自分でリレーを実行する必要はありません。relay.sncro.net でホストされているバージョンは無料枠で利用可能です。sncro.net でプロジェクトを登録し、プロジェクトキーを取得してください。
FastAPI: middleware/sncro_middleware.py をプロジェクトに配置し、以下のようにします:
from middleware.sncro_middleware import SncroMiddleware, sncro_routes
app = FastAPI(debug=True) # sncro only loads when debug=True
if app.debug:
app.include_router(sncro_routes)
app.add_middleware(SncroMiddleware, relay_url="https://relay.sncro.net")Flask: middleware/sncro_flask.py をプロジェクトに配置し、以下のようにします:
from sncro_flask import init_sncro
app = Flask(__name__)
if app.debug:
init_sncro(app, relay_url="https://relay.sncro.net")どちらのミドルウェアもデバッグモードでのみアクティブになり、本番環境でのオーバーヘッドはゼロです。
コントリビューション
新しいフレームワークプラグインを歓迎します。CONTRIBUTING.md に、プラグインが実行すべきこと(クッキー、ルート、セキュリティヘッダー)とテストテンプレートの完全な仕様が記載されています。Django、Rails、Express、Next.js、ASP.NET、Goなど、すべて歓迎します。
バグ報告やセキュリティの問題については、SECURITY.md を参照してください。
ライセンス
MIT。LICENSE を参照してください。
sncro.net のダッシュボード(プロジェクト管理、請求、管理)は、別のプロプライエタリなリポジトリにあります。
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
Monitoring + status pages set up by talking to Claude. Auto-detects 30+ SDKs and your URLs.
AI visibility & recommendation monitoring for ChatGPT, Claude, Gemini & Perplexity.
Screenshot, PDF and HTML-to-image rendering API so Claude and Cursor can see any web page.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to debug frontend applications by providing direct access to browser DevTools, React state, DOM inspection, and runtime debugging capabilities. Bridges the gap between AI and complex web applications for autonomous debugging and issue resolution.MIT
- AlicenseNot gradedqualityAmaintenanceBridges AI coding agents with the browser to provide visual debugging, real-time error capture, screenshot capabilities, DOM inspection, and interactive wireframing through a reverse proxy with injected developer tools.34 npm21Apache 2.0
- FlicenseNot gradedqualityCmaintenanceGives AI coding assistants live, structured access to running apps' state and UI elements, enabling real-time verification and interaction across web, mobile, and desktop.36-
- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents to visually interact with frontend apps by taking screenshots, clicking elements, reading console logs, and performing visual diffs.12 npm3MIT