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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18c0be1f34ad374944e74b26431ba8713b9cbf107207b9ee1addbfb99c7b9029
|
|
| MD5 |
c65fadc2285e00cf78da8cadad798187
|
|
| BLAKE2b-256 |
5d5eec53910be33470276e868199acca4bc75e7744f111e694c2fe4c132ad9bf
|
Provenance
The following attestation bundles were made for teasel_server-0.1.6.tar.gz:
Publisher:
release.yml on teasel-tools/teasel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teasel_server-0.1.6.tar.gz -
Subject digest:
18c0be1f34ad374944e74b26431ba8713b9cbf107207b9ee1addbfb99c7b9029 - Sigstore transparency entry: 1433219238
- Sigstore integration time:
-
Permalink:
teasel-tools/teasel@1897de057d5d3320e827c383b26108b0a714113b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/teasel-tools
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1897de057d5d3320e827c383b26108b0a714113b -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8d466adc2ed8e241bbd455f46e4a310e30df0a6b4708de74438b714426a6b84
|
|
| MD5 |
79851715c02e60d219be5ababa43fe61
|
|
| BLAKE2b-256 |
55095645209782bc16477942b8e916aa655ec3feeb36663c4d11228ce24b219a
|
Provenance
The following attestation bundles were made for teasel_server-0.1.6-py3-none-any.whl:
Publisher:
release.yml on teasel-tools/teasel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teasel_server-0.1.6-py3-none-any.whl -
Subject digest:
b8d466adc2ed8e241bbd455f46e4a310e30df0a6b4708de74438b714426a6b84 - Sigstore transparency entry: 1433219428
- Sigstore integration time:
-
Permalink:
teasel-tools/teasel@1897de057d5d3320e827c383b26108b0a714113b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/teasel-tools
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1897de057d5d3320e827c383b26108b0a714113b -
Trigger Event:
push
-
Statement type: