@access-mcp/events 0.1.0 → 0.3.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/README.md +125 -58
- package/dist/index.js +2 -1
- package/dist/server.d.ts +9 -128
- package/dist/server.js +87 -334
- package/package.json +2 -2
- package/src/__tests__/server.integration.test.ts +65 -68
- package/src/__tests__/server.test.ts +123 -271
- package/src/index.ts +2 -1
- package/src/server.ts +95 -396
package/README.md
CHANGED
|
@@ -6,10 +6,7 @@ A Model Context Protocol server providing access to ACCESS-CI events data includ
|
|
|
6
6
|
|
|
7
7
|
### 🔧 Tools
|
|
8
8
|
|
|
9
|
-
- **`
|
|
10
|
-
- **`get_upcoming_events`** - Get upcoming events (today onward)
|
|
11
|
-
- **`search_events`** - Search events by keywords in title/description
|
|
12
|
-
- **`get_events_by_tag`** - Get events filtered by specific tags
|
|
9
|
+
- **`search_events`** - Comprehensive event search and filtering with native full-text search, date filters, topic/tag filtering, and more
|
|
13
10
|
|
|
14
11
|
### 📊 Resources
|
|
15
12
|
|
|
@@ -41,31 +38,49 @@ Add to your Claude Desktop configuration:
|
|
|
41
38
|
}
|
|
42
39
|
```
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
## Usage Examples
|
|
45
42
|
|
|
46
|
-
**
|
|
43
|
+
### **Search & Discovery**
|
|
47
44
|
|
|
48
45
|
```
|
|
49
|
-
|
|
46
|
+
"Upcoming events next week"
|
|
47
|
+
"Python workshops"
|
|
48
|
+
"Machine learning events"
|
|
49
|
+
"Office hours this week"
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
**
|
|
52
|
+
### **Filtering**
|
|
53
53
|
|
|
54
54
|
```
|
|
55
|
-
|
|
55
|
+
"Beginner-level events this month"
|
|
56
|
+
"GPU computing events"
|
|
57
|
+
"Webinars in December"
|
|
58
|
+
"Advanced training sessions"
|
|
56
59
|
```
|
|
57
60
|
|
|
58
|
-
|
|
61
|
+
## Key Improvements
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
Show me beginner-level events this month
|
|
62
|
-
```
|
|
63
|
+
### 🚀 Enhanced Search (v2.1)
|
|
63
64
|
|
|
64
|
-
**
|
|
65
|
+
**Native API Full-Text Search:**
|
|
66
|
+
- Searches across titles, descriptions, speakers, tags, location, and event type
|
|
67
|
+
- Supports multi-word queries (e.g., "machine learning", "office hours")
|
|
68
|
+
- Much more comprehensive results than previous tag-only filtering
|
|
69
|
+
- Server-side indexing for better performance
|
|
65
70
|
|
|
66
|
-
|
|
67
|
-
Find
|
|
68
|
-
|
|
71
|
+
**Search Examples:**
|
|
72
|
+
- `"python"` - Find Python programming events
|
|
73
|
+
- `"machine learning"` - Find ML-related content in any field
|
|
74
|
+
- `"gpu computing"` - Find GPU-related events
|
|
75
|
+
- `"office hours"` - Find all office hours sessions
|
|
76
|
+
|
|
77
|
+
### 🌍 Timezone Support (v2.1)
|
|
78
|
+
|
|
79
|
+
**Smart Timezone Handling:**
|
|
80
|
+
- All timestamps returned in UTC (ISO 8601 format with Z suffix)
|
|
81
|
+
- Timezone parameter controls relative date calculations
|
|
82
|
+
- Common timezone examples: `America/New_York`, `Europe/London`, `Asia/Tokyo`
|
|
83
|
+
- Default: UTC calculations
|
|
69
84
|
|
|
70
85
|
## Filtering Capabilities
|
|
71
86
|
|
|
@@ -126,50 +141,94 @@ The server adds these computed fields:
|
|
|
126
141
|
- `duration_hours` - Calculated event duration
|
|
127
142
|
- `starts_in_hours` - Hours until event starts
|
|
128
143
|
|
|
129
|
-
##
|
|
130
|
-
|
|
131
|
-
###
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
## Tool Reference
|
|
145
|
+
|
|
146
|
+
### search_events
|
|
147
|
+
|
|
148
|
+
Comprehensive event search and filtering with native full-text search, date filters, and topic/tag filtering.
|
|
149
|
+
|
|
150
|
+
**Parameters:**
|
|
151
|
+
- `query` (string, optional): Search titles, descriptions, speakers, and tags
|
|
152
|
+
- `type` (string, optional): Filter by event type (workshop, webinar, training)
|
|
153
|
+
- `tags` (string, optional): Filter by tags (python, gpu, hpc, ml)
|
|
154
|
+
- `date` (string, optional): Filter by time period. Valid values: `today`, `upcoming`, `past`, `this_week`, `this_month`
|
|
155
|
+
- `skill` (string, optional): Filter by skill level. Valid values: `beginner`, `intermediate`, `advanced`
|
|
156
|
+
- `limit` (number, optional): Maximum results (default: 50, automatically rounded to API page sizes: 25, 50, 75, or 100)
|
|
157
|
+
|
|
158
|
+
## Usage Examples
|
|
159
|
+
|
|
160
|
+
### Full-Text Search
|
|
161
|
+
|
|
162
|
+
```javascript
|
|
163
|
+
// Upcoming Python events
|
|
164
|
+
search_events({
|
|
165
|
+
query: "python",
|
|
166
|
+
date: "upcoming",
|
|
167
|
+
limit: 10
|
|
168
|
+
})
|
|
169
|
+
|
|
170
|
+
// Machine learning workshops this month
|
|
171
|
+
search_events({
|
|
172
|
+
query: "machine learning",
|
|
173
|
+
date: "this_month",
|
|
174
|
+
type: "workshop",
|
|
175
|
+
limit: 25
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
// Past office hours
|
|
179
|
+
search_events({
|
|
180
|
+
query: "office hours",
|
|
181
|
+
date: "past",
|
|
182
|
+
limit: 30
|
|
183
|
+
})
|
|
145
184
|
```
|
|
146
185
|
|
|
147
|
-
###
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
//
|
|
151
|
-
{
|
|
152
|
-
|
|
153
|
-
"
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
186
|
+
### Filter by Tags and Type
|
|
187
|
+
|
|
188
|
+
```javascript
|
|
189
|
+
// All upcoming GPU events
|
|
190
|
+
search_events({
|
|
191
|
+
tags: "gpu",
|
|
192
|
+
date: "upcoming",
|
|
193
|
+
limit: 20
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
// Beginner training sessions
|
|
197
|
+
search_events({
|
|
198
|
+
type: "training",
|
|
199
|
+
skill: "beginner",
|
|
200
|
+
date: "upcoming",
|
|
201
|
+
limit: 15
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
// Python workshops for beginners
|
|
205
|
+
search_events({
|
|
206
|
+
date: "this_month",
|
|
207
|
+
type: "workshop",
|
|
208
|
+
skill: "beginner",
|
|
209
|
+
tags: "python",
|
|
210
|
+
limit: 25
|
|
211
|
+
})
|
|
159
212
|
```
|
|
160
213
|
|
|
161
|
-
###
|
|
162
|
-
|
|
163
|
-
```
|
|
164
|
-
// Get
|
|
165
|
-
{
|
|
166
|
-
|
|
167
|
-
"
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
214
|
+
### Timezone-Aware Searches
|
|
215
|
+
|
|
216
|
+
```javascript
|
|
217
|
+
// Get events in New York timezone
|
|
218
|
+
search_events({
|
|
219
|
+
beginning_date_relative: "today",
|
|
220
|
+
end_date_relative: "+1week",
|
|
221
|
+
timezone: "America/New_York",
|
|
222
|
+
limit: 30
|
|
223
|
+
})
|
|
224
|
+
|
|
225
|
+
// Get events in Europe/London timezone
|
|
226
|
+
search_events({
|
|
227
|
+
query: "workshop",
|
|
228
|
+
beginning_date_relative: "today",
|
|
229
|
+
timezone: "Europe/London",
|
|
230
|
+
limit: 25
|
|
231
|
+
})
|
|
173
232
|
```
|
|
174
233
|
|
|
175
234
|
## Development
|
|
@@ -187,10 +246,18 @@ npm test
|
|
|
187
246
|
|
|
188
247
|
## Base URL
|
|
189
248
|
|
|
190
|
-
The server connects to: `https://support.access-ci.org/api/2.
|
|
249
|
+
The server connects to: `https://support.access-ci.org/api/2.2/events`
|
|
191
250
|
|
|
192
251
|
## Technical Notes
|
|
193
252
|
|
|
253
|
+
### API Version 2.2 Features
|
|
254
|
+
- **UTC timestamps**: All dates returned in UTC with Z suffix (e.g., `2024-08-30T13:00:00Z`)
|
|
255
|
+
- **Native search**: Uses `search_api_fulltext` parameter for comprehensive searching
|
|
256
|
+
- **Timezone support**: Relative dates calculated using specified timezone
|
|
257
|
+
- **Pagination**: API accepts specific page sizes (25, 50, 75, or 100). Requested limits are automatically rounded to nearest valid size.
|
|
258
|
+
- **Enhanced metadata**: Responses include API version and timezone info
|
|
259
|
+
|
|
260
|
+
### General
|
|
194
261
|
- All date comparisons use the event's start date (`date` field)
|
|
195
262
|
- Results include both upcoming and past events unless date filtered
|
|
196
263
|
- Faceted search filters use AND logic when combined
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { EventsServer } from "./server.js";
|
|
3
3
|
async function main() {
|
|
4
4
|
const server = new EventsServer();
|
|
5
|
-
|
|
5
|
+
const port = process.env.PORT ? parseInt(process.env.PORT, 10) : undefined;
|
|
6
|
+
await server.start(port ? { httpPort: port } : undefined);
|
|
6
7
|
}
|
|
7
8
|
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
8
9
|
main().catch((error) => {
|
package/dist/server.d.ts
CHANGED
|
@@ -4,90 +4,7 @@ export declare class EventsServer extends BaseAccessServer {
|
|
|
4
4
|
private _eventsHttpClient?;
|
|
5
5
|
constructor();
|
|
6
6
|
protected get httpClient(): AxiosInstance;
|
|
7
|
-
protected getTools():
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
inputSchema: {
|
|
11
|
-
type: string;
|
|
12
|
-
properties: {
|
|
13
|
-
beginning_date_relative: {
|
|
14
|
-
type: string;
|
|
15
|
-
description: string;
|
|
16
|
-
enum: string[];
|
|
17
|
-
default?: undefined;
|
|
18
|
-
};
|
|
19
|
-
end_date_relative: {
|
|
20
|
-
type: string;
|
|
21
|
-
description: string;
|
|
22
|
-
enum: string[];
|
|
23
|
-
};
|
|
24
|
-
beginning_date: {
|
|
25
|
-
type: string;
|
|
26
|
-
description: string;
|
|
27
|
-
};
|
|
28
|
-
end_date: {
|
|
29
|
-
type: string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
|
-
event_type: {
|
|
33
|
-
type: string;
|
|
34
|
-
description: string;
|
|
35
|
-
};
|
|
36
|
-
event_affiliation: {
|
|
37
|
-
type: string;
|
|
38
|
-
description: string;
|
|
39
|
-
};
|
|
40
|
-
skill_level: {
|
|
41
|
-
type: string;
|
|
42
|
-
description: string;
|
|
43
|
-
enum: string[];
|
|
44
|
-
};
|
|
45
|
-
event_tags: {
|
|
46
|
-
type: string;
|
|
47
|
-
description: string;
|
|
48
|
-
};
|
|
49
|
-
limit: {
|
|
50
|
-
type: string;
|
|
51
|
-
description: string;
|
|
52
|
-
minimum: number;
|
|
53
|
-
maximum: number;
|
|
54
|
-
};
|
|
55
|
-
query?: undefined;
|
|
56
|
-
tag?: undefined;
|
|
57
|
-
time_range?: undefined;
|
|
58
|
-
};
|
|
59
|
-
required: never[];
|
|
60
|
-
};
|
|
61
|
-
} | {
|
|
62
|
-
name: string;
|
|
63
|
-
description: string;
|
|
64
|
-
inputSchema: {
|
|
65
|
-
type: string;
|
|
66
|
-
properties: {
|
|
67
|
-
limit: {
|
|
68
|
-
type: string;
|
|
69
|
-
description: string;
|
|
70
|
-
minimum: number;
|
|
71
|
-
maximum: number;
|
|
72
|
-
};
|
|
73
|
-
event_type: {
|
|
74
|
-
type: string;
|
|
75
|
-
description: string;
|
|
76
|
-
};
|
|
77
|
-
beginning_date_relative?: undefined;
|
|
78
|
-
end_date_relative?: undefined;
|
|
79
|
-
beginning_date?: undefined;
|
|
80
|
-
end_date?: undefined;
|
|
81
|
-
event_affiliation?: undefined;
|
|
82
|
-
skill_level?: undefined;
|
|
83
|
-
event_tags?: undefined;
|
|
84
|
-
query?: undefined;
|
|
85
|
-
tag?: undefined;
|
|
86
|
-
time_range?: undefined;
|
|
87
|
-
};
|
|
88
|
-
required: never[];
|
|
89
|
-
};
|
|
90
|
-
} | {
|
|
7
|
+
protected getTools(): {
|
|
91
8
|
name: string;
|
|
92
9
|
description: string;
|
|
93
10
|
inputSchema: {
|
|
@@ -97,65 +14,32 @@ export declare class EventsServer extends BaseAccessServer {
|
|
|
97
14
|
type: string;
|
|
98
15
|
description: string;
|
|
99
16
|
};
|
|
100
|
-
|
|
17
|
+
type: {
|
|
101
18
|
type: string;
|
|
102
19
|
description: string;
|
|
103
|
-
default: string;
|
|
104
|
-
enum?: undefined;
|
|
105
20
|
};
|
|
106
|
-
|
|
21
|
+
tags: {
|
|
107
22
|
type: string;
|
|
108
23
|
description: string;
|
|
109
|
-
minimum: number;
|
|
110
|
-
maximum: number;
|
|
111
24
|
};
|
|
112
|
-
|
|
113
|
-
beginning_date?: undefined;
|
|
114
|
-
end_date?: undefined;
|
|
115
|
-
event_type?: undefined;
|
|
116
|
-
event_affiliation?: undefined;
|
|
117
|
-
skill_level?: undefined;
|
|
118
|
-
event_tags?: undefined;
|
|
119
|
-
tag?: undefined;
|
|
120
|
-
time_range?: undefined;
|
|
121
|
-
};
|
|
122
|
-
required: string[];
|
|
123
|
-
};
|
|
124
|
-
} | {
|
|
125
|
-
name: string;
|
|
126
|
-
description: string;
|
|
127
|
-
inputSchema: {
|
|
128
|
-
type: string;
|
|
129
|
-
properties: {
|
|
130
|
-
tag: {
|
|
25
|
+
date: {
|
|
131
26
|
type: string;
|
|
132
27
|
description: string;
|
|
28
|
+
enum: string[];
|
|
133
29
|
};
|
|
134
|
-
|
|
30
|
+
skill: {
|
|
135
31
|
type: string;
|
|
136
32
|
description: string;
|
|
137
33
|
enum: string[];
|
|
138
|
-
default: string;
|
|
139
34
|
};
|
|
140
35
|
limit: {
|
|
141
36
|
type: string;
|
|
142
37
|
description: string;
|
|
143
|
-
|
|
144
|
-
maximum: number;
|
|
38
|
+
default: number;
|
|
145
39
|
};
|
|
146
|
-
beginning_date_relative?: undefined;
|
|
147
|
-
end_date_relative?: undefined;
|
|
148
|
-
beginning_date?: undefined;
|
|
149
|
-
end_date?: undefined;
|
|
150
|
-
event_type?: undefined;
|
|
151
|
-
event_affiliation?: undefined;
|
|
152
|
-
skill_level?: undefined;
|
|
153
|
-
event_tags?: undefined;
|
|
154
|
-
query?: undefined;
|
|
155
40
|
};
|
|
156
|
-
required: string[];
|
|
157
41
|
};
|
|
158
|
-
}
|
|
42
|
+
}[];
|
|
159
43
|
protected getResources(): {
|
|
160
44
|
uri: string;
|
|
161
45
|
name: string;
|
|
@@ -170,15 +54,12 @@ export declare class EventsServer extends BaseAccessServer {
|
|
|
170
54
|
}>;
|
|
171
55
|
handleResourceRead(request: any): Promise<{
|
|
172
56
|
contents: {
|
|
173
|
-
uri:
|
|
57
|
+
uri: string;
|
|
174
58
|
mimeType: string;
|
|
175
59
|
text: string;
|
|
176
60
|
}[];
|
|
177
61
|
}>;
|
|
178
62
|
private buildEventsUrl;
|
|
179
63
|
private getEvents;
|
|
180
|
-
private getUpcomingEvents;
|
|
181
64
|
private searchEvents;
|
|
182
|
-
private getEventsByTag;
|
|
183
|
-
private getPopularTags;
|
|
184
65
|
}
|