iwym-mcp
stdio MCP server for iwym catalog maintenance (assets / instruments / asset_tokens) and radar opportunity queries (spreads / funding_opps). It wraps the operator HTTP API.
Does not place exchange orders and does not touch auto_exec.
| Package | iwym-mcp |
| Entry | iwym-mcp → iwym_mcp.server:main |
| Python | ≥ 3.11 |
| Cursor server key | iwym |
Requirements
- uv (recommended) or pip
- A reachable iwym API
- Operator token from Settings → System → OPERATOR API
| Env | Meaning |
|---|---|
IWYM_API_BASE_URL |
API origin only (e.g. http://127.0.0.1:8000 or Tailscale http://jp2:8000). No /api/v1 suffix |
IWYM_OPERATOR_TOKEN |
Bearer from Settings → System → OPERATOR API (Generate / Reset; shown once) |
Missing env vars → process exits 1 with a stderr hint. Cookie login is unchanged; this Bearer works in any APP_ENV and does not need CSRF. Do not use AUTH_ALLOW_BEARER JWTs for this MCP.
Use (local checkout)
cd mcp/iwym
uv sync
export IWYM_API_BASE_URL=http://127.0.0.1:8000
export IWYM_OPERATOR_TOKEN=paste-from-settings-system-operator-api
uv run iwym-mcp # stdio; waits for the MCP host
Tests:
cd mcp/iwym
uv sync
uv run python -m unittest discover -s tests -v
Use (Cursor)
Point Cursor at this directory (dev) or at an installed iwym-mcp on PATH (after package install).
From checkout:
{
"mcpServers": {
"iwym": {
"command": "uv",
"args": [
"--directory",
"/ABS/PATH/iwym-next/mcp/iwym",
"run",
"iwym-mcp"
],
"env": {
"IWYM_API_BASE_URL": "http://127.0.0.1:8000",
"IWYM_OPERATOR_TOKEN": "paste-from-settings-system-operator-api"
}
}
}
}
After install (wheel / uv tool / venv with iwym-mcp on PATH):
{
"mcpServers": {
"iwym": {
"command": "iwym-mcp",
"env": {
"IWYM_API_BASE_URL": "http://127.0.0.1:8000",
"IWYM_OPERATOR_TOKEN": "paste-from-settings-system-operator-api"
}
}
}
}
Build (package)
Bump version in pyproject.toml when cutting a release (currently 0.2.1).
cd mcp/iwym
uv sync
uv build
# → dist/iwym_mcp-<version>-py3-none-any.whl
# → dist/iwym_mcp-<version>.tar.gz
dist/ is gitignored. Install a local wheel:
uv pip install dist/iwym_mcp-*.whl
# or into an isolated tool env:
uv tool install dist/iwym_mcp-*.whl
Publish
Publish the artifacts from uv build to the index you use (public PyPI or a private index).
cd mcp/iwym
uv build
# Public PyPI (token via UV_PUBLISH_TOKEN or keyring):
uv publish
# Private index:
uv publish --index-url https://your-index.example/simple/ --token "$UV_PUBLISH_TOKEN"
Consumers then:
uv pip install iwym-mcp
# or: uv tool install iwym-mcp
iwym-mcp
Tools
Assets
| Tool | HTTP | Notes |
|---|---|---|
list_assets |
GET /api/v1/assets |
Flat array; includes disabled; each row has tokens[] and optional disambiguation |
get_asset |
GET /api/v1/assets/{id} |
Includes tokens[] and disambiguation — no separate list-tokens tool |
catalog_diff |
GET /api/v1/assets/catalog-diffs |
venue optional; include_orphans default false |
create_or_upsert_asset |
PUT /api/v1/assets/{id} |
Tool default enabled=false; does not rewrite existing scalars, including disambiguation |
update_asset |
PATCH /api/v1/assets/{id} |
kind / enabled / display_symbol / oracle / anchor / disambiguation |
set_enabled |
PATCH /api/v1/assets/{id} |
Radar whitelist toggle only |
soft_disable_asset |
DELETE /api/v1/assets/{id} |
enabled=false; keeps row |
disambiguation is an optional human note (nullable, not unique) for rows that share a ticker. list_assets and get_asset return it. create_or_upsert_asset writes it only when the row is created; update_asset changes it (clear_disambiguation=true stores null). It is not a pairing key, scan base, or catalog-link key. display_symbol stays the unique-match ticker.
Asset kind: spot_crypto · stable · wrapped · leveraged_token · equity.
Instruments
| Tool | HTTP |
|---|---|
list_asset_instruments |
GET /api/v1/assets/{id}/instruments |
search_instruments |
GET /api/v1/exchanges/instruments/search |
link_instrument |
PATCH /api/v1/exchanges/instruments/{id}/link |
sync_instruments |
POST /api/v1/exchanges/instruments/sync (hits upstream; heavy) |
Tokens
| Tool | HTTP |
|---|---|
create_asset_token |
POST /api/v1/assets/{id}/tokens |
update_asset_token |
PATCH /api/v1/assets/{id}/tokens/{chain}/{address} |
delete_asset_token |
DELETE … |
reassign_asset_token |
POST /api/v1/assets/tokens/reassign |
migrate_asset_token |
POST /api/v1/assets/tokens/migrate |
lookup_asset_tokens |
POST /api/v1/assets/token-lookups |
Fields: chain_key · address · symbol · decimals · status (trading|offline) · enabled.
Radar opportunities (read-only)
| Tool | HTTP |
|---|---|
list_spreads |
GET /api/v1/radar/spreads |
list_funding_opps |
GET /api/v1/radar/funding-opps |
Default limit=100, max 300. Filters mirror Console Radar boards. No WebSocket board subscription.
Suggested catalog loop
catalog_diff(venue="binance").- For one
missingentry: check aliases / leverage / equity before writing. create_or_upsert_asset(..., enabled=false).- Add chain contracts with
create_asset_tokenwhen needed; link CEX rows via Sync orlink_instrument. set_enabledonly when the asset should enter the Radar scan set.
Security
- Never commit
IWYM_OPERATOR_TOKEN. - The token has operator powers (whitelist / instruments / radar reads); it is not an exchange trading key.
Metadata
Release files for iwym-mcp 0.2.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 |
|---|---|---|---|---|
| iwym_mcp-0.2.1.tar.gz | 61.5 kB | Without provenance | Details for iwym_mcp-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iwym_mcp-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for iwym_mcp-0.2.1-py3-none-any.whl |
Total release size: 72.2 kB
Release files / iwym_mcp-0.2.1.tar.gz
| Download URL | iwym_mcp-0.2.1.tar.gz |
|---|---|
| Size | 61.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9478092a6b39e0f449266a069dd3b1c3ab36813ea6b7ebabe515c6fbfe9a2a63
|
|
BLAKE2b-256 checksum How to use checksums |
b88ee9109820fce166b9976ce63fb99e34c76e24210dc611da3ea8b79d2e7593
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Release files / iwym_mcp-0.2.1-py3-none-any.whl
| Download URL | iwym_mcp-0.2.1-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2acd9a2618e18e92bd6784ce64b47dda67a565a1243f9438348e6a04b5293de
|
|
BLAKE2b-256 checksum How to use checksums |
c7c03225e9bb72cb24e4b477764615f8db07515486a77cf250241d010f523e79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Security for iwym-mcp 0.2.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.