hwlib-mcp
An MCP server exposing the hw-registry component bundle to AI coding
agents — Claude Code, Cursor, Cline, and anything else that speaks
Model Context Protocol.
The server is read-only. It serves the deterministic bundle produced
by hwlib-build (see BLUEPRINT.md).
Install
uvx hwlib-mcp # PyPI publish lands in Prompt 10
For local dev, see the root README make mcp-install.
Configuration
| Environment variable | Default | Purpose |
|---|---|---|
HWLIB_DATA_DIR |
<repo>/dist |
Directory holding library.sqlite + friends |
If library.sqlite is missing the server prints a diagnostic and exits
non-zero — it does not auto-build. Run python -m tools.builder --out dist/ first.
Wiring it into agents
Claude Code
claude mcp add hwlib uvx hwlib-mcp
# or, pinned to a release:
claude mcp add hwlib uvx --from hwlib-mcp==0.1.0 hwlib-mcp
Cursor
.cursor/mcp.json:
{
"mcpServers": {
"hwlib": {
"command": "uvx",
"args": ["hwlib-mcp"]
}
}
}
Cline
VS Code settings → cline.mcpServers:
{
"hwlib": {
"command": "uvx",
"args": ["hwlib-mcp"]
}
}
Hosted / Streamable HTTP
HWLIB_DATA_DIR=/srv/hwlib/dist hwlib-mcp --http --port 8080
Agents connect via claude mcp add hwlib --transport http http://host:8080. Stdio is the default; --http is for shared /
hosted deployments. SSE is intentionally not supported (deprecated in
MCP 2025-03-26 spec).
Tool surface
| Tool | Returns | Token-discipline note |
|---|---|---|
hwlib_search |
summaries (≤ 20) | call BEFORE hwlib_get |
hwlib_list |
paginated summaries | filter by kind / interface / voltage |
hwlib_get |
one full record | always pass fields: to project |
hwlib_check_pin_conflicts |
{ok, diagnostics[]} |
call BEFORE generating any pin-using code |
hwlib_compatible_modules |
summaries | best-effort; absence ≠ incompatible |
hwlib_get_drivers |
per-framework bindings | use when scaffolding firmware |
hwlib_suggest_pinmap |
stub | post-MVP; alternative_tool: hwlib_check_pin_conflicts |
hwlib_generate_platformio_ini |
stub | post-MVP; alternative_tool: hwlib_get_drivers |
hwlib_generate_sdkconfig |
stub | post-MVP; alternative_tool: hwlib_get_drivers |
hwlib_get_kicad_refs |
stub | post-MVP; alternative_tool: hwlib_get fields=['kicad'] |
Resources (Claude Code first-class, lower-tier elsewhere):
hwlib://component/{id}hwlib://catalog/indexhwlib://schema/{kind}
Every capability is also available as a Tool — Resources are an ergonomics win for Claude Code's @-mention but never the only path.
Debugging
hwlib-mcp --log-level debug # verbose logs to stderr
hwlib-mcp --http --port 8080 # then point MCP Inspector at localhost:8080
Errors are returned as structured shapes, never exceptions:
{"status": "not_found", "id": "...", "suggestions": [...]} etc. If you
see a Python traceback in agent output, please file a bug.
Metadata
Release files for hwlib-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hwlib_mcp-0.1.0.tar.gz | 25.0 kB | With provenance | Details for hwlib_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hwlib_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for hwlib_mcp-0.1.0-py3-none-any.whl |
Total release size: 41.4 kB
Release files / hwlib_mcp-0.1.0.tar.gz
| Download URL | hwlib_mcp-0.1.0.tar.gz |
|---|---|
| Size | 25.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e52847cb361437154fd09a8b7541098adb8e3aabf8572f742f6a076df6c4b444
|
|
BLAKE2b-256 checksum How to use checksums |
9d23b8a8271770af52af0fa2ddca087218d8e4ce5aa3d43ff733b310a1f42889
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.
Transparency logRelease files / hwlib_mcp-0.1.0-py3-none-any.whl
| Download URL | hwlib_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c4e0ec267a6a236e8eb18f0826564a3875088f15ef22656c6a4d20d8523c8f8e
|
|
BLAKE2b-256 checksum How to use checksums |
27b703aa5639ece612477368ad8a05551b26cbc970834cf86f2577f3f95f42f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.
Transparency logSecurity for hwlib-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hwlib_mcp-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.