be-amsa-reporter-te

be-amsa-reporter-te

Automates BE AMSA review by validating EFF folders, driving AMSA 5.1 to generate reports and graphs, and producing a PowerPoint summary. Designed to not hang with worker threads and timeouts.

Category
Visit Server

README

be-amsa-reporter-te

MCP server that automates a BE AMSA review end-to-end. Trigger it in chat with:

create a backend amsa report

Refactored, optimized and watchdog-guarded successor to be-amsa-manager-te. It keeps only the proven, active automation path, runs the whole multi-minute pipeline on a worker thread behind a hard timeout (so the chat can never hang), and stages all EFF/report I/O on local disk to avoid slow SMB round-trips.

What it does

  1. Lists the sub-folders under \\Mucsdn31\ATV_Power_Pro\MOSFET_TE\Test_program_status_tracking\Copilot_BE_AMSA\effdata and asks which one to analyse.
  2. Validates the chosen folder: exactly one .eff file ending in each of _S1R1, _S1R2, _S2R1, _S2R2 (no duplicates). If not, it returns an actionable message.
  3. Stages the four EFFs locally and drives AMSA 5.1:
    • Launches it from a clean slate (kills any stale GageAnalysis.exe) and dismisses the Precondition failed popup with Yes.
    • File > New → Setup Dialog → adds the four EFF files with TestSetup = 1, 1, 2, 2.
    • Sets the option groups (Test ID by Name and Number, Device no further identification, Unit no rescaling + dB/log(A) linearisation, Override die coordinates).
    • Start → ticks the listed Test Nr to exclude → Continue → Continue → OK.
    • Reads the results grid, sorts by GrR, self-calibrates the row geometry, and for every test with GrR ≥ 10 % ensures both S (Scatter) and P (Probability) are marked; unmarks any below threshold. Marks are verified and re-tried until they converge.
    • Configuration > Setup information → sets each row's Description to its EFF file name (matched by Setup No / Rep No).
    • Results > Write HTML-Report → writes the report + a Graphs\ sub-folder of JPGs.
  4. Copies the report + Graphs back to the share and builds a PowerPoint into Copilot_BE_AMSA\generatedppt\<folder>.pptx:
    • Slide 1: <folder> AMSA Review
    • Slide 2: Data Description (the four EFF file names)
    • Slide 3: GrR Summary (Gr&R > 25 % and 10 % ≤ Gr&R ≤ 25 %)
    • Slide 4: GrR Summary (all tests) — bar chart with 10 %/25 % red boundary lines
    • Slide 5+: one slide per test with GrR ≥ 10 %, scatter + probability JPG + assessment.

Why it will not hang

The create_backend_amsa_report tool only awaits the folder pick on the event loop; the entire blocking pipeline runs on a worker thread (anyio.to_thread.run_sync). A watchdog (BEAR_RUN_TIMEOUT, default 20 min) wraps the run — on timeout the worker is abandoned, AMSA is force-killed and a clear timeout result is returned. A progress heartbeat (BEAR_HEARTBEAT_SECONDS, default 10 s) reports the current phase so the run never looks stuck.

Install

cd C:\Users\maunahan\.copilot\MCPservers\be-amsa-reporter-te
python3.11 -m pip install -r requirements.txt

Registration (mcp.json)

Registered in C:\Users\maunahan\AppData\Roaming\Code\User\mcp.json:

"be-amsa-reporter-te": {
  "type": "stdio",
  "command": "C:/Users/maunahan/AppData/Local/Microsoft/WindowsApps/python3.11.exe",
  "args": ["-m", "be_amsa_reporter_te.server"],
  "cwd": "C:/Users/maunahan/.copilot/MCPservers/be-amsa-reporter-te",
  "env": {
    "BEAR_BASE_ROOT": "\\\\Mucsdn31\\ATV_Power_Pro\\MOSFET_TE\\Test_program_status_tracking\\Copilot_BE_AMSA",
    "BEAR_AMSA_LNK": "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\AMSA 5.1\\AMSA 5.1.lnk"
  }
}

Restart the MCP server (Command Palette → MCP: List Servers → be-amsa-reporter-te → Restart) after any code/config edit — a running server keeps the old modules in memory.

Configuration

Everything is overridable via BEAR_* environment variables (no code changes needed). Common knobs: BEAR_MAIN_WINDOW_TITLE_RE, BEAR_UI_BACKEND, BEAR_EXCLUDE_TEST_NRS, BEAR_GRR_PLOT_THRESHOLD, BEAR_GRR_HIGH_THRESHOLD, BEAR_RUN_TIMEOUT, BEAR_HEARTBEAT_SECONDS, and the results-grid geometry / control IDs in config.py.

Modules

  • config.py — all paths/selectors/tunables from BEAR_* env.
  • folders.py — list + validate effdata folders.
  • amsa_driver.py — pywinauto automation of AMSA 5.1 (active path only).
  • html_report.py — parse the generated HTML for Test Nr / name / GrR / limits.
  • ppt_report.py — build the review PowerPoint from the HTML + Graphs\ JPGs.
  • server.py — FastMCP server exposing create_backend_amsa_report, worker thread + watchdog + heartbeat.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured