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.
Metadata
Release files for teasel-server 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| teasel_server-0.1.10.tar.gz | 43.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| teasel_server-0.1.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 98.9 kB
Release files / teasel_server-0.1.10.tar.gz
| Download URL | teasel_server-0.1.10.tar.gz |
|---|---|
| Size | 43.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2e68a3c46e472f38211867d182e759765aaaa917cd311afce6dde91e5ec90ef
|
|
BLAKE2b-256 checksum How to use checksums |
dd968814929a6ea184b54d59e376a2f3602b39abd280b70213c25af01996d228
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.
Transparency logRelease files / teasel_server-0.1.10-py3-none-any.whl
| Download URL | teasel_server-0.1.10-py3-none-any.whl |
|---|---|
| Size | 55.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42b34bbb447f2c55da96d67070432513abbc7049d619d8ab1cdc14cdf3bf02f7
|
|
BLAKE2b-256 checksum How to use checksums |
7a8e89df567a79c6abf735c77f1adc5c93dd804c8ca07301dc83536a380b6068
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.
Transparency log