Provides deployment target for the MCP server through a minimal Terraform configuration, allowing the container to be deployed as a scalable, serverless compute service.
Enables containerization of the MCP server using a provided Dockerfile, making it portable and deployable across different environments.
Implements the Model Context Protocol server using FastAPI framework, providing a discoverable, versioned API for exposing herd data.
Offers test capabilities for the MCP server implementation, allowing verification of functionality through automated testing.
Uses SQLite as the database backend for storing herd data, with configurable database path via environment variables.
Provides infrastructure-as-code configuration for deploying the MCP server to AWS, including creating an ECR repository for the container image.
Uses YAML for the MCP discovery file (model_context.yaml) which enables API discovery and interaction through the provided agent.
MCP Proof of Concept
This repository contains a simple Model Context Protocol (MCP) server implemented with FastAPI. The goal is to expose herd data through a discoverable, versioned API that can be deployed to AWS Fargate.
Running locally
Install dependencies:
The database path can be configured via the
DATABASE_PATHenvironment variable. If not set it defaults tomcp.dbinside the working directory.pip install -r requirements.txtSeed the SQLite database:
python -m app.seedStart the API server:
uvicorn app.main:app --reloadAuthenticate with the token
fake-super-secret-tokenwhen calling the API.
The MCP discovery file is available at model_context.yaml.
Related MCP server: MyAIServ MCP Server
Using the agent
An agent package is provided to interact with the MCP server. After the
server is running you can list the herd data like so:
The agent reads model_context.yaml to discover the API path and returns the
JSON response from the server. For full YAML support install the optional
PyYAML dependency; otherwise a limited built-in parser is used.
Running tests
Container
A Dockerfile is provided to run the server in a container. Build with:
Terraform
The terraform directory contains a minimal configuration showing how the
container could be deployed to AWS (e.g. Fargate). It creates an ECR repository
for the image.