Skip to main content

Unified MCP server for lab instruments

Project description

teasel-server

MCP server for lab instruments.

teasel-server is the Model Context Protocol server that exposes lab instruments as tools to AI assistants. It is launched automatically by Claude Code (or any MCP-compatible assistant) — you do not run it directly.

Setup

Use the teasel CLI to generate the .mcp.json config file that tells your AI assistant how to start this server:

uvx teasel

See the teasel package for full setup instructions.

Bundled instruments

The following instruments are included out of the box:

Instrument Slug Interfaces
LeCroy WaveSurfer lecroy-wavesurfer Ethernet (VXI-11), USB
Philips PM5190 pm5190 GPIB (via AR488 serial adapter)

An instrument only activates if its required environment variables are present — unconfigured instruments are invisible to the AI.

Third-party drivers

Any Python package can add instruments without modifying teasel-server. Declare a teasel.instruments entry point in your pyproject.toml:

[project.entry-points."teasel.instruments"]
my-instrument = "my_package.driver:MyInstrumentDriver"

Inject it at runtime with uvx:

uvx --with my-instrument-package teasel-server

Or add it to the args list in .mcp.json:

{
  "mcpServers": {
    "lab": {
      "command": "uvx",
      "args": ["--with", "my-instrument-package", "teasel-server"],
      "env": { "MY_INSTRUMENT_HOST": "192.168.1.50" }
    }
  }
}

Writing a driver

Drivers subclass one of the base classes from teasel_server.base:

from teasel_server.base import OscilloscopeBase, WaveformData

class MyScope(OscilloscopeBase):
    slug = "my-scope"
    name = "My Oscilloscope"

    def __init__(self, config: dict):
        host = config.get("MY_SCOPE_HOST")
        if not host:
            raise ValueError("MY_SCOPE_HOST is required")
        # connect to instrument...

    def capture_waveform(self, channel: int) -> WaveformData:
        # implementation...

Available base classes: OscilloscopeBase, FunctionGeneratorBase.

License

AGPL v3 — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

teasel_server-0.1.8.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

teasel_server-0.1.8-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file teasel_server-0.1.8.tar.gz.

File metadata

  • Download URL: teasel_server-0.1.8.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for teasel_server-0.1.8.tar.gz
Algorithm Hash digest
SHA256 7d5dc592fe803e12c515e262dd5013fff4775fcde84dd73e50b9a50da0dfc5da
MD5 897a0f17211a6c4f0aa9a1b8127b5914
BLAKE2b-256 7394ef19faf95cd5942533a6301f198d2cffbee75c504ac350e57e5c99e92fe5

See more details on using hashes here.

Provenance

The following attestation bundles were made for teasel_server-0.1.8.tar.gz:

Publisher: release.yml on teasel-tools/teasel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file teasel_server-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: teasel_server-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for teasel_server-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 fe050a54ebea2ea0cf64fe40259f2bbb8deac116bc6d1b78d59ed4aafe57bc43
MD5 660baf68d8fed4b4b61b6275a54aaeab
BLAKE2b-256 0a48941b393fb1cb09ea6ebc7fe4cba60d5c5fe0e76c51218fc7788d1a6d4473

See more details on using hashes here.

Provenance

The following attestation bundles were made for teasel_server-0.1.8-py3-none-any.whl:

Publisher: release.yml on teasel-tools/teasel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page