@pipeworx/mcp-openreview 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 +61 -0
- package/package.json +20 -0
- package/server.json +18 -0
- package/src/index.ts +185 -0
- package/tsconfig.json +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pipeworx
|
|
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,61 @@
|
|
|
1
|
+
# mcp-openreview
|
|
2
|
+
|
|
3
|
+
OpenReview MCP — ML conference submissions and reviews (API v2)
|
|
4
|
+
|
|
5
|
+
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 250+ live data sources.
|
|
6
|
+
|
|
7
|
+
## Tools
|
|
8
|
+
|
|
9
|
+
| Tool | Description |
|
|
10
|
+
|------|-------------|
|
|
11
|
+
| `list_venues` | List venue groups (conferences, workshops). Use the returned group id to query submissions. |
|
|
12
|
+
| `get_venue` | Venue (group) metadata by group id. |
|
|
13
|
+
| `list_submissions` | Papers submitted to a venue. Pass the venue group id as venue_id. |
|
|
14
|
+
| `get_note` | Single note — paper, review, comment, decision, etc. |
|
|
15
|
+
| `get_paper` | Paper + all child notes (reviews, rebuttal, decision, metareview). Pass the forum id (= paper note id). |
|
|
16
|
+
| `search_notes` | Full-text search across notes. |
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"mcpServers": {
|
|
25
|
+
"openreview": {
|
|
26
|
+
"url": "https://gateway.pipeworx.io/openreview/mcp"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or connect to the full Pipeworx gateway for access to all 250+ data sources:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"mcpServers": {
|
|
37
|
+
"pipeworx": {
|
|
38
|
+
"url": "https://gateway.pipeworx.io/mcp"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Using with ask_pipeworx
|
|
45
|
+
|
|
46
|
+
Instead of calling tools directly, you can ask questions in plain English:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
ask_pipeworx({ question: "your question about Openreview data" })
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The gateway picks the right tool and fills the arguments automatically.
|
|
53
|
+
|
|
54
|
+
## More
|
|
55
|
+
|
|
56
|
+
- [All tools and guides](https://github.com/pipeworx-io/examples)
|
|
57
|
+
- [pipeworx.io](https://pipeworx.io)
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pipeworx/mcp-openreview",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OpenReview MCP — ML conference submissions and reviews (API v2)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"types": "src/index.ts",
|
|
8
|
+
"keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "openreview"],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/pipeworx-io/mcp-openreview"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"typecheck": "tsc --noEmit"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"typescript": "^5.7.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
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/openreview",
|
|
4
|
+
"title": "Openreview",
|
|
5
|
+
"description": "OpenReview MCP — ML conference submissions and reviews (API v2)",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"websiteUrl": "https://pipeworx.io/packs/openreview",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/pipeworx-io/mcp-openreview",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"remotes": [
|
|
13
|
+
{
|
|
14
|
+
"type": "streamable-http",
|
|
15
|
+
"url": "https://gateway.pipeworx.io/openreview/mcp"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
interface McpToolDefinition {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
inputSchema: {
|
|
5
|
+
type: 'object';
|
|
6
|
+
properties: Record<string, unknown>;
|
|
7
|
+
required?: string[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface McpToolExport {
|
|
12
|
+
tools: McpToolDefinition[];
|
|
13
|
+
callTool: (name: string, args: Record<string, unknown>) => Promise<unknown>;
|
|
14
|
+
meter?: { credits: number };
|
|
15
|
+
cost?: Record<string, unknown>;
|
|
16
|
+
provider?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* OpenReview MCP — ML conference submissions and reviews (API v2)
|
|
21
|
+
*
|
|
22
|
+
* Most data is public. Some objects (private invitations, anonymized
|
|
23
|
+
* comments at certain venues) require a token; we accept BYO.
|
|
24
|
+
*
|
|
25
|
+
* Docs: https://docs.openreview.net/reference/api-v2
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
const BASE = 'https://api2.openreview.net';
|
|
30
|
+
|
|
31
|
+
const tools: McpToolExport['tools'] = [
|
|
32
|
+
{
|
|
33
|
+
name: 'list_venues',
|
|
34
|
+
description: 'List venue groups (conferences, workshops). Use the returned group id to query submissions.',
|
|
35
|
+
inputSchema: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
query: { type: 'string', description: 'Free-text filter on group id / name' },
|
|
39
|
+
limit: { type: 'number', description: '1-1000 (default 50)' },
|
|
40
|
+
offset: { type: 'number', description: '0-based offset' },
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'get_venue',
|
|
46
|
+
description: 'Venue (group) metadata by group id.',
|
|
47
|
+
inputSchema: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: {
|
|
50
|
+
group_id: { type: 'string', description: 'Group id (e.g. "ICLR.cc/2024/Conference")' },
|
|
51
|
+
},
|
|
52
|
+
required: ['group_id'],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'list_submissions',
|
|
57
|
+
description: 'Papers submitted to a venue. Pass the venue group id as venue_id.',
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: 'object',
|
|
60
|
+
properties: {
|
|
61
|
+
venue_id: { type: 'string', description: 'Venue group id (e.g. "ICLR.cc/2024/Conference")' },
|
|
62
|
+
sort: { type: 'string', description: 'cdate (creation date, default desc) | tmdate (modify date) | number' },
|
|
63
|
+
limit: { type: 'number', description: '1-1000 (default 25)' },
|
|
64
|
+
offset: { type: 'number', description: '0-based offset' },
|
|
65
|
+
},
|
|
66
|
+
required: ['venue_id'],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'get_note',
|
|
71
|
+
description: 'Single note — paper, review, comment, decision, etc.',
|
|
72
|
+
inputSchema: {
|
|
73
|
+
type: 'object',
|
|
74
|
+
properties: {
|
|
75
|
+
id: { type: 'string', description: 'OpenReview note id (e.g. "abc123XYZ")' },
|
|
76
|
+
details: { type: 'string', description: 'Comma-sep extras: replies, original, revisions, edges' },
|
|
77
|
+
},
|
|
78
|
+
required: ['id'],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'get_paper',
|
|
83
|
+
description: 'Paper + all child notes (reviews, rebuttal, decision, metareview). Pass the forum id (= paper note id).',
|
|
84
|
+
inputSchema: {
|
|
85
|
+
type: 'object',
|
|
86
|
+
properties: { forum_id: { type: 'string', description: 'Forum (paper) note id' } },
|
|
87
|
+
required: ['forum_id'],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'search_notes',
|
|
92
|
+
description: 'Full-text search across notes.',
|
|
93
|
+
inputSchema: {
|
|
94
|
+
type: 'object',
|
|
95
|
+
properties: {
|
|
96
|
+
query: { type: 'string', description: 'Free-text query' },
|
|
97
|
+
content_field: { type: 'string', description: 'Restrict to a content field (e.g. "title", "abstract")' },
|
|
98
|
+
signature: { type: 'string', description: 'Filter by signature group (e.g. author profile id)' },
|
|
99
|
+
limit: { type: 'number', description: '1-1000 (default 25)' },
|
|
100
|
+
offset: { type: 'number', description: '0-based offset' },
|
|
101
|
+
},
|
|
102
|
+
required: ['query'],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
];
|
|
106
|
+
|
|
107
|
+
async function callTool(name: string, args: Record<string, unknown>): Promise<unknown> {
|
|
108
|
+
const apiKey = (args._apiKey as string | undefined)?.trim();
|
|
109
|
+
switch (name) {
|
|
110
|
+
case 'list_venues': {
|
|
111
|
+
const params = new URLSearchParams({
|
|
112
|
+
prefix: '~',
|
|
113
|
+
limit: String(Math.min(1000, Math.max(1, (args.limit as number) ?? 50))),
|
|
114
|
+
offset: String(Math.max(0, (args.offset as number) ?? 0)),
|
|
115
|
+
});
|
|
116
|
+
if (args.query) params.set('regex', String(args.query));
|
|
117
|
+
return orGet(apiKey, `/groups?${params}`);
|
|
118
|
+
}
|
|
119
|
+
case 'get_venue':
|
|
120
|
+
return orGet(apiKey, `/groups?id=${encodeURIComponent(reqStr(args, 'group_id', '"ICLR.cc/2024/Conference"'))}`);
|
|
121
|
+
case 'list_submissions': {
|
|
122
|
+
const venueId = reqStr(args, 'venue_id', '"ICLR.cc/2024/Conference"');
|
|
123
|
+
const params = new URLSearchParams({
|
|
124
|
+
'content.venueid': venueId,
|
|
125
|
+
sort: String(args.sort ?? 'cdate:desc'),
|
|
126
|
+
limit: String(Math.min(1000, Math.max(1, (args.limit as number) ?? 25))),
|
|
127
|
+
offset: String(Math.max(0, (args.offset as number) ?? 0)),
|
|
128
|
+
details: 'replyCount',
|
|
129
|
+
});
|
|
130
|
+
return orGet(apiKey, `/notes?${params}`);
|
|
131
|
+
}
|
|
132
|
+
case 'get_note': {
|
|
133
|
+
const params = new URLSearchParams({ id: reqStr(args, 'id', '"abc123XYZ"') });
|
|
134
|
+
if (args.details) params.set('details', String(args.details));
|
|
135
|
+
return orGet(apiKey, `/notes?${params}`);
|
|
136
|
+
}
|
|
137
|
+
case 'get_paper': {
|
|
138
|
+
const forumId = reqStr(args, 'forum_id', '"abc123XYZ"');
|
|
139
|
+
const params = new URLSearchParams({
|
|
140
|
+
forum: forumId,
|
|
141
|
+
details: 'replyCount,original',
|
|
142
|
+
limit: '1000',
|
|
143
|
+
});
|
|
144
|
+
return orGet(apiKey, `/notes?${params}`);
|
|
145
|
+
}
|
|
146
|
+
case 'search_notes': {
|
|
147
|
+
const params = new URLSearchParams({
|
|
148
|
+
term: reqStr(args, 'query', '"transformer"'),
|
|
149
|
+
type: 'all',
|
|
150
|
+
limit: String(Math.min(1000, Math.max(1, (args.limit as number) ?? 25))),
|
|
151
|
+
offset: String(Math.max(0, (args.offset as number) ?? 0)),
|
|
152
|
+
});
|
|
153
|
+
if (args.content_field) params.set('content', String(args.content_field));
|
|
154
|
+
if (args.signature) params.set('group', String(args.signature));
|
|
155
|
+
return orGet(apiKey, `/notes/search?${params}`);
|
|
156
|
+
}
|
|
157
|
+
default:
|
|
158
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
async function orGet(apiKey: string | undefined, path: string) {
|
|
163
|
+
const url = `${BASE}${path}`;
|
|
164
|
+
const headers: Record<string, string> = { Accept: 'application/json' };
|
|
165
|
+
if (apiKey) headers.Authorization = `Bearer ${apiKey}`;
|
|
166
|
+
const res = await fetch(url, { headers });
|
|
167
|
+
if (res.status === 401 || res.status === 403) throw new Error('OpenReview: unauthorized');
|
|
168
|
+
if (res.status === 404) throw new Error('OpenReview: not found');
|
|
169
|
+
if (res.status === 429) throw new Error('OpenReview: rate-limit (HTTP 429)');
|
|
170
|
+
if (!res.ok) {
|
|
171
|
+
const t = await res.text();
|
|
172
|
+
throw new Error(`OpenReview error: ${res.status} ${t.slice(0, 200)}`);
|
|
173
|
+
}
|
|
174
|
+
return res.json();
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function reqStr(args: Record<string, unknown>, key: string, example: string): string {
|
|
178
|
+
const v = args[key];
|
|
179
|
+
if (typeof v !== 'string' || !v.trim()) {
|
|
180
|
+
throw new Error(`Required argument "${key}" is missing. Pass a string like ${example}.`);
|
|
181
|
+
}
|
|
182
|
+
return v;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export default { tools, callTool, meter: { credits: 1 } } satisfies McpToolExport;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"outDir": "dist",
|
|
10
|
+
"rootDir": "src",
|
|
11
|
+
"declaration": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["src"]
|
|
14
|
+
}
|