A Go-based HTTP server that provides a time API using Dockerized Model Context Protocol (MCP). Accepts a timezone and returns the current time, demonstrating Go, Docker, and JSON API integration. Includes unit tests and is ready for extension with new features.
Overview
what is GoCopilotAgentToDoList?
GoCopilotAgentToDoList is a Go-based HTTP server that provides an API endpoint for retrieving the current time in a specified timezone using a Dockerized Model Context Protocol (MCP).
how to use GoCopilotAgentToDoList?
To use GoCopilotAgentToDoList, build and run the server using Go, then send a POST request to the /mcp/time endpoint with a JSON body specifying the timezone.
key features of GoCopilotAgentToDoList?
- /mcp/time API endpoint: Accepts a POST request with a timezone and returns the current time for that timezone.
- Docker integration: Utilizes Docker to run the MCP service for time retrieval.
- JSON-based communication: Both requests and responses are formatted in JSON.
- Unit tests: Includes basic unit tests for request and response marshaling.
use cases of GoCopilotAgentToDoList?
- Retrieving the current time for different timezones in applications.
- Demonstrating integration of Go with Docker and JSON APIs.
- Serving as a foundation for building additional features like a to-do list API.
FAQ from GoCopilotAgentToDoList?
- What are the prerequisites to run this project?
You need Go 1.18 or later, Docker installed, and the MCP Docker image available locally.
- How do I run the server?
Use the command
go run package\ main.goin the terminal.
- Can I extend this project?
Yes! You can add more endpoints and features as needed.