Skip to main content

SpecSwarm

Hardware specification analyzer for embedded software development. Part of the Swarm Suite.

SpecSwarm parses datasheets, reference manuals, and hardware documentation to extract structured data -- register maps, pin configurations, protocol parameters, timing constraints, power specifications, and memory layouts. It makes this information available to AI agents via MCP tools before any code exists.

Installation

pip install spec-swarm-ai

For PDF datasheet support:

pip install spec-swarm-ai[pdf]

Quick Start

As MCP Server

Add to your MCP client configuration:

{
  "mcpServers": {
    "spec-swarm": {
      "command": "spec-swarm",
      "args": ["serve", "--transport", "stdio"]
    }
  }
}

CLI Usage

# Start the MCP server
spec-swarm serve --transport stdio

# Ingest a datasheet
spec-swarm ingest path/to/STM32F407_datasheet.pdf --component STM32F407VG

# Check session status
spec-swarm status

MCP Tools

Tool Description
spec_start_session Start a spec analysis session for a project
spec_list_sessions List all spec analysis sessions
spec_ingest Ingest a document and extract hardware specs
spec_add_manual Manually add a hardware specification
spec_get_registers Get register map for a component
spec_get_pins Get pin configuration
spec_get_protocols Get communication protocol configurations
spec_get_timing Get timing constraints
spec_get_memory_map Get memory map regions
spec_get_constraints Get all hardware constraints
spec_search Search specs by keyword
spec_check_conflicts Check for pin collisions, bus conflicts, power budget violations
spec_suggest_experts Suggest spec expert profiles for the project
spec_export_for_arch Export specs as architectural constraints for ArchSwarm
spec_get_summary Get summary of all specs in a session

Supported Document Formats

  • PDF (requires pymupdf -- install with pip install spec-swarm-ai[pdf])
  • Plain text (.txt)
  • Markdown (.md)
  • reStructuredText (.rst)
  • CSV (.csv)

Expert Profiles

SpecSwarm includes 8 expert profiles for hardware specification analysis:

  • MCU Peripherals -- GPIO, clock tree, interrupts, DMA
  • Communication Protocols -- SPI, I2C, UART, CAN, USB, Ethernet
  • Power Management -- voltage rails, current budgets, sleep modes
  • Sensor Interfaces -- ADC, sampling, calibration, filtering
  • Motor Control -- PWM, H-bridge, encoders, FOC
  • Memory Layout -- flash/RAM partitioning, linker scripts, bootloader
  • Timing Constraints -- deadlines, watchdog, jitter, clock drift
  • Safety Requirements -- IEC 61508, redundancy, fail-safe design

Integration with Swarm Suite

SpecSwarm stores extracted specifications in swarm-kb, making them available to:

  • ArchSwarm -- hardware constraints inform architecture decisions
  • ReviewSwarm -- verify code against datasheet requirements
  • FixSwarm -- apply hardware-aware fixes

License

MIT

Metadata

Release files for spec-swarm-ai 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spec-swarm-ai 0.2.1
File Size Uploaded Provenance
spec_swarm_ai-0.2.1.tar.gz 42.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for spec-swarm-ai 0.2.1
File Interpreter ABI Platform
spec_swarm_ai-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 87.8 kB

Release files / spec_swarm_ai-0.2.1.tar.gz

Download URL spec_swarm_ai-0.2.1.tar.gz
Size 42.6 kB
Tags Source
SHA-256 checksum
How to use checksums
edf47a2d8d0f71672392858b766ea0f2b26bfce2960e4faeabc45b6e0658924e
BLAKE2b-256 checksum
How to use checksums
70cea56b247e40fb6f5f98facdfc9848f29a20c538aa24d14cd93bf85c70fb6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release files / spec_swarm_ai-0.2.1-py3-none-any.whl

Download URL spec_swarm_ai-0.2.1-py3-none-any.whl
Size 45.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2ebd5808260a838622877cb708e88cf8b904387450a495463a7fefa58890e14
BLAKE2b-256 checksum
How to use checksums
ff6b7d81a592be9e7bb7c37d3baa9489b8213af54e3a02cc035df991b211375b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Security for spec-swarm-ai 0.2.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page