@pipeworx/mcp-eu-cellar 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/LICENSE +21 -0
- package/README.md +166 -0
- package/bin/cli.js +17 -0
- package/package.json +32 -0
- package/server.json +18 -0
- package/src/index.ts +1114 -0
- package/src/server.ts +45 -0
- package/tsconfig.json +18 -0
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,166 @@
|
|
|
1
|
+
# @pipeworx/eu-cellar
|
|
2
|
+
|
|
3
|
+
Every document the Publications Office of the European Union has issued —
|
|
4
|
+
Official Journal acts, treaties, consolidated texts, COM proposals and Court of
|
|
5
|
+
Justice judgments — searchable by title and readable by CELEX number, from the
|
|
6
|
+
CELLAR semantic repository's public SPARQL endpoint.
|
|
7
|
+
|
|
8
|
+
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1679+ live data sources.
|
|
9
|
+
|
|
10
|
+
## Tools
|
|
11
|
+
|
|
12
|
+
- `cellar_search_works(query, resource_type?, since?, until?, limit?)` — full-text
|
|
13
|
+
title search across every EU resource type; returns CELEX, date, resource type
|
|
14
|
+
and a direct EUR-Lex link.
|
|
15
|
+
- `cellar_work(celex? | cellar_id?)` — one document's catalogue entry: every
|
|
16
|
+
English title, document date, in-force flag, resource types, EuroVoc subject
|
|
17
|
+
concepts with English labels, authoring bodies.
|
|
18
|
+
- `cellar_sparql(query, limit?)` — your own SELECT or ASK against the repository.
|
|
19
|
+
Writes are refused; results are capped.
|
|
20
|
+
|
|
21
|
+
## Auth
|
|
22
|
+
|
|
23
|
+
Keyless. No registration, no key, no published quota.
|
|
24
|
+
|
|
25
|
+
## Relationship to the `eur-lex` pack
|
|
26
|
+
|
|
27
|
+
Both talk to publications.europa.eu and they are not duplicates. `eur-lex` is a
|
|
28
|
+
curated legal-compliance surface: a hand-kept index of ~14 named acts (GDPR, AI
|
|
29
|
+
Act, DORA…), article-level text extraction and CJEU judgment lookup, with its
|
|
30
|
+
SPARQL use hard-wired to legislation. This pack is the repository itself —
|
|
31
|
+
all resource types, plus an arbitrary SELECT-only query tool.
|
|
32
|
+
|
|
33
|
+
Use `eur-lex` for "what does GDPR Article 17 say". Use this for "what has the EU
|
|
34
|
+
published about X" and for graph questions nobody wrote a tool for.
|
|
35
|
+
|
|
36
|
+
## Data sources
|
|
37
|
+
|
|
38
|
+
- <https://publications.europa.eu/webapi/rdf/sparql> — the CELLAR SPARQL
|
|
39
|
+
endpoint (Virtuoso), serving the Common Data Model (`cdm:`) graph.
|
|
40
|
+
- <http://publications.europa.eu/resource/cellar/{id}> — the Work URIs the
|
|
41
|
+
endpoint returns.
|
|
42
|
+
|
|
43
|
+
## Traps, all verified live 2026-09-17
|
|
44
|
+
|
|
45
|
+
- **Full text needs `bif:contains`, not `FILTER(CONTAINS(...))`.** The endpoint
|
|
46
|
+
is Virtuoso; a `CONTAINS` filter over `?title` scans every expression in the
|
|
47
|
+
repository and times out. The full-text form is
|
|
48
|
+
`?title bif:contains "'phrase'"` — note the INNER single quotes, which
|
|
49
|
+
Virtuoso requires for a multi-word phrase.
|
|
50
|
+
- **CELEX literals are typed.** `?w cdm:resource_legal_id_celex "32024R1689"`
|
|
51
|
+
matches nothing; it needs `^^xsd:string`. This is a clean HTTP 200 with zero
|
|
52
|
+
rows, not an error.
|
|
53
|
+
- **Titles come back both with and without a language tag.** Filtering on
|
|
54
|
+
`lang(?title) = "en"` silently drops a large share of the repository. Filter
|
|
55
|
+
on the expression's language URI instead — that is the modelled fact.
|
|
56
|
+
- **One Work returns many rows.** The (title × type × subject × author) cross
|
|
57
|
+
product means a single document legitimately comes back as 20 bindings.
|
|
58
|
+
`cellar_work` collapses them; hand-written SPARQL will not.
|
|
59
|
+
- **`format=` is a query parameter.** The `Accept` header alone is honoured
|
|
60
|
+
inconsistently and you can get RDF/XML where you asked for JSON.
|
|
61
|
+
- **A malformed query is HTTP 200 with an HTML error page.** Parsed naively that
|
|
62
|
+
reads as "no results". This pack raises it as a rejected query.
|
|
63
|
+
|
|
64
|
+
## Quick Start
|
|
65
|
+
|
|
66
|
+
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"mcpServers": {
|
|
71
|
+
"eu-cellar": {
|
|
72
|
+
"url": "https://gateway.pipeworx.io/eu-cellar/mcp"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### What this endpoint actually serves
|
|
79
|
+
|
|
80
|
+
`tools/list` at `https://gateway.pipeworx.io/eu-cellar/mcp` returns the tools in the table
|
|
81
|
+
above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
|
|
82
|
+
`discover_tools`, `search_within`, `remember`/`recall` and the rest of the
|
|
83
|
+
gateway-wide set. So the tool count you see is larger than this table: a
|
|
84
|
+
single-pack endpoint currently lists roughly 30 shared tools alongside the
|
|
85
|
+
pack's own. The connection's `initialize` response states its exact scope, and
|
|
86
|
+
is the authoritative answer for a given day.
|
|
87
|
+
|
|
88
|
+
This is deliberate, not multiplexing by accident. The meta-tools are what let a
|
|
89
|
+
scoped connection answer a question this pack does not cover — via
|
|
90
|
+
`ask_pipeworx`, which routes across the whole catalog — without you adding a
|
|
91
|
+
second MCP server. There is currently no way to mount a pack endpoint without
|
|
92
|
+
them; if the extra schemas cost you more context than the routing is worth,
|
|
93
|
+
connect to the full gateway once rather than to several pack endpoints.
|
|
94
|
+
|
|
95
|
+
Or connect to the full Pipeworx gateway to get every pack's tools listed
|
|
96
|
+
directly, instead of just this one's:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"mcpServers": {
|
|
101
|
+
"pipeworx": {
|
|
102
|
+
"url": "https://gateway.pipeworx.io/mcp"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Both URLs reach the same gateway and the same 1679+ data sources. The
|
|
109
|
+
only difference is which pack's tools are listed **directly**; `ask_pipeworx`
|
|
110
|
+
reaches all of them from either one.
|
|
111
|
+
|
|
112
|
+
## No MCP client? Call it over HTTP
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
curl -X POST https://gateway.pipeworx.io/v1/tools/cellar_search_works \
|
|
116
|
+
-H 'Content-Type: application/json' \
|
|
117
|
+
-d '{"query":"carbon border adjustment","limit":4}'
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/cellar_search_works`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
|
|
121
|
+
|
|
122
|
+
## Standalone (no gateway account)
|
|
123
|
+
|
|
124
|
+
This package also runs as a local stdio MCP server — no Pipeworx account, no
|
|
125
|
+
gateway round-trip:
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"mcpServers": {
|
|
130
|
+
"eu-cellar": {
|
|
131
|
+
"command": "npx",
|
|
132
|
+
"args": ["-y", "@pipeworx/mcp-eu-cellar"]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Or run it directly to confirm it starts:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npx -y @pipeworx/mcp-eu-cellar
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
|
|
145
|
+
for **only** this pack's tools — none of the shared meta-tools the gateway
|
|
146
|
+
connection above adds. Same source, same tools, no ask_pipeworx routing.
|
|
147
|
+
|
|
148
|
+
## Using with ask_pipeworx
|
|
149
|
+
|
|
150
|
+
Instead of calling tools directly, you can ask questions in plain English —
|
|
151
|
+
this works on the pack endpoint above as well as on the full gateway:
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
ask_pipeworx({ question: "your question about Eu Cellar data" })
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
The gateway picks the right tool and fills the arguments automatically.
|
|
158
|
+
|
|
159
|
+
## More
|
|
160
|
+
|
|
161
|
+
- [Docs and guides](https://pipeworx.io/docs)
|
|
162
|
+
- [pipeworx.io](https://pipeworx.io)
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
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,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pipeworx/mcp-eu-cellar",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Every document the Publications Office of the European Union publishes — legislation, treaties, case law and COM proposals — searchable from the CELLAR repository.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"types": "src/index.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"mcp-eu-cellar": "bin/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "eu-cellar"],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/pipeworx-io/mcp-eu-cellar.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
|
+
"pipeworx": {
|
|
29
|
+
"sourceHash": "v1-b4af52b85a9cbf9d98c5e0a474d9435b899a52c73778f3bfb14b5d1f2ac2c760",
|
|
30
|
+
"sourceCommit": "70cd53748fc9f9a43ed3681d751bfa96e701efd2"
|
|
31
|
+
}
|
|
32
|
+
}
|
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/eu-cellar",
|
|
4
|
+
"title": "Eu Cellar",
|
|
5
|
+
"description": "Every document the Publications Office of the European Union publishes — legislation, treaties…",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"websiteUrl": "https://pipeworx.io/packs/eu-cellar",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/pipeworx-io/mcp-eu-cellar",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"remotes": [
|
|
13
|
+
{
|
|
14
|
+
"type": "streamable-http",
|
|
15
|
+
"url": "https://gateway.pipeworx.io/eu-cellar/mcp"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|