home / mcp / assignment 1.5 mcp server
Provides an MCP server for the dair-ai/emotion dataset with tools to sample data, count by emotion, search text, and analyze emotion distribution.
Configuration
View docs{
"mcpServers": {
"cegme-cis6930sp26-assignment1.5": {
"command": "mcp",
"args": [
"dev",
"server.py"
]
}
}
}You run an MCP server that exposes a set of tools to work with the dair-ai/emotion dataset. This server hosts lightweight endpoints and local tooling to generate sample data, count emotions, search text, and analyze emotion distributions, enabling you to test and validate data pipelines and model flows in an interactive environment.
You interact with the MCP server using a client that can send tool requests and view structured responses. Start the server in your environment, then open the MCP interface to select a tool, configure its parameters, and run it. The interface will display the results in a readable JSON format, allowing you to iterate on experiments quickly.
Prerequisites you need before installation include Python and a virtual environment manager. You will also need access to the repository containing the MCP server and the necessary dependencies listed by the project.
# Step 1: Clone the project repository
cd /blue/cis6930/YOUR_GATORLINK
git clone https://github.com/YOUR_USERNAME/cis6930sp26-assignment1.5.git
cd cis6930sp26-assignment1.5# Step 2: Create environment file
cp .env.example .env
# Edit .env with your Hugging Face token# Step 3: Install dependencies
module load mamba
uv sync
source .venv/bin/activateIf you encounter issues starting the server, verify that the virtual environment is activated and that the required dependencies are present. Common problems include missing environment variables and incorrect paths. Use the provided commands to reinitialize and restart the environment as needed.
The MCP server is intended to be run via a local runtime command that launches the server script in development mode. The recommended runtime command shown in the usage guidance is a simple invocation of the MCP runner targeting the server script.
Ensure access to the MCP interface is restricted to your trusted environment. When running in remote or shared environments, rely on secure tunnels or authorized networks to protect the token and results.
You can test and explore the following tools: get_sample, count_by_emotion, search_text, and analyze_emotion_distribution. Each tool accepts specific parameters and returns structured results that help you validate data samples and distributions.
If you see the web interface not loading, confirm that the server process is running and that you are connecting to the correct URL. Check that any necessary ports are open and that authentication tokens are correctly provided in the client requests.
Generates a small sample of items from the dataset based on a requested count.
Counts items in the dataset that match a specific emotion and returns the distribution.
Searches the dataset for text matching a query, with an optional limit on results.
Analyzes and returns the distribution of emotions across the dataset.