Skip to main content
The EDteam Go server showcases building MCP servers in Go with the mcp-go library. It integrates with the EDteam API to manage courses, subscriptions, and shopping cart operations.

Features

  • Go Implementation: Built with mcp-go SDK
  • 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:
Implementation:
API Function:

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)
Example:
Implementation:

Shopping-Cart-Add-Course

Add a course to your shopping cart. Parameters:
  • course_id (number, required): The course ID to add
Example:
Implementation:

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:
Key Packages:
  • github.com/mark3labs/mcp-go - MCP SDK for Go
  • github.com/google/uuid - UUID generation
  • github.com/yosida95/uritemplate/v3 - URI template parsing

Project Structure

Security Considerations

Never commit credentials to version control. Use environment variables or secure credential management systems.

Environment Variables

Store credentials in .env files (gitignored) or MCP client config

Token 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

Verify your EMAIL and PASSWORD environment variables are correct:
Test login manually via the EDteam website to confirm credentials.
This server requires Go 1.24.1+:
Update Go from go.dev/dl if needed.
Clean and reinstall dependencies:
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