Logic Analyzer AI MCP

Logic Analyzer AI MCP

Enables AI assistants to control Saleae Logic analyzers, capture and analyze digital/analog signals, and export data via MCP.

Category
访问服务器

README

Logic Analyzer AI MCP

An MCP (Model Context Protocol) server for interfacing with Saleae Logic analyzers. This tool allows AI assistants (like Claude) to control hardware logic analyzers, capture signals, and export data for analysis.

Features

  • Device Management: List connected devices, configure sample rates and channels.
  • Automation: Start and stop captures programmatically.
  • Data Export: Export captures to CSV/binary formats.
  • Analysis: Perform basic signal analysis (frequency, duty cycle, analog stats) directly via MCP.
  • Logic 2 Integration: Leverages the Saleae Logic 2 automation API for modern device support (Logic 8/16, Pro 8/16).
  • Adaptive Configuration: Works with fixed-voltage devices (like Logic 8) by correctly handling threshold settings.

Prerequisites

  1. Saleae Logic 2 Software: Must be installed and running.
  2. Enable Automation:
    • Open Logic 2.
    • Go to Preferences > Salese Logic 2 (or "Automation").
    • Enable "Enable scripting socket server".
    • Keep the default port 10430.

Installation

This project uses uv for dependency management, but standard pip works too.

Using uv (Recommended)

  1. Clone the repository:

    git clone https://github.com/wegitor/logic-analyzer-ai-mcp.git
    cd logic-analyzer-ai-mcp
    
  2. Create a virtual environment and sync dependencies:

    uv venv
    uv sync
    
  3. (Optional) Install manually if not syncing:

    uv pip install -e .
    

Usage

Running the MCP Server manually

To run the server and see available tools:

# Activate virtual environment first
.venv\Scripts\activate

# Run the server with Logic 2 automation enabled
python -m src.logic_analyzer_mcp --logic2

Configuration for Claude Desktop

To use this with Claude Desktop, add the following to your config file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "saleae_logic": {
      "command": "c:\\path\\to\\logic-analyzer-ai-mcp\\.venv\\Scripts\\python.exe",
      "args": [
        "c:\\path\\to\\logic-analyzer-ai-mcp\\src\\logic_analyzer_mcp.py",
        "--logic2"
      ]
    }
  }
}

Note: Replace c:\\path\\to\\... with the actual absolute path to your project folder.

Available Tools

Once connected, the AI assistant will have access to tools like:

  • logic2_reconnect: Connect to the running Saleae software.
  • get_available_devices: List connected hardware or simulation devices.
  • create_device_config: Set up channels and sample rates.
  • capture_and_analyze_digital: One-shot capture + frequency/duty cycle analysis.
  • capture_and_analyze_analog: One-shot capture + voltage statistics.
  • start_capture / wait_capture / save_capture: Granular control over the capture workflow.
  • start_capture_with_trigger: Wait for a digital event (e.g. Rising Edge) before capturing.
  • add_protocol_analyzer: Add decoders like Serial, I2C, SPI to the capture.
  • export_analyzer_data: Export decoded text data to CSV.

Advanced Usage Examples

Using Digital Triggers

To capture only when a specific event happens:

  1. Configure device (create_device_config).
  2. Start trigger capture:
    # Example: Wait for Rising Edge on Channel 0, then record 1 second
    start_capture_with_trigger(
        device_config_name="my_config",
        trigger_channel_index=0,
        trigger_type="RISING",
        after_trigger_seconds=1.0
    )
    

Protocol Decoding (e.g. Serial)

To decode UART/Serial data and export the text:

  1. Perform a capture (standard or triggered).
  2. Add an analyzer:
    add_protocol_analyzer(
        name="Async Serial",
        label="MySerial",
        settings={
            "Input Channel": 0,
            "Bit Rate": 115200
        }
    )
    
  3. Export the decoded table:
    export_analyzer_data(
        filepath="C:\\temp\\serial_data.csv",
        analyzer_label="MySerial"
    )
    

Troubleshooting

  • "Connection Refused": Ensure Logic 2 is running and the scripting server is enabled on port 10430.
  • "Threshold Error": If using Logic 8 (which doesn't support variable thresholds), ensure you don't pass a digital_threshold_volts value (the tool handles this automatically now).

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选