{
  "markdown": "<div align=\"center\">\n\n# easyeda-mcp-pro\n\n<p>\n  Production-grade MCP server for EasyEDA Pro: safe PCB design inspection, BOM sourcing, manufacturing export, and AI-assisted hardware review.\n</p>\n\n<p>\n  <a href=\"https://www.npmjs.com/package/easyeda-mcp-pro\">\n    <img src=\"https://img.shields.io/npm/v/easyeda-mcp-pro.svg?logo=npm\" alt=\"npm version\" />\n  </a>\n  <a href=\"https://www.npmjs.com/package/easyeda-mcp-pro\">\n    <img src=\"https://img.shields.io/npm/dt/easyeda-mcp-pro?logo=npm&label=total%20downloads\" alt=\"npm total downloads\" />\n  </a>\n  <a href=\"https://www.npmjs.com/package/easyeda-mcp-pro\">\n    <img src=\"https://img.shields.io/node/v/easyeda-mcp-pro\" alt=\"supported Node.js version\" />\n  </a>\n  <a href=\"LICENSE\">\n    <img src=\"https://img.shields.io/npm/l/easyeda-mcp-pro.svg\" alt=\"license\" />\n  </a>\n  <a href=\"https://pnpm.io/\">\n    <img src=\"https://img.shields.io/badge/pnpm-11.5.1-blue.svg\" alt=\"pnpm\" />\n  </a>\n</p>\n\n<p>\n  <a href=\"https://github.com/oaslananka/easyeda-mcp-pro/actions/workflows/ci.yml\">\n    <img src=\"https://github.com/oaslananka/easyeda-mcp-pro/actions/workflows/ci.yml/badge.svg\" alt=\"CI status\" />\n  </a>\n  <a href=\"https://github.com/oaslananka/easyeda-mcp-pro/actions/workflows/deploy-docs.yml\">\n    <img src=\"https://github.com/oaslananka/easyeda-mcp-pro/actions/workflows/deploy-docs.yml/badge.svg\" alt=\"Docs status\" />\n  </a>\n  <a href=\"https://github.com/oaslananka/easyeda-mcp-pro/security/policy\">\n    <img src=\"https://img.shields.io/badge/security-policy-blue\" alt=\"Security policy\" />\n  </a>\n  <a href=\"https://scorecard.dev/viewer/?uri=github.com/oaslananka/easyeda-mcp-pro\">\n    <img src=\"https://api.scorecard.dev/projects/github.com/oaslananka/easyeda-mcp-pro/badge\" alt=\"OpenSSF Scorecard\" />\n  </a>\n    <a href=\"https://www.bestpractices.dev/projects/13406\">\n    <img src=\"https://www.bestpractices.dev/projects/13406/badge\" alt=\"OpenSSF Best Practices\" />\n  </a>\n</p>\n\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/oaslananka/easyeda-mcp-pro)\n\n<p>\n  <a href=\"docs/ROADMAP.md\">Roadmap</a> ·\n  <a href=\"docs/OPENSSF_BEST_PRACTICES.md\">OpenSSF evidence</a> ·\n  <a href=\"docs/SECURITY_ASSURANCE_CASE.md\">Security assurance case</a>\n</p>\n\n<p>\n  <strong>Compliance docs:</strong>\n  <a href=\"THIRD_PARTY_NOTICES.md\">Third-Party Notices</a>\n  ·\n  <a href=\"docs/vendor-terms.md\">Vendor Terms and Unsupported Workflows</a>\n  ·\n  <a href=\"docs/REMOTE_MCP_MODES.md\">Remote MCP Modes</a>\n</p>\n\n<p>\n  <a href=\"https://www.buymeacoffee.com/oaslananka\">\n    <img src=\"https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20coffee&emoji=%E2%98%95&slug=oaslananka&button_colour=FFDD00&font_colour=000000&font_family=Inter&outline_colour=000000&coffee_colour=ffffff\" height=\"28\" alt=\"Buy me a coffee\" />\n  </a>\n  &nbsp;&nbsp;\n  <a href=\"https://github.com/oaslananka/easyeda-mcp-pro\">\n    <img src=\"https://img.shields.io/github/stars/oaslananka/easyeda-mcp-pro?style=for-the-badge&logo=github&label=Star%20on%20GitHub&color=FFA500&labelColor=181717\" alt=\"Star on GitHub\" />\n  </a>\n</p>\n\n</div>\n\n---\n\n## Trust and Supply Chain\n\neasyeda-mcp-pro keeps its public OpenSSF Best Practices evidence in [`docs/OPENSSF_BEST_PRACTICES.md`](docs/OPENSSF_BEST_PRACTICES.md) and its security assurance case in [`docs/SECURITY_ASSURANCE_CASE.md`](docs/SECURITY_ASSURANCE_CASE.md). The header badges link to workflow-backed signals only: CI, generated docs deployment, the project security policy, OpenSSF Best Practices self-certification, and the OpenSSF Scorecard. Release integrity evidence (npm provenance, signed-release status) is tracked in [`docs/RELEASE_VERIFICATION.md`](docs/RELEASE_VERIFICATION.md). Coverage, Test Analytics, and extension bundle monitoring are documented in [`docs/CODECOV_ANALYTICS.md`](docs/CODECOV_ANALYTICS.md).\n\n**Current OpenSSF Best Practices status:** Passing (100%) — see [live badge](https://www.bestpractices.dev/projects/13406) and [Silver evidence map](docs/OPENSSF_BEST_PRACTICES.md#silver-evidence) for in-progress Silver criteria.\n\n---\n\n## Quick Start\n\nThe fastest way to install and configure `easyeda-mcp-pro` for your favorite AI assistant or IDE:\n\n1. **Auto-configure your MCP client:**\n\n   ```bash\n   npx easyeda-mcp-pro setup all\n   ```\n\n   _This detects and configures Claude Desktop, Cursor, VS Code, Windsurf, Cline, Gemini, Zed, etc. to run the MCP server automatically._\n   _(Or run for a specific client, e.g., `npx easyeda-mcp-pro setup claude`)_\n\n2. **Locate and install the EasyEDA Pro bridge extension:**\n\n   ```bash\n   npx easyeda-mcp-pro extension --open\n   ```\n\n   _This opens the folder containing the extension package `easyeda-bridge-extension.eext`. Import it via **EasyEDA Pro → Settings → Extensions → Extension Manager**._\n\n3. **Connect the bridge:**\n   In EasyEDA Pro, click **MCP Bridge → Connect** in the menu bar.\n\nFor advanced configurations, manual instructions, and specific clients, see [Installation & Client Configuration](#installation--client-configuration).\n\n---\n\n## Overview\n\neasyeda-mcp-pro is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that bridges AI assistants with hardware design workflows in EasyEDA Pro. It exposes up to 115 profile-gated MCP tools for schematic inspection and editing, controlled EasyEDA Pro API calls, BOM management, design rule checks, PCB board analysis, fabrication exports, diagnostics, and supplier integration.\n\nThe server connects to EasyEDA Pro via a WebSocket bridge extension, enabling real-time access to open project data. It integrates with JLCPCB, LCSC, Mouser, and DigiKey for BOM sourcing and pricing.\n\n### Key Capabilities\n\n| Area            | What you can do                                                       |\n| --------------- | --------------------------------------------------------------------- |\n| **Schematic**   | List nets/components, search and place devices, edit wires/primitives |\n| **BOM**         | Generate, validate, export, and source bill of materials              |\n| **DRC/ERC**     | Run design rule and electrical rule checks                            |\n| **Board**       | Inspect layers, stackup, dimensions, features                         |\n| **Export**      | Export Gerbers, pick-and-place, PDF, netlist                          |\n| **Diagnostics** | Health check, bridge status, API inventory, capabilities, self-test   |\n\n---\n\n## Prerequisites\n\n- **Node.js**: Node.js 24.x is required; repository automation is pinned to **24.18.0**.\n- **pnpm**: local development and automation require exactly **11.5.1**.\n\nPrepare the supported runtime before installing dependencies:\n\n```bash\nnvm install 24.18.0\nnvm use 24.18.0\ncorepack enable\ncorepack prepare pnpm@11.5.1 --activate\nnode scripts/check-runtime.mjs --require-pnpm\n```\n\n- **EasyEDA Pro** with the bundled bridge extension installed and running\n- For supplier integration: API credentials from JLCPCB, LCSC, Mouser, or DigiKey\n\n---\n\n## Installation & Client Configuration\n\n> Testing the v1 release candidate? Follow [Migrating to v1](docs/MIGRATING_TO_V1.md). Stable npm and container channels remain on `0.35.4` during the candidate soak.\n\nYou can configure `easyeda-mcp-pro` automatically or manually.\n\n### 1. Automatic Configuration (CLI)\n\nThe CLI setup automates editing the configuration files for your client:\n\n```bash\n# Configure all detected clients automatically\nnpx easyeda-mcp-pro setup all\n\n# Or configure a specific client\nnpx easyeda-mcp-pro setup <client>\n```\n\n#### Supported Client Keys:\n\n- `claude` (Claude Desktop)\n- `cursor` (Cursor IDE)\n- `vscode` (VS Code Copilot)\n- `windsurf` (Windsurf)\n- `cline` (Cline)\n- `gemini` (Gemini CLI / Antigravity)\n- `zed` (Zed Editor)\n- `amazonq` (Amazon Q Developer)\n- `continue` (Continue.dev)\n\n#### Options:\n\n- `--profile <name>`: Specify the tool profile. Options: `core` (default), `pro`, `full`, `dev`.\n  Example: `npx easyeda-mcp-pro setup cursor --profile full`\n\n### 2. Extension Installation\n\nTo bridge the MCP server with EasyEDA Pro:\n\n```bash\n# Open the directory containing the .eext extension package in your file manager\nnpx easyeda-mcp-pro extension --open\n\n# Or copy it to a specific directory\nnpx easyeda-mcp-pro extension --copy /path/to/destination\n```\n\n**Installation steps in EasyEDA Pro:**\n\n1. Open **EasyEDA Pro**.\n2. Go to **Settings** → **Extensions** → **Extension Manager**.\n3. Click **Import Extension** and select the `easyeda-bridge-extension.eext` file.\n4. Ensure **Allow External Interaction** is enabled for the extension.\n5. Click **MCP Bridge** → **Connect** in the menu bar.\n\n---\n\n### 3. Manual Client Configurations\n\nIf you prefer to configure your clients manually, add the following configuration to the respective settings files:\n\n<details>\n<summary>🟣 Claude Desktop</summary>\n\n**Config Path:**\n\n- Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\n- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- Linux: `~/.config/Claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"easyeda-mcp-pro\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"easyeda-mcp-pro@latest\"],\n      \"env\": {\n        \"TOOL_PROFILE\": \"core\"\n      }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary>🔵 Cursor IDE</summary>\n\n**Config Path:** Project-specific `.cursor/mcp.json` or global `~/.cursor/mcp.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"easyeda-mcp-pro\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"easyeda-mcp-pro@latest\"],\n      \"env\": {\n        \"TOOL_PROFILE\": \"pro\"\n      }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary>🟢 VS Code (GitHub Copilot)</summary>\n\n**Config Path:** `%APPDATA%\\Code\\User\\mcp.json` (Windows), `~/Library/Application Support/Code/User/mcp.json` (macOS), or `~/.config/Code/User/mcp.json` (Linux)\n\n```json\n{\n  \"servers\": {\n    \"easyeda-mcp-pro\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"easyeda-mcp-pro@latest\"],\n      \"env\": {\n        \"TOOL_PROFILE\": \"pro\"\n      }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary>🏄 Windsurf (Codeium)</summary>\n\n**Config Path:** `~/.codeium/windsurf/mcp_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"easyeda-mcp-pro\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"easyeda-mcp-pro@latest\"],\n      \"env\": {\n        \"TOOL_PROFILE\": \"pro\"\n      }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary>🤖 Cline</summary>\n\n**Config Path:** Cline VS Code extension global storage (`cline_mcp_settings.json`)\n\n```json\n{\n  \"mcpServers\": {\n    \"easyeda-mcp-pro\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"easyeda-mcp-pro@latest\"],\n      \"env\": {\n        \"TOOL_PROFILE\": \"pro\"\n      },\n      \"disabled\": false,\n      \"autoApprove\": []\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary>✨ Gemini CLI / Antigravity</summary>\n\n**Config Path:** `~/.gemini/settings.json` or `~/.gemini/config/mcp_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"easyeda-mcp-pro\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"easyeda-mcp-pro@latest\"],\n      \"env\": {\n        \"TOOL_PROFILE\": \"pro\"\n      }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary>⚡ Zed Editor</summary>\n\n**Config Path:** `~/.config/zed/settings.json`\n\n```json\n{\n  \"context_servers\": {\n    \"easyeda-mcp-pro\": {\n      \"command\": {\n        \"path\": \"npx\",\n        \"args\": [\"-y\", \"easyeda-mcp-pro@latest\"]\n      },\n      \"settings\": {}\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary>🔄 Continue.dev</summary>\n\n**Config Path:** `~/.continue/config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"easyeda-mcp-pro\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"easyeda-mcp-pro@latest\"],\n      \"env\": {\n        \"TOOL_PROFILE\": \"pro\"\n      }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary>👑 Amazon Q Developer</summary>\n\n**Config Path:** `~/.aws/amazonq/mcp.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"easyeda-mcp-pro\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"easyeda-mcp-pro@latest\"],\n      \"env\": {\n        \"TOOL_PROFILE\": \"pro\"\n      }\n    }\n  }\n}\n```\n\n</details>\n\n---\n\n### 4. Running from Source (Development)\n\nIf you are developing or running a modified local build:\n\n```bash\ngit clone https://github.com/oaslananka/easyeda-mcp-pro.git\ncd easyeda-mcp-pro\ncp .env.example .env\npnpm install\n\n# Build the server and the bridge extension package\npnpm build\npnpm build:extension\n```\n\nTo configure your clients to use the local development build:\n\n```bash\n# Print instructions and local config block pointing to dist/index.js\nnode dist/index.js --setup-local\n```\n\n### Local Diagnostics & Health Check\n\nYou can diagnose your environment and bridge connectivity at any time:\n\n```bash\npnpm doctor\n```\n\nThis checks:\n\n1. Node.js version compatibility.\n2. Runtime mode: source checkout, installed package, or production runtime.\n3. The CLI entry shebang and the `.eext` extension package checksum.\n4. Bridge port availability. _Note: The bridge status will show as offline until an MCP client starts the server and connects to the EasyEDA Pro extension._\n\npnpm is required only for a source checkout and must match the repository pin. pnpm is not required for an installed package or production runtime, including the hardened Docker image.\nDoctor exits with status `1` for unsupported required runtimes, invalid configuration, or missing/corrupt runtime artifacts; an offline bridge by itself remains informational.\n\n---\n\n## Configuration\n\nCopy `.env.example` to `.env` and edit. All variables have safe defaults — only configure what you need.\n\nBoolean environment variables use strict literals: `true` / `1` enable a setting and `false` / `0` disable it. Matching is case-insensitive and surrounding whitespace is ignored. Other values—including `yes`, `no`, `on`, `off`, `enabled`, `disabled`, empty strings, and misspellings—fail startup validation and report the offending variable. Leave a variable unset to use its documented default.\n\n### Essential\n\n| Variable                | Default        | Description                                                                  |\n| ----------------------- | -------------- | ---------------------------------------------------------------------------- |\n| `NODE_ENV`              | `development`  | Set to `production` in production                                            |\n| `LOG_LEVEL`             | `info`         | Pino log level: `trace`, `debug`, `info`, `warn`, `error`, `fatal`, `silent` |\n| `TOOL_PROFILE`          | `core`         | Tool set: `core`, `pro`, `full`, `dev`, `experimental`                       |\n| `TOOL_SCOPES`           | empty          | Optional capability allowlist such as `schematic:read,bom:read`              |\n| `MCP_PROTOCOL_VERSION`  | `2025-11-25`   | MCP protocol version string                                                  |\n| `MCP_BRIDGE_BACKEND`    | `local_bridge` | Bridge backend: `local_bridge` or experimental `remote_relay`                |\n| `MCP_REMOTE_SESSION_ID` | empty          | Optional fixed Remote Relay session id for `remote_relay` backend            |\n| `TRANSPORT`             | `stdio`        | Server transport: `stdio` (default) or `http`                                |\n\nFor Remote Relay experiments, run `npx easyeda-mcp-pro doctor --fix` after setting `MCP_BRIDGE_BACKEND=remote_relay`; the doctor output validates HTTP transport, session selection, OAuth, and loopback-only development auth settings.\n\n### Bridge (EasyEDA Pro connection)\n\n| Variable                    | Default       | Description                                                              |\n| --------------------------- | ------------- | ------------------------------------------------------------------------ |\n| `BRIDGE_HOST`               | `127.0.0.1`   | Bridge WebSocket host                                                    |\n| `BRIDGE_PORT`               | `49620`       | Primary bridge port                                                      |\n| `BRIDGE_PORT_SCAN`          | `49620-49629` | Port scan spec (comma/range)                                             |\n| `BRIDGE_TIMEOUT_MS`         | `15000`       | Bridge call timeout (ms)                                                 |\n| `BRIDGE_HEARTBEAT_MS`       | `10000`       | Heartbeat interval (ms)                                                  |\n| `BRIDGE_WAIT_FOR_EDA_MS`    | `30000`       | Wait for EasyEDA Pro on startup (ms)                                     |\n| `BRIDGE_MAX_PAYLOAD_SIZE`   | `1048576`     | Max bridge payload (bytes, default 1 MiB)                                |\n| `BRIDGE_TOKEN`              | `''`          | Session token for extension auth                                         |\n| `BRIDGE_RAW_EXEC_ENABLED`   | `false`       | First explicit gate for raw EasyEDA runtime JavaScript execution         |\n| `MCP_RAW_EXEC_EXPERIMENTAL` | `false`       | Second experimental gate required before `easyeda_execute` is registered |\n\n### Storage\n\n| Variable       | Default                             | Description                             |\n| -------------- | ----------------------------------- | --------------------------------------- |\n| `DATA_DIR`     | `~/.easyeda-mcp-pro`                | Base directory for writable local state |\n| `SQLITE_PATH`  | `<DATA_DIR>/easyeda-mcp-pro.sqlite` | SQLite database path                    |\n| `ARTIFACT_DIR` | `<DATA_DIR>/artifacts`              | Artifact export directory               |\n| `CACHE_DIR`    | `<DATA_DIR>/cache`                  | Cache directory                         |\n\nStorage paths are resolved in two stages. `DATA_DIR` is resolved first; each subordinate path is then derived from it with the current operating system's native path separator unless that variable was explicitly supplied. Setting only `DATA_DIR` therefore relocates the default database, artifact, and cache paths together. Explicit overrides are applied independently and retain their supplied absolute or relative semantics; relative paths remain relative to the MCP process working directory. Changing these settings does not migrate existing data automatically.\n\n### Supplier integration\n\nEnable suppliers by setting their credentials. All suppliers are disabled by default.\n\n- **JLCPCB**: `JLCPCB_MODE=approved_api` + client ID/secret\n- **LCSC**: `JLCSEARCH_ENABLED=true` (default, no key required for basic search)\n- **Mouser**: `MOUSER_ENABLED=true` + API key\n- **DigiKey**: `DIGIKEY_ENABLED=true` + OAuth2 client ID/secret\n\nShared sourcing behavior is controlled independently of any one vendor:\n\n| Variable                         | Default | Description                                                          |\n| -------------------------------- | ------- | -------------------------------------------------------------------- |\n| `KEYLESS_SOURCING_ENABLED`       | `true`  | Allow supported public keyless fallbacks when credentials are absent |\n| `SOURCING_CACHE_TTL_SECONDS`     | `21600` | Cache sourcing responses for six hours (`0` disables cache reuse)    |\n| `VENDOR_MIN_REQUEST_INTERVAL_MS` | `150`   | Minimum delay between outbound requests to the same sourcing vendor  |\n\n### Reserved AI configuration\n\nNo in-process AI provider client is currently implemented. The `AI_*` variables remain accepted for\nconfiguration compatibility but are reported as `reserved`, are always ineffective, and must not be\nused to infer that the server sends design data to an AI provider. Do not supply an API key.\n\n| Variable                    | Default | Current behavior                                      |\n| --------------------------- | ------- | ----------------------------------------------------- |\n| `AI_PROVIDER`               | `none`  | Reserved; no provider client is invoked               |\n| `AI_MODEL`                  | `''`    | Reserved; no model is selected                        |\n| `AI_API_KEY`                | `''`    | Reserved; no credential consumer exists               |\n| `AI_MAX_TOKENS`             | `8000`  | Reserved compatibility setting                        |\n| `AI_TIMEOUT_MS`             | `60000` | Reserved compatibility setting                        |\n| `AI_ALLOW_DESIGN_MUTATIONS` | `false` | Reserved; cannot enable AI-originated design mutation |\n\nUse `easyeda_get_feature_flags` or `easyeda_get_capabilities` to inspect `configured`, `effective`,\nand `maturity` values for optional settings.\n\n### HTTP transport\n\nWhen using `TRANSPORT=http`:\n\n| Variable              | Default     | Description                                        |\n| --------------------- | ----------- | -------------------------------------------------- |\n| `HTTP_HOST`           | `127.0.0.1` | Bind address; non-loopback requires OAuth          |\n| `HTTP_PORT`           | `3000`      | Port                                               |\n| `HTTP_AUTH_DISABLED`  | `false`     | Disable HTTP auth for non-production loopback only |\n| `HTTP_RATE_LIMIT_MAX` | `100`       | Max requests per minute per IP                     |\n| `CORS_ORIGIN`         | `''`        | Legacy allowed origin for loopback browser clients |\n| `ALLOWED_ORIGINS`     | `''`        | Explicit remote origin allowlist; `*` is rejected  |\n\n#### Remote HTTP Security\n\nEvery non-loopback HTTP deployment requires OAuth 2.0 / OpenID Connect authentication, regardless of `NODE_ENV`:\n\n| Variable                | Default           | Description                                  |\n| ----------------------- | ----------------- | -------------------------------------------- |\n| `OAUTH_ENABLED`         | `false`           | Enable Bearer token validation               |\n| `OAUTH_ISSUER`          | `''`              | Expected token issuer (`iss` claim)          |\n| `OAUTH_AUDIENCE`        | `easyeda-mcp-pro` | Expected token audience (`aud` claim)        |\n| `OAUTH_JWKS_URI`        | `''`              | JWKS endpoint for token signature validation |\n| `OAUTH_REQUIRED_SCOPES` | `easyeda:read`    | Required token scope                         |\n\nWhen `OAUTH_ENABLED=true`, every request to `/mcp` must include an `Authorization: Bearer <token>` header unless `HTTP_AUTH_DISABLED=true` is explicitly set for non-production loopback development. Tokens are verified against `OAUTH_JWKS_URI`, `iss`/`aud` claims are validated, and `OAUTH_REQUIRED_SCOPES` is enforced against `scope`, `scp`, `permissions`, or `roles` claims.\n\nThe server enforces startup safety checks in every environment: **non-loopback `HTTP_HOST` without OAuth is rejected**, `OAUTH_JWKS_URI` / `OAUTH_ISSUER` / `OAUTH_AUDIENCE` are required, wildcard `ALLOWED_ORIGINS=*` is rejected, and `HTTP_AUTH_DISABLED=true` remains limited to non-production loopback development. Requests without an `Origin` header still require a valid bearer token on authenticated deployments; CORS is not an authentication boundary.\n\n### Docker defaults\n\nThe Docker image starts in HTTP mode with `HTTP_HOST=127.0.0.1` so the default container boot path is safe and passes the same startup safety checks as local HTTP mode. For an externally reachable container, override the bind address and configure OAuth plus an explicit, non-wildcard origin allowlist:\n\n```bash\ndocker run --rm \\\n  -e HTTP_HOST=0.0.0.0 \\\n  -e ALLOWED_ORIGINS=https://your-client.example.com \\\n  -e OAUTH_ENABLED=true \\\n  -e OAUTH_ISSUER=https://issuer.example.com/ \\\n  -e OAUTH_JWKS_URI=https://issuer.example.com/.well-known/jwks.json \\\n  -e OAUTH_AUDIENCE=easyeda-mcp-pro \\\n  -p 127.0.0.1:3000:3000 \\\n  ghcr.io/oaslananka/easyeda-mcp-pro:latest\n```\n\nDo not expose non-loopback HTTP without OAuth. `ALLOWED_ORIGINS` restricts browsers but never replaces authentication. Use a reverse proxy or platform gateway for TLS termination and external access.\n\n#### HTTP Security Features\n\n- **Rate limiting**: Per-IP sliding window (configurable via `HTTP_RATE_LIMIT_MAX`), returns `429 Too Many Requests` with retry-after header\n- **Security headers**: `X-Content-Type-Options: nosniff`, `X-Frame-Options: DENY`, `X-XSS-Protection: 0`, `Referrer-Policy: strict-origin-when-cross-origin`\n- **Health endpoints**: `/healthz` (liveness) and `/readyz` (readiness) return JSON status\n\nSee `.env.example` for the complete list of configuration variables.\n\n---\n\n## MCP Tools\n\nThe server registers profile-gated tools according to the active `TOOL_PROFILE`. The table below is generated from the same registry used at runtime:\n\n<!-- capability-counts:start -->\n\n| Profile        | Registered tools |\n| -------------- | ---------------: |\n| `core`         |               73 |\n| `pro`          |              100 |\n| `full`         |              112 |\n| `dev`          |              117 |\n| `experimental` |              117 |\n\n<!-- capability-counts:end -->\n\n`core` exposes the standard workflow tools, `pro` adds manufacturing exports, `full` adds controlled documented EasyEDA API calls, and `dev` adds runtime probes for debugging.\n\nCapability scopes add a second authorization layer when `TOOL_SCOPES` is set. Leave it empty for the default local all-capabilities mode, or restrict it with comma/space separated scopes such as `diagnostics:read`, `schematic:read`, `schematic:write`, `bom:read`, `bom:source`, `checks:read`, `pcb:read`, `pcb:write`, `export:write`, `api:read`, `api:write`, and `bridge:execute`.\n\nRaw JavaScript execution is intentionally not part of the default dev tool set. `easyeda_execute` is registered only when both `BRIDGE_RAW_EXEC_ENABLED=true` and `MCP_RAW_EXEC_EXPERIMENTAL=true` are set; when `TOOL_SCOPES` is set it also requires `bridge:execute`.\n\n### L0 — Diagnostics (core)\n\n| Tool                        | Description                                           |\n| --------------------------- | ----------------------------------------------------- |\n| `easyeda_health_check`      | Server health, runtime version, profile, bridge state |\n| `easyeda_bridge_status`     | Bridge connection status, version, capabilities       |\n| `easyeda_get_capabilities`  | Available profiles, features, supported operations    |\n| `easyeda_get_server_config` | Safe/redacted server configuration                    |\n| `easyeda_get_tool_profiles` | Available tool profiles                               |\n| `easyeda_get_feature_flags` | Current feature flags                                 |\n| `easyeda_run_self_test`     | Internal self-test                                    |\n| `easyeda_api_inventory`     | Live EasyEDA API classes, runtime paths, and methods  |\n\n### L0 — Full-control and dev probes\n\n| Tool                           | Profile | Description                                                        |\n| ------------------------------ | ------- | ------------------------------------------------------------------ |\n| `easyeda_api_call`             | full    | Call a documented EasyEDA `Class.method` path through the bridge   |\n| `easyeda_bridge_probe_methods` | dev     | Probe bridge method availability                                   |\n| `easyeda_component_probe`      | dev     | Inspect live schematic component runtime objects and state getters |\n\n`easyeda_api_call` is intentionally not raw JavaScript execution. It only accepts documented EasyEDA Pro API class prefixes (`DMT_`, `SCH_`, `PCB_`, `LIB_`) and a direct method name such as `SCH_PrimitiveWire.getAll`. Methods that can mutate project state, such as `create`, `delete`, `modify`, `openProject`, `save`, `import`, or `export`, require `confirmWrite=true`.\n\nTo enable the controlled full-control API tool in your MCP client, set:\n\n```bash\nTOOL_PROFILE=full\n```\n\n### L1 — Schematic (core)\n\n| Tool                                 | Description                                                 |\n| ------------------------------------ | ----------------------------------------------------------- |\n| `easyeda_schematic_nets`             | List all nets with node connections                         |\n| `easyeda_schematic_components`       | List components with ref, value, footprint, LCSC, datasheet |\n| `easyeda_schematic_net_detail`       | Full detail for a specific net                              |\n| `easyeda_schematic_search_device`    | Search EasyEDA library devices                              |\n| `easyeda_schematic_place_component`  | Place a library component on the active schematic sheet     |\n| `easyeda_schematic_add_wire`         | Add a schematic wire segment                                |\n| `easyeda_schematic_delete_primitive` | Delete schematic components or wires by primitive ID        |\n| `easyeda_schematic_modify_primitive` | Modify schematic component or wire properties               |\n\nThe schematic write APIs use EasyEDA Pro extension APIs that EasyEDA currently marks as beta. The bridge checks for the documented API class names at runtime and returns an explicit error when the installed EasyEDA Pro build does not expose a required method.\n\n### L1 — BOM (core)\n\n| Tool                   | Description                             |\n| ---------------------- | --------------------------------------- |\n| `easyeda_bom_generate` | Generate bill of materials              |\n| `easyeda_bom_validate` | Validate BOM against LCSC inventory     |\n| `easyeda_bom_export`   | Export BOM to file                      |\n| `easyeda_bom_sourcing` | Pricing and availability from suppliers |\n\n### L1 — DRC/ERC (core)\n\n| Tool                         | Description                         |\n| ---------------------------- | ----------------------------------- |\n| `easyeda_drc_run`            | Design rule check for PCB           |\n| `easyeda_erc_run`            | Electrical rule check for schematic |\n| `easyeda_rule_check_summary` | Combined DRC + ERC summary          |\n\n### L1 — Board (core)\n\n| Tool                       | Description                                     |\n| -------------------------- | ----------------------------------------------- |\n| `easyeda_board_layers`     | List PCB layers with type, color, visibility    |\n| `easyeda_board_stackup`    | Layer stackup with thickness, material          |\n| `easyeda_board_dimensions` | Board outline, shape, mounting holes            |\n| `easyeda_board_features`   | Counts of vias, tracks, zones, pads, components |\n\n### L1 — Export (core/pro)\n\n| Tool                        | Profile | Description                         |\n| --------------------------- | ------- | ----------------------------------- |\n| `easyeda_export_gerbers`    | core    | Export Gerber files for fabrication |\n| `easyeda_export_pick_place` | pro     | Export pick-and-place centroid file |\n| `easyeda_export_pdf`        | pro     | Export schematic/board to PDF       |\n| `easyeda_export_netlist`    | pro     | Export netlist                      |\n\n---\n\n## Architecture\n\n```\n┌─────────────────┐     WebSocket      ┌─────────────────────┐\n│   AI Assistant   │ ◄──── MCP ──────► │  easyeda-mcp-pro    │\n│  (Claude, etc.)  │     Protocol      │  (MCP Server)       │\n└─────────────────┘                    │                     │\n                                       │  ┌───────────────┐  │\n┌─────────────────┐     WebSocket      │  │  BridgeManager │──┼──► EasyEDA Pro\n│  EasyEDA Pro     │ ◄── Bridge ──────►│  │  (WS Client)   │  │   (Plugin)\n│  (via Plugin)    │     Protocol      │  └───────────────┘  │\n└─────────────────┘                    │  ┌───────────────┐  │\n                                       │  │  ToolRegistry  │  │\n                                       │  │ (up to 115 tools) │ │\n                                       │  └───────────────┘  │\n                                       │  ┌───────────────┐  │\n                                       │  │    Storage     │──┼──► SQLite\n                                       │  │  (Cache/DB)   │  │\n                                       │  └───────────────┘  │\n                                       │  ┌───────────────┐  │\n                                       │  │   Vendors     │──┼──► JLCPCB/LCSC/\n                                       │  │ (API Clients) │  │    Mouser/DigiKey\n                                       │  └───────────────┘  │\n                                       └─────────────────────┘\n```\n\n### Transports\n\n- **stdio** (default): Standard MCP transport — works with Claude Desktop, Cursor, and most MCP clients\n- **HTTP**: Streamable HTTP transport with `/healthz`, `/readyz`, `/mcp` endpoints, CORS, and optional OAuth — suitable for remote deployments\n\n### Deployment modes\n\nBeyond local stdio/HTTP, the server supports a hosted remote runtime (gateway, session router, and approval-scoped relay under `src/remote/`) for managed connector deployments such as Claude Web or ChatGPT app integrations, plus a self-hosted remote mode for user-managed endpoints. See [Remote MCP Modes](docs/REMOTE_MCP_MODES.md) for the full mode matrix and network/security boundaries of each.\n\n### Bridge extension\n\n```bash\npnpm build:extension\npnpm verify:extension\n```\n\nThe extension build writes `easyeda-bridge-extension.eext` at the repository root.\nIt contains `extension.json`, the bundled browser script, and the image assets\nrequired by EasyEDA Pro.\n\nInstallation: Open EasyEDA Pro → **Settings** → **Extensions** → **Extension Manager...** → **Import Extension**, then select the `.eext` file. Make sure **Allow External Interaction** is enabled for the extension.\n\nFor local bridge development, an experimental loopback-only CDP transport is documented in the [CDP Bridge guide](docs/guide/cdp-bridge.md). The extension remains the recommended transport for normal use. Public delivery targets and milestone lifecycle rules are maintained in the [roadmap](docs/ROADMAP.md).\n\n---\n\n## Agent plugin and skills\n\nThis repository owns the product-level agent plugin and EasyEDA-specific skills for\nEasyEDA MCP Pro. The central [`agent-tools`](https://github.com/oaslananka/agent-tools)\nrepository should catalog this plugin, but the manifest and workflow instructions live\nhere so they stay synchronized with the actual MCP server, bridge extension, tool\nprofiles, and EasyEDA runtime behavior.\n\n| File                                                                     | Purpose                                                                                         |\n| ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- |\n| [`.claude-plugin/plugin.json`](.claude-plugin/plugin.json)               | Claude Code-valid plugin manifest for compatible agent runtimes and marketplace catalogs.       |\n| [`.mcp.json`](.mcp.json)                                                 | Project-local Claude Code MCP server configuration.                                             |\n| [`.codex/config.example.toml`](.codex/config.example.toml)               | Codex CLI MCP configuration example.                                                            |\n| [`.vscode/mcp.example.json`](.vscode/mcp.example.json)                   | VS Code / GitHub Copilot workspace MCP configuration example.                                   |\n| [`opencode.example.jsonc`](opencode.example.jsonc)                       | OpenCode project MCP configuration example.                                                     |\n| [`.opencode/skills/`](.opencode/skills)                                  | OpenCode-native mirrored skill definitions.                                                     |\n| [`docs/agent-runtime-config.md`](docs/agent-runtime-config.md)           | Agent runtime setup and validation matrix.                                                      |\n| [`skills/easyeda-workflow/SKILL.md`](skills/easyeda-workflow/SKILL.md)   | End-to-end EasyEDA setup, inspection, controlled write, export, and reporting workflow.         |\n| [`skills/component-search/SKILL.md`](skills/component-search/SKILL.md)   | Component search, BOM review, sourcing, pricing, availability, and part-risk workflow.          |\n| [`skills/design-validation/SKILL.md`](skills/design-validation/SKILL.md) | DRC/ERC, semantic ERC, PCB constraints, production QA, export, and release-validation workflow. |\n\n### Agent setup\n\nEasyEDA MCP Pro can be launched with the published npm package or from a source checkout:\n\n```bash\nnpx easyeda-mcp-pro\nTRANSPORT=http HTTP_HOST=127.0.0.1 HTTP_PORT=3000 npx easyeda-mcp-pro\npnpm build && node dist/index.js\n```\n\nFor live EasyEDA Pro workflows, install the EasyEDA bridge extension and confirm the\nbridge is reachable with `easyeda_health_check` and `easyeda_bridge_status`. Tool\navailability depends on `TOOL_PROFILE` and optional `TOOL_SCOPES` restrictions.\n\nFor source checkouts, run the normal validation path before publishing plugin changes:\n\n```bash\npython3 -m json.tool .claude-plugin/plugin.json >/dev/null\nclaude plugin validate .\npnpm format:check\npnpm typecheck\npnpm test\npnpm build\npnpm check:metadata\n```\n\n### Validation workflow\n\nBefore listing this plugin as active from `agent-tools`, verify at least one compatible\nagent runtime can:\n\n1. Discover `.claude-plugin/plugin.json`.\n2. Launch or connect to `easyeda-mcp-pro` over `stdio` or HTTP.\n3. Call `easyeda_health_check`, `easyeda_bridge_status`, or `easyeda_get_capabilities`.\n4. Load a skill from `skills/` and follow the workflow without referencing missing tools.\n5. Report bridge state, tool profile, ERC, DRC, BOM, export artifacts, assumptions, and\n   human-review requirements separately.\n\nEasyEDA MCP Pro is an engineering assistant, not an autonomous manufacturing sign-off\nauthority. Generated designs, component selections, and fabrication outputs require\nqualified human review before purchase, fabrication, or assembly.\n\n## Development\n\n### Prerequisites\n\n- **Node.js**: Node.js 24.x is required; repository automation is pinned to **24.18.0**.\n- **pnpm**: local development and automation require exactly **11.5.1**.\n\nPrepare the supported runtime before installing dependencies:\n\n```bash\nnvm install 24.18.0\nnvm use 24.18.0\ncorepack enable\ncorepack prepare pnpm@11.5.1 --activate\nnode scripts/check-runtime.mjs --require-pnpm\n```\n\n- **Go Task** (optional, for Taskfile commands)\n\n### Quick Start\n\n```bash\n# Setup\npnpm install\ncp .env.example .env\n\n# All quality gates (lint + format + typecheck + test + build)\npnpm verify\n\n# Or, if you use Go Task:\ntask verify\n\n# Use focused checks while iterating:\npnpm format:check          # Prettier\npnpm typecheck             # TypeScript\npnpm lint                  # ESLint\n\n# Test\npnpm test                  # Vitest suite\npnpm test:coverage         # With coverage report\n\n# Golden E2E fixture smoke tests are included in `pnpm test`\n# See docs/golden-fixtures.md for fixture architecture\n\n# Build & run\npnpm build                 # tsc -> dist/\npnpm build:extension       # Bundle EasyEDA Pro extension\npnpm verify:extension      # Verify extension package contents\npnpm dev                   # Hot-reload dev mode\npnpm start                 # Run compiled build\n\n# MCP Inspector (debug UI)\npnpm inspector\n```\n\n### Available Taskfile Commands\n\nThis project includes a `Taskfile.yml` with the following commands:\n\n| Command          | Description                        |\n| ---------------- | ---------------------------------- |\n| `task install`   | Install dependencies               |\n| `task lint`      | Run ESLint                         |\n| `task format`    | Check formatting with Prettier     |\n| `task typecheck` | Run TypeScript type checking       |\n| `task test`      | Run tests                          |\n| `task build`     | Build the project                  |\n| `task verify`    | Run all quality gates via Taskfile |\n\nThe package also exposes `pnpm verify`, which runs the same CI-equivalent local gate without requiring Go Task.\n\nInstall [Go Task](https://taskfile.dev/installation/) to use these commands.\n\n### Project structure\n\n```\nsrc/\n├── index.ts                 # Entry point (stdio or HTTP)\n├── bridge/                  # EasyEDA Pro WebSocket bridge protocol\n│   ├── manager.ts, protocol.ts, types.ts\n├── cli/                     # Client auto-setup (setup/extension CLI commands)\n├── config/                  # Environment, tool profiles, feature flags\n│   ├── env.ts, profiles.ts, feature-flags.ts, version.ts\n├── remote/                  # Hosted/self-hosted remote MCP gateway, session router, scopes\n├── schemas/                 # Shared Zod schemas\n├── server/                  # MCP server core\n│   ├── factory.ts, resources-prompts.ts\n│   └── transports/\n│       ├── http.ts                    # HTTP/Streamable HTTP transport\n│       └── oauth-resource-metadata.ts\n├── storage/                 # Node.js sqlite storage (cache, artifacts)\n├── tools/                   # Up to 115 profile-gated MCP tool definitions\n│   ├── register.ts, registry.ts, types.ts, transaction.ts\n│   ├── L0_diagnostics_core.ts, L0_diagnostics_api.ts\n│   ├── L1_schematic_read.ts, L1_schematic_write.ts\n│   ├── L1_bom_core.ts, L1_bom_sourcing.ts\n│   └── L1_drc_erc.ts, L1_board.ts, L1_export.ts, L1_pcb_constraints.ts, L1_pcb_write.ts\n├── vendors/                 # Supplier API clients (lcsc/, jlcpcb/, mouser/, digikey/)\n└── ...                      # circuit, pcb-layout, net-validation, power-tree, production-qa,\n                              # quote-gating, safety, observability, catalog, bom-quality,\n                              # export-manifest, live, easyeda-runtime\n\neasyeda-bridge-extension/    # EasyEDA Pro bridge extension workspace package\n```\n\n---\n\n## Security\n\nSee [Security Architecture & Threat Model](docs/security-architecture.md) for the complete security reference, including deployment modes, authentication, tool safety controls, secrets management, safe defaults, supplier API security, threat scenarios, and deployment checklists.\n\n- **Network safety**: Validates config at startup in every environment — rejects non-loopback HTTP without complete OAuth and an explicit non-wildcard origin allowlist\n- **OAuth/JWKS**: Bearer token validation via JWKS endpoint for HTTP transport (see [OAuth section](docs/security-architecture.md#21-oauth-20--openid-connect-http-transport))\n- **Rate limiting**: Per-IP sliding window rate limiter on HTTP transport (default 100 req/min)\n- **Path traversal protection**: All file export paths validated against `ARTIFACT_DIR`\n- **Secret redaction**: API keys, tokens, passwords are redacted from logs and diagnostic output\n- **Branch protection**: Governance policy requires code reviews and status checks on the `main` branch (see [Repository Governance](docs/REPOSITORY_GOVERNANCE.md))\n- **Code scanning**: CodeQL analysis runs on every push and PR (security-extended + security-and-quality queries)\n- **Dependency management**: Renovate automatically updates dependencies with security patches\n- **Supply-chain hygiene**: pnpm workspace build, pinned GitHub Actions, and no native SQLite addon dependency\n- **Reporting**: See [SECURITY.md](SECURITY.md) for vulnerability disclosure\n\n---\n\n## Release & Dependency Automation\n\nThis repository uses automated workflows to manage dependencies and releases:\n\n- **Renovate**: Automatically scans and updates dependencies based on rules configured in [.github/renovate.json](.github/renovate.json). For details on PR policies and automerging, see [Repository Governance](docs/REPOSITORY_GOVERNANCE.md).\n- **Release Please**: Automates stable version bumps, release metadata, and `CHANGELOG.md`. Numbered `rc.N` candidates use the isolated prerelease path. See the [Release Policy](docs/RELEASE_POLICY.md) and [Release Process](docs/RELEASE_PROCESS.md).\n- **Secure Publishing**: The release workflow rebuilds and verifies all assets, publishes npm with provenance to channel-safe `latest` or `next` dist-tags, uploads the extension and SBOM to the matching GitHub Release, and keeps GHCR/MCP Registry promotion aligned with the selected channel.\n\n---\n\n## Support the project\n\nIf this project helps you save time while working with EasyEDA Pro, BOM workflows, or MCP integrations, you can support ongoing development via the **Buy me a coffee** button at the top of this README.\n\n---\n\n## License\n\n[MIT](LICENSE)\n\n---\n\n## Related\n\n- [Model Context Protocol](https://modelcontextprotocol.io) — Standard protocol for AI tool integration\n- [EasyEDA Pro](https://pro.easyeda.com) — Professional PCB design tool\n",
  "bytes": 44137,
  "sha": "7c30c70475fa641408776e1ec9623b1f6b69b347265e6653f88b3634b57c9576",
  "repo_slug": "oaslananka/easyeda-mcp-pro",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_oaslananka_easyeda_mcp_pro_d52217e7/readme"
}