Singularity - MCP Discovery & Security Gateway について
Singularityは、チームの課題に合うツールを見つけて評価するためのMCPディスカバリー・セキュリティゲートウェイです。候補を順位付けし、信頼性とセキュリティ情報を示し、監査可能なゲートウェイを介して選定を支援します。
主な機能
- 01課題への適合度でツールを順位付け
- 02信頼性・セキュリティレポートの表示
- 03候補ツールの比較
- 04プロンプトインジェクションと権限リスクの検出
- 05ゲートウェイの操作監査
活用シーン
- 01チームの課題に合うツールを探す
- 02接続前に権限と公開者の状態を確認する
- 03候補ツールの信頼性情報を比較する
MCP 対応
Singularityは、`/mcp`でストリーミングHTTP経由のステートレスなMCPサーバーとして動作します。ソリューション検索、信頼性レポートの取得、ツール比較のツールを公開します。
設定
リモートサーバーはインストール不要です。クライアントを選んで設定をコピーするか、ワンクリックで導入できます。
https://singularity-osd2.onrender.com/mcpclaude mcp add --transport http gaurav-kumar-sinha-060705-singularity https://singularity-osd2.onrender.com/mcp{"mcpServers":{"gaurav-kumar-sinha-060705-singularity":{"type":"http","url":"https://singularity-osd2.onrender.com/mcp"}}}Cursor で開く{"servers":{"gaurav-kumar-sinha-060705-singularity":{"type":"http","url":"https://singularity-osd2.onrender.com/mcp"}}}VS Code で開く{"mcpServers":{"gaurav-kumar-sinha-060705-singularity":{"type":"http","url":"https://singularity-osd2.onrender.com/mcp"}}}{"mcpServers":{"gaurav-kumar-sinha-060705-singularity":{"serverUrl":"https://singularity-osd2.onrender.com/mcp"}}}コマンドはターミナルで実行し、JSON は各クライアントの MCP 設定に貼り付けて再起動します。認可が必要なサーバーは初回接続時にログインを求めます。
ツール
詳細
Singularity — MCP ディスカバリー&セキュリティゲートウェイ
MCP の Perplexity。 問題に合ったツールを見つけ、信頼カード (プロンプトインジェクションのリスク、権限の過剰要求、公開元のステータス)を確認し、ワンクリックで接続して、安全で監査可能なゲートウェイを通じて実行できます。1 つの製品、1 つの設定で実現します。
全体の計画については ROADMAP.md をご覧ください。設計書:../Singularity_Blueprint.md。
クイックスタート(ローカル)
pip install -r requirements.txt
copy .env.example .env # optional, defaults are fine (SQLite)
python scripts/seed_index.py # builds index + embeddings (first run downloads ~35MB model)
python -m uvicorn app.main:app --reload # http://127.0.0.1:8000/docs
データベースが空の状態で初回起動すると、自動的に初期データが投入されます。手動で再投入する場合にのみ seed_index.py が必要です。
Singularity を MCP サーバーとして使う
Singularity は /mcp で動作するネイティブ MCP サーバーです(ストリーミング可能な HTTP、ステートレス)。
VS Code / Copilot Chat — .vscode/mcp.json:
{ "servers": { "singularity": { "type": "http", "url": "http://127.0.0.1:8000/mcp" } } }
Cursor — ~/.cursor/mcp.json:
{ "mcpServers": { "singularity": { "url": "http://127.0.0.1:8000/mcp" } } }
Claude Code CLI:
claude mcp add --transport http singularity http://127.0.0.1:8000/mcp
あとはエージェントに 「チームで経費を追跡したい」 と尋ねるだけです。エージェントは find_solutions
を呼び出し、信頼カードとセキュリティフラグ付きの、ランキング順の候補を取得します。
ワンクリックでインストール(デプロイ後に URL を置き換えてください): VS Code にインストール
/mcpでは OAuth が必要になりました(/authorize/<slug>のポップアップでアクセストークンを取得します)。curl で確認する場合は、/healthと/.well-known/oauth-authorization-serverを使用してください。
ツール
| ツール | 機能 |
|---|---|
find_solutions(problem, top_k?, max_pricing_tier?) | わかりやすいセキュリティフラグ付きの、ランキング順かつ信頼度スコア付きのおすすめ |
get_trust_report(slug) | 完全なセキュリティカード:要求された権限と必要な権限の比較、インジェクションスキャンの判定、公開元のステータス |
compare_tools(slugs[]) | 候補の信頼性を横並びで比較する表 |
すべての結果には、fit_score、trust_score、rank_score、trust_flags、
および人が読める rationale が含まれます。シードインデックスには、意図的に
不正な仕掛けを施した架空のツール quickledger-pro が含まれています。経費について尋ねると、このツールにフラグが付けられ
(suspicious_description_imperative、hidden_unicode_characters、permission_overreach)、
ランキングが下がる様子を確認できます。
独自のインスタンスをデプロイ(Render + Supabase)
詳しい手順は DEPLOY.md をご覧ください。概要:
- 無料の Supabase プロジェクトを作成 → 接続文字列をコピー →
+psycopgドライバーセグメントと?sslmode=requireを追加 - このリポジトリを GitHub にプッシュ → Render の「New +」→「Blueprint」→
render.yamlが読み込まれます - プロンプトが表示されたら、Supabase の URL を
SINGULARITY_DATABASE_URL環境変数に貼り付けます - 初回起動時にテーブルが自動作成され、インデックスに初期データが投入されます。
https://<app>.onrender.com/mcpが利用可能になります
MCP レジストリに公開
デプロイ後(パブリック HTTPS が必要)、ほかの人が見つけられるよう Singularity を登録します。
- 公式 MCP Registry —
server.jsonのプレースホルダーを編集し (XXXXを Render アプリ名に置き換えて)、次を実行します:npx mcp-publisher@latest init # scaffolds/validates server.json npx mcp-publisher@latest login # prove io.github.<you> ownership via GitHub npx mcp-publisher@latest publish # listed at https://registry.modelcontextprotocol.io within minutes - Smithery — https://smithery.ai/new でリポジトリを送信します(
smithery.yamlを使用) - Glama — https://glama.ai でリモート URL を送信し、掲載情報の所有権を申請します
- GitHub トピック — リポジトリに
mcp-server、mcp、ai-securityのトピックを追加します。PulseMCP/MCP.so のクローラーが 1~2 週間以内に検出します
ヒント:レジストリは毎週再クロールし、休止中のサーバーから認証済みバッジを削除します。
Render の $7/mo の Starter プランを利用すると、掲載期間や投資家向けの期間中、Singularity を常時稼働させられます。
テスト
pytest -v
ディレクトリ構成
singularity/
main.py FastAPI app factory + lifespan (auto-seed, mounts MCP)
mcp_server.py native MCP server: find_solutions / get_trust_report / compare_tools
config.py env-driven settings (SINGULARITY_* prefix)
database.py SQLAlchemy engine/session (SQLite dev, Postgres prod)
models.py Tool + AuditLog tables
schemas.py request/response contracts
middleware/
rate_limit.py per-IP token-bucket limiter (X-Forwarded-For aware)
services/
discovery_engine.py heuristic intent parsing
recommendation_index.py in-memory vector search over seeded tools
ranking.py fit/trust blend + rationale builder
scanner.py static injection/overreach scan (Phase 2 preview)
seeder.py seed logic shared by CLI and boot-time auto-seed
embeddings.py fastembed provider (bge-small-en-v1.5)
routers/
recommend.py POST /recommend, GET /tools
data/seed_tools.json curated 21-tool index incl. demo attack sample (tier1/tier2/tier3)
scripts/seed_index.py manual seeding CLI
scripts/smoke_execute.ps1 authenticated REST execute smoke test
scripts/smoke_oauth.py OAuth discovery + config smoke test
Dockerfile / render.yaml one-command Render deployment
server.json / smithery.yaml registry publishing manifests (fill placeholders first)
tests/ pytest suite (API + scanner + MCP tools & endpoint)
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。