BlueMouse 标志

BlueMouse

社区
peijun1700

The "Prefrontal Cortex" for LLMs. A local, data-driven logic gate that interviews AI to prevent hallucinations.

发布者peijun1700
代码仓库bluemouse
语言Python
复刻数
13
星标数
109
可用工具
0
传输类型stdio
分类
许可协议AGPL-3.0
链接
  • 将工具接入 AI 工作流

    BlueMouse 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 109 个 Star 和 13 个 Fork。

🐭 BlueMouse v6.6

The AI Safety Layer for Cursor & Claude | AI 代碼安全層

Stop Vibe Coding. Start Engineering. | 拒絕憑感覺寫代碼,回歸工程思維。 https://bluemouse.app

Glama | bluemouse Smithery | bluemouse Status License

Privacy Compatible

Contact | 聯繫: bluemouse.ai@gmail.com


🌐 Works Everywhere | 全平台支援

BlueMouse is a standard MCP Server that works with ANY MCP-compatible client:

PlatformStatusInstallation
🎯 Cursor✅ RecommendedAuto-configured with ./Start
🚀 Antigravity✅ SupportedGoogle's AI IDE, MCP ready
🌊 Windsurf✅ SupportedCodeium's AI IDE
💬 Claude Desktop✅ SupportedVia Smithery
🌐 Web Browser✅ StandaloneNo IDE needed! http://localhost:8001
🔧 Any MCP Client✅ CompatibleStandard MCP protocol

[EN] Don't have Cursor? No problem! BlueMouse works as a standalone web tool.
[中文] 沒有 Cursor?沒關係!BlueMouse 可以當獨立網頁工具使用。


🌟 Why BlueMouse? | 為什麼選擇 BlueMouse?

[EN] In the era of Vibe Coding, AI generates code faster than we can read. But even the best AI (Claude 3.5 / 4.5) hallucinates. BlueMouse is your Airbag. It's not another coding tool—it's a Quality Gate that stops bad code before it happens.

[中文] 在 Vibe Coding 盛行的時代,AI 產生代碼的速度比我們閱讀的速度還快。但即使是最強的 AI (Claude 3.5 / 4.5) 也會出現邏輯幻覺。BlueMouse 是您的安全氣囊。 它不是另一個寫代碼的工具,它是阻止爛代碼發生的守門員。

The Problem | 問題所在

  • ❌ [EN] AI generates code by "vibes" without deep logic validation
  • ❌ [中文] AI 憑感覺生成代碼,沒有深度邏輯驗證
  • ❌ [EN] Edge cases are completely ignored
  • ❌ [中文] 邊界情況完全沒考慮
  • ❌ [EN] Tech debt explodes silently
  • ❌ [中文] 技術債默默爆炸
  • ❌ [EN] You find bugs in production, not development
  • ❌ [中文] 在正式環境才發現 Bug,不是在開發階段

The Solution | 解決方案

  • ✅ 17-Layer Validation | 17層驗證 - Every line passes through AST parsing, type checking, and security audits | 每一行代碼都經過 AST 解析、型別檢查和安全審計
  • ✅ Socratic Interview | 蘇格拉底式面試 - AI must answer logic questions before generating code | AI 必須先回答邏輯問題才能生成代碼
  • ✅ Zero Infrastructure Cost | 零基礎設施成本 - 100% local execution, no servers needed | 100% 本地執行,不需要伺服器
  • ✅ One-Word Start | 一鍵啟動 - Just type "Start" in Cursor | 只需在 Cursor 中輸入 "Start"

🔥 Core Features | 核心功能

🦠 Parasitic Architecture | 寄生架構

[EN] $0 Infrastructure Cost. BlueMouse sits between you and the compiler, intercepting commands in <10ms. No servers, no subscriptions, no cloud dependencies.

