docs: add Official MCP Registry publishing metadata
Add server.json, PyPI mcp-name marker, and publish docs for io.github.emerzon/mtdata-mcp.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
**Turn MetaTrader 5 into a research lab you can script, query from AI agents, or browse in a local web UI.**
|
||||
|
||||
<!-- mcp-name: io.github.emerzon/mtdata-mcp -->
|
||||
|
||||
mtdata is a Windows-first toolkit that sits on top of a running MT5 terminal. It gives you **80+ tools** for market data, forecasting, regime detection, patterns, risk, and trading through the command line and an optional AI-assistant plug ([MCP](docs/MCP.md)), plus a local website and HTTP API.
|
||||
|
||||
It is a **toolkit for exploration and automation**, not a trading strategy or financial advice.
|
||||
@@ -173,7 +175,7 @@ Dependency caveats (NeuralForecast optional installs, Python 3.14 exclusions, op
|
||||
|
||||
### Naming
|
||||
|
||||
The PyPI package is **`mtdata-mcp`**. The command-line entry is **`mtdata-cli`** (not `mtdata`). That avoids a clash with the unrelated [mtdata](https://pypi.org/project/mtdata/) machine-translation dataset package, which already owns the `mtdata` CLI. The importable Python package remains `mtdata` (`import mtdata`).
|
||||
The PyPI package is **`mtdata-mcp`**. The command-line entry is **`mtdata-cli`** (not `mtdata`). That avoids a clash with the unrelated [mtdata](https://pypi.org/project/mtdata/) machine-translation dataset package, which already owns the `mtdata` CLI. The importable Python package remains `mtdata` (`import mtdata`). IDE and assistant configs should still launch **`mtdata-stdio`**. A `mtdata-mcp` console-script alias points at the same stdio entry so Official MCP Registry clients that compose `uvx mtdata-mcp` start that server.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
# Publish mtdata to PyPI and the Official MCP Registry
|
||||
|
||||
**Audience:** Contributor
|
||||
|
||||
This page is for the package owner (GitHub user **emerzon**) when cutting a
|
||||
public release. It is not an install guide. Day-to-day setup stays in
|
||||
[SETUP.md](SETUP.md).
|
||||
|
||||
Do **not** publish from CI or an automated agent unless Emerson has explicitly
|
||||
started that release. Agents working this repo must not run `twine upload` or
|
||||
`mcp-publisher publish`.
|
||||
|
||||
**Related:** [Setup](SETUP.md) · [AI assistant](MCP.md) · [Naming](../README.md#naming) · [Env vars](ENV_VARS.md) (Operator)
|
||||
|
||||
---
|
||||
|
||||
## What you are publishing
|
||||
|
||||
| Artifact | Name | Notes |
|
||||
|----------|------|-------|
|
||||
| PyPI package | `mtdata-mcp` | Import stays `mtdata`. Version **0.1.0** in `pyproject.toml`. |
|
||||
| MCP Registry server | `io.github.emerzon/mtdata-mcp` | Metadata only. Authenticate as GitHub user **emerzon**. |
|
||||
| Human-facing stdio script | `mtdata-stdio` | What [MCP.md](MCP.md) tells IDE configs to run. |
|
||||
| Registry launch alias | `mtdata-mcp` | Same `main_stdio` entry so `uvx mtdata-mcp` works. |
|
||||
|
||||
The Official MCP Registry hosts **metadata**, not the wheel. Publish to PyPI
|
||||
first so the registry can verify the `mcp-name` ownership marker in the
|
||||
package README.
|
||||
|
||||
Registry metadata is platform-agnostic. Runtime is not: the package depends
|
||||
on **MetaTrader5**, which needs **Windows** and a **running MT5 terminal**.
|
||||
macOS and Linux users run mtdata on a Windows machine or VM.
|
||||
|
||||
---
|
||||
|
||||
## 1. Confirm the ownership marker
|
||||
|
||||
The PyPI long description **must** contain this HTML comment (already near
|
||||
the top of [README.md](../README.md)):
|
||||
|
||||
```html
|
||||
<!-- mcp-name: io.github.emerzon/mtdata-mcp -->
|
||||
```
|
||||
|
||||
Keep it when you edit the README. The registry fetches the published
|
||||
description; the name after `mcp-name:` **must** match `server.json` `name`
|
||||
exactly (`io.github.emerzon/mtdata-mcp`).
|
||||
|
||||
---
|
||||
|
||||
## 2. Build and upload the PyPI package
|
||||
|
||||
From the repository root, with credentials for the `mtdata-mcp` project on
|
||||
PyPI:
|
||||
|
||||
```bash
|
||||
python -m build
|
||||
twine upload dist/*
|
||||
```
|
||||
|
||||
Upload only after the README marker is present. PyPI forbids replacing an
|
||||
already-published version, so do not re-upload `0.1.0` once it is live.
|
||||
|
||||
---
|
||||
|
||||
## 3. Install mcp-publisher and publish `server.json`
|
||||
|
||||
[`server.json`](../server.json) at the repo root describes the server for
|
||||
[registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io).
|
||||
|
||||
1. Install [`mcp-publisher`](https://github.com/modelcontextprotocol/registry)
|
||||
(latest release binary, or `brew install mcp-publisher`).
|
||||
2. Authenticate as **emerzon** (GitHub device flow):
|
||||
|
||||
```bash
|
||||
mcp-publisher login github
|
||||
```
|
||||
|
||||
3. From the repository root (reads this `server.json`):
|
||||
|
||||
```bash
|
||||
mcp-publisher publish
|
||||
```
|
||||
|
||||
GitHub auth only allows the namespace prefix `io.github.emerzon/`. The server
|
||||
name is **`io.github.emerzon/mtdata-mcp`**.
|
||||
|
||||
---
|
||||
|
||||
## Schema notes (`mtdata-stdio`)
|
||||
|
||||
`server.json` follows
|
||||
[`2025-12-11/server.schema.json`](https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json)
|
||||
— the current Official Registry pin.
|
||||
|
||||
Adjustments from a naive copy of older drafts:
|
||||
|
||||
- **Description** is at most 100 characters (schema `maxLength`).
|
||||
- **stdio transport** is only `{ "type": "stdio" }`. There is no command or
|
||||
binary field on the transport.
|
||||
- Official 2026 PyPI examples set `runtimeHint` to `uvx` (not `python`).
|
||||
Clients compose `runtimeHint` + `identifier` + `packageArguments` →
|
||||
`uvx mtdata-mcp`. `packageArguments` are extra args *after* that token, so
|
||||
they cannot rename the binary to `mtdata-stdio`. Empty `packageArguments`
|
||||
are omitted.
|
||||
- Because the human-facing console script is **`mtdata-stdio`**,
|
||||
`pyproject.toml` also declares a **`mtdata-mcp`** alias on
|
||||
`mtdata.core.server:main_stdio`. That is what makes `uvx mtdata-mcp` start
|
||||
the stdio server. Manual client configs should still use
|
||||
`"command": "mtdata-stdio"` as in [MCP.md](MCP.md).
|
||||
|
||||
---
|
||||
|
||||
## Version
|
||||
|
||||
Keep **0.1.0** aligned with `pyproject.toml` until you intentionally cut a
|
||||
new release. Then bump `pyproject.toml` and both `version` fields in
|
||||
`server.json` together.
|
||||
@@ -118,6 +118,7 @@ These are **not** tutorials. They track coverage and dependency work.
|
||||
| [WEBUI_API_COVERAGE.md](WEBUI_API_COVERAGE.md) | Route × UI matrix |
|
||||
| [WEBUI_TOOL_COVERAGE.md](WEBUI_TOOL_COVERAGE.md) | All 83 tools × UI surface |
|
||||
| [DEPENDENCY_MIGRATION.md](DEPENDENCY_MIGRATION.md) | Python 3.14 package snapshot |
|
||||
| [PUBLISHING.md](PUBLISHING.md) | PyPI + Official MCP Registry publish sequence (emerzon) |
|
||||
| [STYLE.md](STYLE.md) | Docs persona and page contract |
|
||||
|
||||
## Common workflows (recipes)
|
||||
|
||||
@@ -520,3 +520,6 @@ Once candles list and a simple forecast run:
|
||||
5. [LIMITATIONS.md](LIMITATIONS.md) — Caveats before deep integrations
|
||||
|
||||
Also useful later: [FINVIZ.md](FINVIZ.md) (company, screens, calendars) · [TEMPORAL.md](TEMPORAL.md) · [FORECAST.md](FORECAST.md)
|
||||
|
||||
Publishing the PyPI package and Official MCP Registry listing is a
|
||||
Contributor task: [PUBLISHING.md](PUBLISHING.md).
|
||||
|
||||
@@ -158,6 +158,8 @@ all-git = [
|
||||
[project.scripts]
|
||||
mtdata-sse = "mtdata.core.server:main_sse"
|
||||
mtdata-stdio = "mtdata.core.server:main_stdio"
|
||||
# Alias so Official MCP Registry clients that compose `uvx mtdata-mcp` launch stdio.
|
||||
mtdata-mcp = "mtdata.core.server:main_stdio"
|
||||
mtdata-streamable-http = "mtdata.core.server:main_streamable_http"
|
||||
mtdata-webapi = "mtdata.core.web_api:main_webapi"
|
||||
mtdata-cli = "mtdata.core.cli:main"
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
||||
"name": "io.github.emerzon/mtdata-mcp",
|
||||
"title": "mtdata",
|
||||
"description": "MetaTrader 5 research toolkit: market data, forecasts, regimes, patterns, risk, dry-run trading.",
|
||||
"websiteUrl": "https://github.com/emerzon/mtdata-mcp",
|
||||
"repository": {
|
||||
"url": "https://github.com/emerzon/mtdata-mcp",
|
||||
"source": "github",
|
||||
"id": "1047705820"
|
||||
},
|
||||
"version": "0.1.0",
|
||||
"packages": [
|
||||
{
|
||||
"registryType": "pypi",
|
||||
"registryBaseUrl": "https://pypi.org",
|
||||
"identifier": "mtdata-mcp",
|
||||
"version": "0.1.0",
|
||||
"runtimeHint": "uvx",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
},
|
||||
"environmentVariables": [
|
||||
{
|
||||
"name": "MT5_LOGIN",
|
||||
"description": "MetaTrader 5 account number (optional if MT5 already logged in interactively)",
|
||||
"isRequired": false,
|
||||
"isSecret": false,
|
||||
"format": "string"
|
||||
},
|
||||
{
|
||||
"name": "MT5_PASSWORD",
|
||||
"description": "MetaTrader 5 account password",
|
||||
"isRequired": false,
|
||||
"isSecret": true,
|
||||
"format": "string"
|
||||
},
|
||||
{
|
||||
"name": "MT5_SERVER",
|
||||
"description": "Broker server name",
|
||||
"isRequired": false,
|
||||
"isSecret": false,
|
||||
"format": "string"
|
||||
},
|
||||
{
|
||||
"name": "MTDATA_TRADE_GUARDRAILS_ENABLED",
|
||||
"description": "Enable optional pre-trade guardrails (recommended)",
|
||||
"isRequired": false,
|
||||
"isSecret": false,
|
||||
"format": "boolean"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user