@pipeworx/mcp-emarket-storage 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pipeworx-staged-ok +6 -0
- package/LICENSE +21 -0
- package/README.md +215 -0
- package/bin/cli.js +17 -0
- package/package.json +28 -0
- package/server.json +18 -0
- package/src/index.ts +1183 -0
- package/src/server.ts +45 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"staged_at": "2026-09-24T16:29:16.941Z",
|
|
3
|
+
"publisher_blob": "da6994091dc9dcc6a7433084251ca4bbd58b4bed",
|
|
4
|
+
"publisher_commit": "1c417b2cfcdac06e2d9210e869265722ef013f20",
|
|
5
|
+
"note": "Written by scripts/publish-pack.sh as its LAST step. Its presence is the ONLY thing that lets stage-unpublished-packs.sh skip this pack. Deleting this dir is the correct way to force a rebuild."
|
|
6
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mojibake Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# @pipeworx/emarket-storage
|
|
2
|
+
|
|
3
|
+
Italian regulated company disclosures direct from eMarket Storage (Teleborsa)
|
|
4
|
+
— a document index (title, issuer, timestamp, PDF link), updated same-day,
|
|
5
|
+
built to fix the months-long lag in the community ESEF index for current-year
|
|
6
|
+
Italian filings.
|
|
7
|
+
|
|
8
|
+
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1678+ live data sources.
|
|
9
|
+
|
|
10
|
+
## Tools
|
|
11
|
+
|
|
12
|
+
- `emarket_search_disclosures(company?, azienda_id?, category?, market?, cerca?, date_from?, date_to?, limit?, offset?)`
|
|
13
|
+
— search disclosures by issuer (name, resolved against eMarket's own
|
|
14
|
+
issuer list, or a known azienda_id), EU Transparency Directive category,
|
|
15
|
+
market segment, and/or a publication date window. Returns newest first.
|
|
16
|
+
- `emarket_get_disclosure(id, date)` — fetch one disclosure by its Teleborsa
|
|
17
|
+
protocollo id and publication date (both come from a prior search — this
|
|
18
|
+
source has no by-id-only lookup).
|
|
19
|
+
|
|
20
|
+
## Why this pack exists
|
|
21
|
+
|
|
22
|
+
`esef-filings` proxies `filings.xbrl.org`, a community index whose
|
|
23
|
+
current-year coverage for Italian issuers runs months behind (the same
|
|
24
|
+
problem `amf-filings` fixes for France). This pack goes to eMarket Storage,
|
|
25
|
+
one of Italy's two Officially Appointed Mechanisms (OAMs) for Transparency
|
|
26
|
+
Directive disclosures, directly. **Measured live 2026-09-23**: a
|
|
27
|
+
`category="104"` (Informazioni privilegiate) search for 2026-09-22..09-24
|
|
28
|
+
returned a WEBUILD disclosure published 2026-09-23T17:13 local time (same
|
|
29
|
+
day as the query), with its PDF confirmed reachable (HTTP 200).
|
|
30
|
+
|
|
31
|
+
## ⚠️ Four things a caller must know
|
|
32
|
+
|
|
33
|
+
1. **eMarket-covered issuers only — this is not the full Italian market.**
|
|
34
|
+
Italy has a SECOND, separate OAM, **1INFO** (a different keyless JSON API
|
|
35
|
+
covering roughly 314 issuers). An issuer discloses through exactly one of
|
|
36
|
+
the two. Some well-known names are 1INFO issuers and will NOT be found
|
|
37
|
+
here — confirmed 2026-09-23 by checking eMarket Storage's own ~480-company
|
|
38
|
+
issuer picklist: neither **IREN** nor **SOMEC** appear in it. A company
|
|
39
|
+
search that matches nothing returns an explanatory `note`, not a bare
|
|
40
|
+
error, saying the issuer may be a 1INFO issuer instead. This pack does not
|
|
41
|
+
merge 1INFO data.
|
|
42
|
+
2. **This is a document index, not an XBRL-facts API.** Every row is a
|
|
43
|
+
disclosure EVENT: a title, an issuer, a publication timestamp, and a link
|
|
44
|
+
to the underlying PDF. There is no per-fact extraction — no "give me net
|
|
45
|
+
income for FY2025" lookup.
|
|
46
|
+
3. **No ISIN or LEI.** Unlike `amf-filings`, eMarket Storage's listing and
|
|
47
|
+
its issuer picklist expose only a company NAME and an internal Teleborsa
|
|
48
|
+
numeric id (`azienda_id`) — no ISIN/LEI field was found anywhere on the
|
|
49
|
+
listing or a per-company page (checked 2026-09-23). Identify issuers by
|
|
50
|
+
name (resolved automatically against the site's own list) or by
|
|
51
|
+
`azienda_id` directly once you have it from a prior search.
|
|
52
|
+
4. **`date_to` is INCLUSIVE in this tool — the underlying source's own
|
|
53
|
+
`data_to` is EXCLUSIVE, and that mismatch silently drops rows, not just on
|
|
54
|
+
an exact single-day query.** Verified live 2026-09-24 against the raw
|
|
55
|
+
source: `data_from=2026-09-21&data_to=2026-09-22` returned 13 rows, ALL
|
|
56
|
+
from the 21st — the entire 22nd silently vanished, with no error, no
|
|
57
|
+
empty-result signal, nothing to indicate the caller's "21st through 22nd"
|
|
58
|
+
request was answered wrong. `emarket_search_disclosures` always sends the
|
|
59
|
+
source a `data_to` one calendar day past the caller's inclusive `date_to`
|
|
60
|
+
(a lone `date_from` with no `date_to` means "just that one day"), and the
|
|
61
|
+
response echoes both `date_to` (your inclusive value) and
|
|
62
|
+
`upstream_date_to_exclusive` (the raw bound actually sent) — so a caller
|
|
63
|
+
asking for "the 21st through the 22nd" now correctly gets rows from both
|
|
64
|
+
days. Confirmed locally: the same 21→22 request now returns rows dated
|
|
65
|
+
both 2026-09-21 and 2026-09-22.
|
|
66
|
+
|
|
67
|
+
## Auth
|
|
68
|
+
|
|
69
|
+
Keyless. No account, no API key.
|
|
70
|
+
|
|
71
|
+
## Data sources
|
|
72
|
+
|
|
73
|
+
- <https://www.emarketstorage.it/it/comunicati-finanziari> — eMarket
|
|
74
|
+
Storage's public disclosure listing (Teleborsa, an EU Transparency
|
|
75
|
+
Directive OAM for Italy). Pipeworx queries it live on every call; there is
|
|
76
|
+
no bulk download or formal API (`/jsonapi` on this Drupal site 404s — it
|
|
77
|
+
is HTML-only), so this pack parses the listing's HTML directly.
|
|
78
|
+
|
|
79
|
+
## Gotchas
|
|
80
|
+
|
|
81
|
+
- No formal API. The listing is a plain GET-filterable Drupal View
|
|
82
|
+
(`azienda`, `mercato`, `categoria`, `data_from`/`data_to`, `cerca`). This
|
|
83
|
+
pack parses the rendered HTML with targeted regex — Cloudflare Workers
|
|
84
|
+
have no DOMParser (same approach as `spain-tenders`).
|
|
85
|
+
- **The row's `datetime` attribute (on its `time` element) is broken** —
|
|
86
|
+
every row observed carries something like `34Z` (just trailing seconds
|
|
87
|
+
and a "Z", an upstream templating bug), not a usable timestamp. This pack
|
|
88
|
+
parses the human-readable text instead ("DD/MM/YYYY - HH:MM", Italian
|
|
89
|
+
local time) and returns it as `published_at_local` with an explicit
|
|
90
|
+
`timezone: "Europe/Rome"` field — it is NOT converted to UTC, since doing
|
|
91
|
+
that correctly needs DST awareness this pack does not assume.
|
|
92
|
+
- **The listing does not expose a category per row** — only the `categoria`
|
|
93
|
+
filter parameter accepts one. `emarket_search_disclosures` therefore
|
|
94
|
+
echoes the requested `category` onto every result when the caller filtered
|
|
95
|
+
by it (that is a true fact about a filtered result, not a guess); on an
|
|
96
|
+
unfiltered search, `category` is honestly `null` rather than fabricated.
|
|
97
|
+
- **Fixed page size of 24**, confirmed live (every page but the last was
|
|
98
|
+
exactly 24 rows). There is no total-count field anywhere in the response;
|
|
99
|
+
when a next page exists, this pack reports `has_more: true` and
|
|
100
|
+
`at_least_total` — a true LOWER BOUND (`last_page_index * 24`), never a
|
|
101
|
+
fabricated exact total. Example measured 2026-09-23: SAIPEM narrowed to a
|
|
102
|
+
2-day window returned 1 disclosure; the same issuer over 2025-01-01..
|
|
103
|
+
2026-09-24 returned `at_least_total: 120` (122 exact, confirmed by walking
|
|
104
|
+
to the last page) — the date filter genuinely binds.
|
|
105
|
+
- Company-name resolution uses `rankMatches` (exact > prefix > whole-word >
|
|
106
|
+
substring) against eMarket's own issuer picklist, embedded in every
|
|
107
|
+
listing page load. An ambiguous match (multiple issuers tied at the same
|
|
108
|
+
score) returns `candidates` instead of guessing.
|
|
109
|
+
- `emarket_get_disclosure` has no direct by-id endpoint on the source — it
|
|
110
|
+
re-fetches the given date's listing (paging up to 15 pages, i.e. up to 360
|
|
111
|
+
disclosures market-wide for that day) and matches on the protocollo id.
|
|
112
|
+
|
|
113
|
+
## Quick Start
|
|
114
|
+
|
|
115
|
+
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"mcpServers": {
|
|
120
|
+
"emarket-storage": {
|
|
121
|
+
"url": "https://gateway.pipeworx.io/emarket-storage/mcp"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### What this endpoint actually serves
|
|
128
|
+
|
|
129
|
+
`tools/list` at `https://gateway.pipeworx.io/emarket-storage/mcp` returns the tools in the table
|
|
130
|
+
above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
|
|
131
|
+
`discover_tools`, `search_within`, `remember`/`recall` and the rest of the
|
|
132
|
+
gateway-wide set. So the tool count you see is larger than this table: a
|
|
133
|
+
single-pack endpoint currently lists roughly 30 shared tools alongside the
|
|
134
|
+
pack's own. The connection's `initialize` response states its exact scope, and
|
|
135
|
+
is the authoritative answer for a given day.
|
|
136
|
+
|
|
137
|
+
This is deliberate, not multiplexing by accident. The meta-tools are what let a
|
|
138
|
+
scoped connection answer a question this pack does not cover — via
|
|
139
|
+
`ask_pipeworx`, which routes across the whole catalog — without you adding a
|
|
140
|
+
second MCP server. There is currently no way to mount a pack endpoint without
|
|
141
|
+
them; if the extra schemas cost you more context than the routing is worth,
|
|
142
|
+
connect to the full gateway once rather than to several pack endpoints.
|
|
143
|
+
|
|
144
|
+
Or connect to the full Pipeworx gateway to get every pack's tools listed
|
|
145
|
+
directly, instead of just this one's:
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"mcpServers": {
|
|
150
|
+
"pipeworx": {
|
|
151
|
+
"url": "https://gateway.pipeworx.io/mcp"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Both URLs reach the same gateway and the same 1678+ data sources. The
|
|
158
|
+
only difference is which pack's tools are listed **directly**; `ask_pipeworx`
|
|
159
|
+
reaches all of them from either one.
|
|
160
|
+
|
|
161
|
+
## No MCP client? Call it over HTTP
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
curl -X POST https://gateway.pipeworx.io/v1/tools/emarket_search_disclosures \
|
|
165
|
+
-H 'Content-Type: application/json' \
|
|
166
|
+
-d '{"category":"104","date_from":"2026-09-22","date_to":"2026-09-24"}'
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/emarket_search_disclosures`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
|
|
170
|
+
|
|
171
|
+
## Standalone (no gateway account)
|
|
172
|
+
|
|
173
|
+
This package also runs as a local stdio MCP server — no Pipeworx account, no
|
|
174
|
+
gateway round-trip:
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"mcpServers": {
|
|
179
|
+
"emarket-storage": {
|
|
180
|
+
"command": "npx",
|
|
181
|
+
"args": ["-y", "@pipeworx/mcp-emarket-storage"]
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Or run it directly to confirm it starts:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
npx -y @pipeworx/mcp-emarket-storage
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
|
|
194
|
+
for **only** this pack's tools — none of the shared meta-tools the gateway
|
|
195
|
+
connection above adds. Same source, same tools, no ask_pipeworx routing.
|
|
196
|
+
|
|
197
|
+
## Using with ask_pipeworx
|
|
198
|
+
|
|
199
|
+
Instead of calling tools directly, you can ask questions in plain English —
|
|
200
|
+
this works on the pack endpoint above as well as on the full gateway:
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
ask_pipeworx({ question: "your question about Emarket Storage data" })
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
The gateway picks the right tool and fills the arguments automatically.
|
|
207
|
+
|
|
208
|
+
## More
|
|
209
|
+
|
|
210
|
+
- [Docs and guides](https://pipeworx.io/docs)
|
|
211
|
+
- [pipeworx.io](https://pipeworx.io)
|
|
212
|
+
|
|
213
|
+
## License
|
|
214
|
+
|
|
215
|
+
MIT
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
//
|
|
3
|
+
// Entry point for `npx @pipeworx/mcp-<slug>`.
|
|
4
|
+
//
|
|
5
|
+
// Packs ship as raw TypeScript (no build step — see publish-pack.sh for why:
|
|
6
|
+
// tsx sidesteps every extensionless-import / bare-JSON-import edge case a
|
|
7
|
+
// per-pack tsc build would have to solve one pack at a time). This file
|
|
8
|
+
// registers tsx's ESM loader programmatically, then hands off to src/server.ts,
|
|
9
|
+
// which wraps the pack's {tools, callTool} export in a stdio MCP server.
|
|
10
|
+
//
|
|
11
|
+
// Copied verbatim into every published pack repo by scripts/publish-pack.sh —
|
|
12
|
+
// edit this file, not a per-pack copy.
|
|
13
|
+
import { register } from 'tsx/esm/api';
|
|
14
|
+
|
|
15
|
+
register();
|
|
16
|
+
|
|
17
|
+
await import('../src/server.ts');
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pipeworx/mcp-emarket-storage",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Italian regulated disclosures direct from eMarket Storage (Teleborsa) — keyless, same-day-fresh.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"types": "src/index.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"mcp-emarket-storage": "bin/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "emarket-storage"],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/pipeworx-io/mcp-emarket-storage.git"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"typecheck": "tsc --noEmit"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
22
|
+
"tsx": "^4.19.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "^5.9.3",
|
|
26
|
+
"@cloudflare/workers-types": "^4.20260405.1"
|
|
27
|
+
}
|
|
28
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.pipeworx-io/emarket-storage",
|
|
4
|
+
"title": "Emarket Storage",
|
|
5
|
+
"description": "Italian regulated disclosures direct from eMarket Storage (Teleborsa) — keyless, same-day-fresh.",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"websiteUrl": "https://pipeworx.io/packs/emarket-storage",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/pipeworx-io/mcp-emarket-storage",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"remotes": [
|
|
13
|
+
{
|
|
14
|
+
"type": "streamable-http",
|
|
15
|
+
"url": "https://gateway.pipeworx.io/emarket-storage/mcp"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|