CHANGELOG_MVP_FIXES.mdā¢5.33 kB
# MVP Integration Fixes - Changelog
## Date: 2025-10-12
## šÆ Main Problem
The MCP server couldn't upload videos to the MVP portal due to:
1. Token truncated by Firefox DevTools
2. Incorrect activity type (`WEBINAR_ONLINE_TRAINING` instead of `VIDEO`)
3. Incorrect role for videos (`Author` instead of `Host`/`Presenter`/`Speaker`)
4. `additionalTechnologyAreas` field causing errors
## ā
Implemented Solution
### 1. Complete Token Capture
**Problem**: Firefox truncated the `Authorization` header when it was too long.
**Solution**: Export complete HAR file from DevTools.
**Process**:
```bash
DevTools ā Network ā Right click ā Save All As HAR
```
### 2. Activity Type Correction
**Modified file**: `src/types/mvp/MVPActivityType.ts`
**Change**:
```diff
- WEBINAR_ONLINE_TRAINING = "Webinar/Online Training/Video/Livestream",
```
**Reason**: The MVP API doesn't recognize this type. For videos, simply use `"Video"`.
### 3. Valid Roles Update
**Modified files**:
- `src/unifiedServer.ts` (lines 154-158)
- `src/mvpServer.ts` (line 340)
**Change**:
```typescript
// Before: allowed any role from MVPActivityRole enum
role: { type: "string", enum: Object.values(MVPActivityRole) }
// After: only valid roles for videos
role: {
type: "string",
enum: ["Host", "Presenter", "Speaker"],
description: "Valid roles for video activities"
}
```
### 4. Additional Technology Areas Correction
**Modified files**:
- `src/unifiedServer.ts` (line 312)
- `src/mvpServer.ts` (line 352)
**Change**:
```diff
- additionalTechnologyAreas: data.additionalTechnologyAreas,
+ additionalTechnologyAreas: [],
```
**Reason**: The API rejects values in this field for now. Using empty array until further investigation.
### 5. Tool Description Update
**File**: `src/unifiedServer.ts` (line 141)
```diff
- description: "Submit a video/webinar/livestream activity to Microsoft MVP",
+ description: "Submit a video activity to Microsoft MVP. Valid roles for videos: Host, Presenter, Speaker.",
```
### 6. Removal of Non-Required Field
**File**: `src/unifiedServer.ts`
Removed `additionalTechnologyAreas` from input schema since it's always forced to `[]` internally.
## š Successful Test
**Request**:
```json
{
"activity": {
"id": 0,
"activityTypeName": "Video",
"typeName": "Video",
"date": "2025-07-10T00:00:00.000Z",
"description": "Video tutorial explaining...",
"isPrivate": false,
"targetAudience": ["Developer"],
"tenant": "MVP",
"title": "Como TERMINAR con el drama de Angular 20",
"url": "https://www.youtube.com/watch?v=OXlWMbrGgxk",
"userProfileId": 399243,
"role": "Host",
"technologyFocusArea": "Web Development",
"additionalTechnologyAreas": [],
"liveStreamViews": 0,
"onDemandViews": 8619,
"numberOfSessions": 1,
"inPersonAttendees": 0,
"subscriberBase": 0,
"imageUrl": ""
}
}
```
**Response**:
```json
{
"contributionId": 351180
}
```
**Status**: `201 Created` ā
## š Modified Files
1. `src/types/mvp/MVPActivityType.ts` - Removed invalid type
2. `src/unifiedServer.ts` - Fixed video submission (activity type, roles, additionalTechnologyAreas)
3. `src/mvpServer.ts` - Applied same fixes to standalone MVP server
4. `docs/MVP_API_REFERENCE.md` - **NEW** - Complete documentation
## š Created Documentation
### `/docs/MVP_API_REFERENCE.md`
Contains:
- ā
Exact formats for each activity type
- ā
Valid roles per activity type
- ā
Available target audiences
- ā
Technology focus areas
- ā
Complete examples with JSON
- ā
Common errors and solutions
- ā
Authentication guide
- ā
Pre-submission checklist
## š Token Management
### Expiration
MVP tokens expire every few hours.
### Renewal
```bash
npm run capture-mvp-token
```
1. Open browser on MVP portal (already logged in)
2. DevTools ā Network
3. Edit/create activity
4. Export as HAR
5. Search for `Authorization` header in the file
6. Copy complete token
7. Update Claude Desktop config
## šÆ Next Steps
### Pending Investigation
1. **Additional Technology Areas**
- Currently forced to `[]`
- Needs investigation of valid API values
2. **Other Activity Types**
- Blog: ā
Should work
- Speaking: ā Needs testing
- Book/E-book: ā
Confirmed working (from HAR)
- Workshop: ā Needs testing
3. **Roles per Activity Type**
- Document all valid roles for each type
- Currently only Video is fully validated
## š Usage from Claude Desktop
### Usage Example
```
"Upload my YouTube video to MVP:
- Title: Como TERMINAR con el drama de Angular 20
- Date: 2025-07-10
- URL: https://www.youtube.com/watch?v=OXlWMbrGgxk
- On-demand views: 8619
- Livestream views: 0
- Role: Host
- Audience: Developer
- Technology area: Web Development
- Description: Video tutorial explaining how to solve common problems in Angular 20..."
```
### Expected Result
```
ā
MVP Activity submitted!
Type: Video
Title: Como TERMINAR con el drama de Angular 20
Response: {
"contributionId": 351180
}
```
## ā
Compilation
```bash
npm run build
```
Status: ā
**Successful** - No TypeScript errors
## š Final Notes
- Server now works correctly for videos
- Token must be renewed periodically
- Complete documentation available at `/docs/MVP_API_REFERENCE.md`
- All tests passed successfully