mcp-go library. It integrates with the EDteam API to manage courses, subscriptions, and shopping cart operations.
Features
- Go Implementation: Built with
mcp-goSDK - API Integration: EDteam educational platform API
- Authentication: Token-based authentication flow
- Three Tools: Subscriptions, course listing, shopping cart
- Environment Configuration: Credential management via env vars
Installation
1
Prerequisites
Ensure you have Go 1.24.1+ installed:
2
Navigate to Directory
3
Install Dependencies
4
Set Environment Variables
Create a
.env file or export variables:5
Build the Server
6
Configure MCP Client
Add to your MCP client configuration:
Authentication
The server authenticates on startup using EDteam credentials:Login Implementation
Tools
Subscriptions
List all historical subscriptions from your EDteam account. Parameters: None Example Response:Courses-List
List available courses from EDteam with pagination. Parameters:page(number, optional): Page number (default: 1)limit(number, optional): Number of courses per page (1-10, default: 10)
Shopping-Cart-Add-Course
Add a course to your shopping cart. Parameters:course_id(number, required): The course ID to add
Server Configuration
HTTP Request Helper
Generic HTTP request function used by all API calls:Usage Examples
List Your Subscriptions
Browse Courses
Add to Cart
Dependencies
go.mod:github.com/mark3labs/mcp-go- MCP SDK for Gogithub.com/google/uuid- UUID generationgithub.com/yosida95/uritemplate/v3- URI template parsing
Project Structure
Security Considerations
Environment Variables
Store credentials in
.env files (gitignored) or MCP client configToken Security
Authentication token is kept in memory only during server runtime
HTTPS Only
All API calls use HTTPS to the EDteam API
Error Handling
Avoid logging sensitive data in error messages
Extending the Server
Add New API Endpoint
Troubleshooting
Authentication failed
Authentication failed
Verify your EMAIL and PASSWORD environment variables are correct:Test login manually via the EDteam website to confirm credentials.
Go version mismatch
Go version mismatch
Module dependency issues
Module dependency issues
Clean and reinstall dependencies:
API rate limiting
API rate limiting
The EDteam API may have rate limits. Implement exponential backoff for production use:
Go MCP Patterns
Tool Parameter Handling
Error Handling
Context Usage
Next Steps
Basic TypeScript
Explore prompts and resources with TypeScript
Calculator Python
See how FastMCP simplifies Python server development