psrmcp
English | 简体中文
An MCP (Model Context Protocol) server wrapping the pulsar astronomy software stack (dspsr / psrchive / tempo2 / psrcat / PINT): task-oriented tools, controlled parameters, structured results, and full provenance.
Repositories: https://gitlab.com/zhangyazhou416/psrmcp · https://github.com/zhangyazhou416/psrmcp
- Overview: docs/FEATURES.md (what it does, all 19 tools) — Chinese
- Tutorial: docs/TUTORIAL.md (setup, MCP clients, a full processing-chain walkthrough) — Chinese
- Design: docs/DESIGN.md — Chinese
- Tool contracts: docs/TOOLS.md (input/output schemas for all 19 tools) — Chinese
- One-click software stack installer: scripts/install_pulsar_stack.sh (builds everything into
~/.pulsar, see docs/INSTALL.md — Chinese)
Quick start
Install from PyPI
pip install psrmcp # library + the psrmcp CLI entry point
# standalone CLI instead: uv tool install psrmcp / pipx install psrmcp
psrmcp --init-config ~/.psrmcp.toml
PSRMCP_CONFIG=~/.psrmcp.toml psrmcp
The pulsar software stack is installed separately (below); without it the server still starts and reports missing backends.
Run from source
# 1. Install the pulsar software stack (optional; without it the server degrades
# gracefully and reports each missing backend via pulsar_environment)
bash scripts/install_pulsar_stack.sh # add --with-presto to also build PRESTO
# 2. Set up the MCP server environment
uv sync
# 3. Generate a default config and start (stdio)
uv run psrmcp --init-config ~/.psrmcp.toml
PSRMCP_CONFIG=~/.psrmcp.toml uv run psrmcp
Connect an MCP client (e.g. Claude Code / Claude Desktop)
{
"mcpServers": {
"psrmcp": {
"command": "uv",
"args": ["--directory", "/path/to/psrmcp", "run", "psrmcp"],
"env": {"PSRMCP_CONFIG": "~/.psrmcp.toml"}
}
}
}
Installed from PyPI, the entry point is simply "command": "psrmcp".
Development
uv run pytest -q # unit tests (no backends required)
PSRMCP_CONTRACT=1 uv run pytest tests/contract # contract tests (needs the installed stack)
Publishing to PyPI
Automatic via CI (PyPI Trusted Publishing / OIDC — no long-lived tokens): .github/workflows/publish.yml is the primary channel, .gitlab-ci.yml kept as a fallback.
git tag v0.1.0 && git push origin v0.1.0 # a tag triggers build & upload (keep tag in sync with version)
One-time setup: register a pending publisher on pypi.org (Owner zhangyazhou416, Repository psrmcp, Workflow publish.yml) — see the workflow file header for details. Manual publishing: uv build && uv publish.
Status
v0.1.0 — MVP (Phase 0–2): environment introspection, data discovery, catalog queries, archive inspect/convert/merge, dedispersion, RFI, standard profiles, TOA extraction, PINT timing fits and diagnostics.
License
Metadata
Release files for psrmcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| psrmcp-0.1.1.tar.gz | 271.7 kB | With provenance | Details for psrmcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| psrmcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for psrmcp-0.1.1-py3-none-any.whl |
Total release size: 356.9 kB
Release files / psrmcp-0.1.1.tar.gz
| Download URL | psrmcp-0.1.1.tar.gz |
|---|---|
| Size | 271.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c685fb26955bcbc582ff04b5bf0b078c726b5486581b122cd0686cec815f05f3
|
|
BLAKE2b-256 checksum How to use checksums |
38292c5a9ccd443108361620f2554706da5d2a172ad7b8a5806baf82fbf1aa93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 24, 2026.
Transparency logRelease files / psrmcp-0.1.1-py3-none-any.whl
| Download URL | psrmcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 85.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5774f2090d11f0e5477d221519a12d82a0fb8e868e094c6bf7b9a8c09aab65f
|
|
BLAKE2b-256 checksum How to use checksums |
99fedbb49371055f3fd530512c51970cf5e4c9b63c89421e533455624ef321c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 24, 2026.
Transparency logSecurity for psrmcp 0.1.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for psrmcp-0.1.1.tar.gz
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 Oct 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.