[中文] $0 營運成本。BlueMouse 寄生於您的開發環境,以 <10ms 的速度攔截指令。無需伺服器、訂閱或雲端依賴。

🧠 Socratic Logic Gate | 蘇格拉底邏輯門

[EN] Before writing code, BlueMouse interviews the AI with critical questions:

  • "For concurrent orders, pessimistic lock or optimistic lock?"
  • "On payment failure, rollback immediately or retry 3 times?"

[中文] 在寫代碼之前,BlueMouse 會用關鍵問題面試 AI:

  • 「對於並發訂單,使用悲觀鎖還是樂觀鎖?」
  • 「支付失敗時,立即回滾還是重試 3 次?」

Forces you (and AI) to think before coding. | 強制您(和 AI)在寫代碼前先思考。

🛡️ 17-Layer Validation | 17層驗證

[EN] Code generation passes through 17 logic gates:

[中文] 代碼生成必須通過 17 道邏輯閘:

  1. Syntax | 語法 - Correctness | 正確性
  2. Type | 型別 - Static type checking (Pydantic/MyPy) | 靜態型別檢查
  3. Security | 安全 - OWASP Top 10 scanning | OWASP Top 10 掃描
  4. Logic | 邏輯 - Business logic integrity | 業務邏輯完整性
  5. Performance | 性能 - Complexity analysis | 複雜度分析 ... and 12 more layers | ...以及另外 12 層

👆 One-Word Start | 一鍵啟動

bash
# Just drag the folder into Cursor and type:
# 只需將資料夾拖進 Cursor 並輸入:
Start

BlueMouse automatically injects .cursorrules and starts protecting your code.

BlueMouse 會自動注入 .cursorrules 並開始保護您的代碼。


📐 System Architecture | 系統架構

[EN] BlueMouse uses a 4-layer hybrid architecture with intelligent fallback:

[中文] BlueMouse 使用 4 層混合架構,具有智能降級機制:

Key Features | 核心特性:

  • ✅ Zero Single Point of Failure | 無單點故障 - 4-layer fallback ensures 100% uptime | 4層降級確保 100% 可用性
  • ✅ Offline-First | 離線優先 - Works without internet | 無需網路即可運行
  • ✅ BYOK (Bring Your Own Key) | 自帶密鑰 - Use your own API keys or local models | 使用您自己的 API 密鑰或本地模型
  • ✅ 180k Knowledge Base | 18萬知識庫 - Pre-loaded with 28 high-risk scenarios | 預載 28 個高風險場景

🏆 Industrial Grade Certification | 工業級認證

BlueMouse v6.6 has passed rigorous stress tests | BlueMouse v6.6 已通過嚴格的壓力測試:

Test ProtocolStatusDescription
Antarctica Protocol✅ PASSED100% functionality in offline/air-gapped environments離線/隔離環境下 100% 功能正常
Bilingual Acid Test✅ PASSEDSeamless dynamic language switching (zh-TW / en-US)無縫動態語言切換(繁中/英文)
Data Resilience✅ PASSEDValidated against 28 high-concurrency/financial-risk scenarios針對 28 個高並發/金融風險場景驗證
Security Hardening✅ PASSEDXSS, SQL Injection, Path Traversal protectionXSS、SQL 注入、路徑遍歷防護
Vetting Depth✅ 17 LAYERSCode generation piped through 17 logic gates代碼生成通過 17 道邏輯閘

🚀 Quick Start | 快速開始

Three Steps. That's It. | 三步驟,就這樣。

bash
# 1. Clone
git clone https://github.com/peijun1700/bluemouse
cd bluemouse

# 2. Start (在終端機執行 | Run in Terminal)
./Start        # Mac/Linux
Start.bat      # Windows

# 3. Restart Cursor
# BlueMouse is now protecting your code!

That's literally it. No Docker, no config files, no cloud setup.
就這樣。 沒有 Docker、沒有配置檔、沒有雲端設定。


Alternative: Use as Web Tool | 替代方案:當網頁工具用

Don't have Cursor? Open http://localhost:8001 after running ./Start.
沒有 Cursor?執行 ./Start 後打開 http://localhost:8001。


Detailed Setup | 詳細設定

For manual installation or troubleshooting, see CURSOR_GUIDE.md.
手動安裝或疑難排解,請參考 CURSOR_GUIDE.md。


📖 Usage | 使用方法

1. Enter Your Vision | 輸入您的構想

[EN] Describe what you want to build:

I want to build an e-commerce platform with user authentication

[中文] 描述您想建立的系統:

我想做一個電商平台,有用戶認證功能

2. Answer Socratic Questions | 回答蘇格拉底式問題

[EN] BlueMouse will ask critical logic questions:

  • Database concurrency strategy?
  • Error handling approach?
  • Security measures?

[中文] BlueMouse 會詢問關鍵邏輯問題:

  • 資料庫並發策略?
  • 錯誤處理方式?
  • 安全措施?

3. Get Validated Code | 獲得驗證過的代碼

[EN] After passing 17 layers of validation, download your project ZIP containing:

[中文] 通過 17 層驗證後,下載包含以下內容的專案 ZIP:

  • ✅ Source code | 原始碼
  • ✅ Architecture diagrams | 架構圖
  • ✅ Installation guide | 安裝指南
  • ✅ Cost estimation | 成本估算
  • ✅ Validation report | 驗證報告

🛡️ Enterprise Security | 企業安全

100% Local Execution | 100% 本地執行

  • ✅ No data leaves your machine | 數據不離開您的電腦
  • ✅ No cloud dependencies | 無雲端依賴
  • ✅ No telemetry or tracking | 無遙測或追蹤
  • ✅ Works in air-gapped environments | 可在隔離環境運行

AGPLv3 License | AGPLv3 授權

  • ✅ Open source for transparency | 開源透明
  • ✅ Commercial use requires compliance | 商業使用需遵守協議
  • ✅ Protects against closed-source forks | 防止閉源分支

Read our Privacy Whitepaper for technical details.

**閱讀我們的隱私白皮書**了解技術細節。


🔧 Troubleshooting | 故障排除

python3: command not found

Mac/Linux:

bash
brew install python3

Windows: Download from python.org

pip install fails | pip install 失敗

Try using a mirror | 嘗試使用鏡像:

bash
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

Port 8001 already in use | 端口 8001 已被占用

bash
# Find and kill the process | 查找並終止進程
lsof -ti:8001 | xargs kill -9  # Mac/Linux
netstat -ano | findstr :8001   # Windows

Permission denied | 權限被拒絕

bash
chmod +x start_bluemouse.command  # Mac/Linux

ModuleNotFoundError | 模組未找到

bash
pip install -r requirements.txt --force-reinstall

Browser doesn't open | 瀏覽器未打開

Manually navigate to | 手動訪問: http://localhost:8001


📚 Documentation | 文檔


🌍 Community | 社群


🎯 Roadmap | 路線圖

v6.6 (Current | 當前版本)

  • ✅ 17-Layer validation system | 17層驗證系統
  • ✅ Socratic question library (22 questions, 10 categories) | 蘇格拉底問題庫(22 個問題,10 個類別)
  • ✅ Bilingual support (zh-TW / en-US) | 雙語支援(繁中/英文)
  • ✅ Zero-cost parasitic architecture | 零成本寄生架構

v7.0 (Planned | 計劃中)

  • 🔄 Frontend template generation | 前端模板生成
  • 🔄 Custom question library | 自定義問題庫
  • 🔄 Team collaboration features | 團隊協作功能
  • 🔄 Enterprise audit logs | 企業審計日誌

❓ FAQ | 常見問題

Q1: BlueMouse 啟動後,Cursor 沒有反應?

