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.6.tar.gz (19.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.6-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: teasel_server-0.1.6.tar.gz
  • Upload date:
  • Size: 19.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.6.tar.gz
Algorithm Hash digest
SHA256 18c0be1f34ad374944e74b26431ba8713b9cbf107207b9ee1addbfb99c7b9029
MD5 c65fadc2285e00cf78da8cadad798187
BLAKE2b-256 5d5eec53910be33470276e868199acca4bc75e7744f111e694c2fe4c132ad9bf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: teasel_server-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 23.9 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b8d466adc2ed8e241bbd455f46e4a310e30df0a6b4708de74438b714426a6b84
MD5 79851715c02e60d219be5ababa43fe61
BLAKE2b-256 55095645209782bc16477942b8e916aa655ec3feeb36663c4d11228ce24b219a

See more details on using hashes here.

Provenance

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