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.9.tar.gz (24.8 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.9-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: teasel_server-0.1.9.tar.gz
  • Upload date:
  • Size: 24.8 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.9.tar.gz
Algorithm Hash digest
SHA256 e3220239a6193d289ad957ab80e394c27c09a4c38db103de1fe24793312f9257
MD5 fd3dd76b88c8c15f7dcf108112b7bdcf
BLAKE2b-256 296522610c2d1bd113f8e5ce86e448587adccb9954181103bcd207f3427eac3b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: teasel_server-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 30.5 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 a9bbce22c0e4100298617639bef7d7acdab74e66f76c5ee31614ab027aa3cd54
MD5 0c5b71488df8959854bab474f1c0880f
BLAKE2b-256 822e294295a8eca11c35237972445aa01d2e2c9e08058ba7d501f71345af7bd9

See more details on using hashes here.

Provenance

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