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.7.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.7-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: teasel_server-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 6885ba701600d69f016fd81ce8241e192ada652eac4eb0a6e104367a3959633e
MD5 9e3e8c6a74cd5b782cf0eba6282be27e
BLAKE2b-256 c71213032b8e69644fba147efc5fe6ff8c9b48c7c0cacc34cfe348367dd28edb

See more details on using hashes here.

Provenance

The following attestation bundles were made for teasel_server-0.1.7.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.7-py3-none-any.whl.

File metadata

  • Download URL: teasel_server-0.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 0550f0eca4228d9fc00361c6ba0cefff748c232ce044480a0ac563191cb3534f
MD5 4d43a292e0b0ed06fe5dbcb120e5973c
BLAKE2b-256 21345ca54052a744dcd3dde95487bf4099b7bc166e9e595bf6370276d2f70eff

See more details on using hashes here.

Provenance

The following attestation bundles were made for teasel_server-0.1.7-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