Agent-MCP
An MCP host that integrates a CLI agent with local todo servers over stdio and authenticated Streamable HTTP, supporting progressive skill loading for task management and daily planning workflows.
README
MCP Homework — Host, Two Transports, and a Skill
This project satisfies the local parts of the assignment without extra frameworks:
- a CLI agent using Ollama
qwen3.5:4b; - an MCP host that loads config, merges tools, and routes calls;
- a stdio todo server with 3 tools, 1 resource, and 1 prompt;
- the same server over authenticated local Streamable HTTP;
- progressive skill loading through
use_skill; - persistence, validation, recoverable MCP errors, and integration tests.
Public hosting is intentionally not performed. See PUBLIC_HTTP.md for the exact deployment steps.
Requirements
- Node.js 20+
- Ollama
qwen3.5:4b:ollama pull qwen3.5:4b
Install and verify
npm install
npm test
npm run check
Run everything locally
Use the same local key in both terminals. It is not committed.
Terminal 1 — start the authenticated HTTP server:
export MCP_KEY="$(openssl rand -hex 32)"
echo "$MCP_KEY" # copy this value for terminal 2
npm run server:http
Terminal 2 — ensure Ollama is running, then start the agent:
export MCP_KEY="paste-the-same-value"
ollama serve # omit if Ollama is already running
In another terminal, run:
export MCP_KEY="paste-the-same-value"
npm run agent
Try these requests:
Add "finish MCP homework" using the stdio todo server.
Add "record the demo" using the HTTP todo server.
Standup time — what should I work on today?
The last request should trigger use_skill("daily-plan"), then call both MCP servers and return Today, Later, and Blockers.
Test with MCP Inspector
Stdio:
npx @modelcontextprotocol/inspector node src/servers/stdio.js
HTTP:
export MCP_KEY="a-local-test-key"
npm run server:http
npx @modelcontextprotocol/inspector
In Inspector, select Streamable HTTP, use http://127.0.0.1:3000/mcp, and add header Authorization: Bearer a-local-test-key. Verify:
add_task,list_tasks, andcomplete_taskare listed and callable.todo://listcan be read.plan_my_daycan be loaded.- Completing an unknown ID returns
isError: true.
Project map
config.json agent/model/server configuration
skills/daily-plan/SKILL.md on-demand workflow
src/agent/ MCP host, Ollama loop, and skill loader
src/todo/ shared todo domain and MCP capabilities
src/servers/stdio.js stdio entry point
src/servers/http.js Streamable HTTP entry point
test/ unit and protocol integration tests
Grading evidence
| Requirement | Evidence |
|---|---|
| Agent host | src/agent, config.json; merges and routes prefixed tools |
| stdio server | src/servers/stdio.js; 3 tools + resource + prompt |
| Local HTTP | src/servers/http.js; Streamable HTTP + health + bearer auth |
| Skill in agent | skills/daily-plan/SKILL.md; indexed then loaded by use_skill |
| Error handling | Zod validation, isError, bounded agent loop, stable HTTP errors |
| Tests | npm test exercises repository and both MCP transports end to end |
Demo and submission checklist
YouTube video demo:
- Show
npm testpassing. - Show the stdio server in Inspector: tools, resource, and prompt.
- Show the HTTP server returning 401 without the key, then connecting with it.
- In the agent, add one task through each server.
- Ask “Standup time” and show automatic skill loading plus calls to both servers.
- Briefly open
config.jsonandSKILL.mdand explain the routing.
Submit the YouTube link and source code on Moodle. If you later deploy, also submit the public /mcp URL and a temporary grader key.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.