A: 請確認以下步驟:

  1. 完全關閉 Cursor (Cmd+Q / Ctrl+Q)
  2. 重新打開 Cursor
  3. 檢查 .vscode/mcp.json 是否存在
  4. 如果還是沒反應,手動配置 MCP (參考 CURSOR_GUIDE.md)

Q2: 出現 "Address already in use" 錯誤?

A: 端口 8001 被佔用。解決方法:

bash
# Mac/Linux
lsof -ti:8001 | xargs kill -9

# Windows
netstat -ano | findstr :8001
taskkill /PID <PID> /F

Q3: CRITICAL STOP 沒有觸發?

A: CRITICAL STOP 功能已實現!確認以下條件:

  • 您的需求包含 DROP TABLE 或 DELETE FROM 等關鍵字
  • BlueMouse 服務正在運行 (檢查 http://localhost:8001)
  • 在蘇格拉底問題階段會自動觸發

測試方法:

bash
# 在需求輸入框輸入:
"幫我 drop table users"

# 系統會立即顯示:
⚠️ CRITICAL STOP: You are executing DROP without Environment Check. 
Is this PROD?

Q4: 需要 API Key 嗎?

A: 不需要! BlueMouse 可以完全本地運行。

  • 如果您有 Anthropic/OpenAI API Key,可以獲得更好的 AI 輔助
  • 如果沒有,BlueMouse 仍然會執行 17-Layer Validation

Q5: 支援 Windows 嗎?

A: 支援!使用 Start.bat 啟動。 注意:部分功能可能需要 WSL (Windows Subsystem for Linux)

Q6: 如何解除安裝?

A:

bash
# 1. 停止服務 (Ctrl+C)
# 2. 刪除資料夾
rm -rf bluemouse
# 3. 移除 Cursor 配置
rm .vscode/mcp.json

Q7: 可以用在其他 IDE 嗎?

A: 可以!BlueMouse 是標準的 MCP Server,支援:

  • Cursor ✅
  • Claude Desktop ✅
  • VS Code (需要 MCP 插件) ✅
  • 任何支援 MCP 協議的客戶端 ✅

📄 License | 授權

BlueMouse is licensed under AGPLv3 | BlueMouse 採用 AGPLv3 授權。

What this means | 這意味著:

  • ✅ Free for personal use | 個人使用免費
  • ✅ Free for open-source projects | 開源專案免費
  • ⚠️ Commercial use requires compliance (or contact us for licensing) | 商業使用需遵守協議(或聯繫我們獲取授權)

See LICENSE for details | 詳見 LICENSE。


🙏 Acknowledgments | 致謝

Built with | 使用以下技術構建:

  • FastAPI - Modern Python web framework | 現代 Python Web 框架
  • Pydantic - Data validation | 數據驗證
  • Anthropic Claude - AI reasoning (optional) | AI 推理(可選)
  • Ollama - Local AI models (optional) | 本地 AI 模型(可選)

📊 Stats | 統計

GitHub stars GitHub forks GitHub watchers


Made with ❤️ by developers who care about code quality

由關心代碼品質的開發者用心打造

Stop Vibe Coding. Start Engineering. | 拒絕憑感覺寫代碼,回歸工程思維。 🐭

将 BlueMouse MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 BlueMouse 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 BlueMouse 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 BlueMouse MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "bluemouse": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 BlueMouse MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 BlueMouse MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 BlueMouse 帮我完成这项任务吗?
BlueMouse
当然。我已阅读。
以下是我使用 BlueMouse 得到的结果。

常见问题

BlueMouse MCP 服务器有什么用途?

BlueMouse 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 BlueMouse MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 BlueMouse,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 BlueMouse MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 BlueMouse 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 BlueMouse MCP 连接到 TypingMind?

BlueMouse 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

BlueMouse MCP 在 TypingMind 中提供哪些工具?

BlueMouse 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 BlueMouse MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 BlueMouse 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