MCP Task Assistant
Exposes task management (add, list, complete tasks) and document search (RAG) as MCP tools for AI agents.
README
MCP Task Assistant (Learning Project)
This is Krishna's first end-to-end AI project. It combines:
- A Task Manager — simple to-do list (add, list, complete tasks)
- An MCP Server — exposes the task manager as "tools" that an AI can use
- A FastAPI backend — turns everything into a real web service
- (Next step) A RAG layer — lets the assistant also answer questions from documents
- (Later step) Docker + AWS deployment — makes it a real, hosted app
Why this project matters
Most beginner AI projects are just a script in a notebook. This one is built the way real companies build things: as a service other programs (or an AI) can actually use.
Folder structure
mcp-task-assistant/
├── app/
│ ├── tasks_store.py # the "database" (in-memory for now)
│ ├── mcp_server.py # exposes tasks as MCP tools
│ └── main.py # FastAPI web app
├── requirements.txt
└── README.md
How to run this on your own laptop
Step 1 — Install Python
Make sure you have Python 3.10 or newer. Check with:
python --version
Step 2 — Create a virtual environment
This keeps this project's packages separate from everything else on your computer.
python -m venv venv
Activate it:
- Windows:
venv\Scripts\activate - Mac/Linux:
source venv/bin/activate
Step 3 — Install the required packages
pip install -r requirements.txt
Step 4 — Run the MCP server (this is the "tools" part)
python app/mcp_server.py
This starts a server that exposes 3 tools: add_task, list_tasks, complete_task.
Step 5 — Run the FastAPI app (this is the "web service" part)
In a second terminal (with venv activated again):
uvicorn app.main:app --reload
Then open http://127.0.0.1:8000/docs in your browser — you'll see a live, clickable page where you can test adding and listing tasks.
Step 6 — Talk to the AI agent (Groq API — free tier)
Now that create_task / get_tasks / finish_task exist as MCP tools, we can let an actual AI decide when to use them, instead of you calling them by hand. We're using the Groq API — cloud-hosted, fast, and has a generous free tier. If you already have a Groq API key from an earlier project, you can reuse it — a key belongs to your account, not to one specific app.
1. Get / find your Groq API key
Go to https://console.groq.com/keys — reuse your existing key or create a new one.
2. Set up your key
Copy .env.example to a new file named .env, and paste your real key in:
GROQ_API_KEY=your-real-key-here
3. Install the packages
pip install -r requirements.txt
4. Run the agent
python app/agent.py
You do NOT need to separately start mcp_server.py this time — the agent
starts it automatically in the background.
5. Try it out
Type things like:
add a task to finish my resume
add a task to practice interview questions
show me all my tasks
mark task 1 as done
Watch the terminal — you'll see a line like [Agent is calling tool: create_task ...]
right before it responds. That line is proof the AI is actually deciding to use
your tool, not just chatting.
Step 7 — Add document search (RAG)
Now your assistant can also answer questions using your own documents, not just manage tasks.
1. Install the new package
pip install -r requirements.txt
(This installs chromadb, our free local search database. It also
downloads a small model the first time you use it, to understand text
meaning — after that first download, it works offline.)
2. Add your documents
Put any .txt files into the documents/ folder. A sample file
(company_leave_policy.txt) is already there so you can test right away.
3. Build the search index
Run this every time you add or change a document:
python app/build_index.py
4. Ask questions
Run the agent as usual:
python app/agent.py
Try asking:
how many paid leave days do employees get?
what happens to unused leave at the end of the year?
You should see [Agent is calling tool: search_documents ...] before it
answers — that means it actually looked in your document instead of
guessing.
Step 8 — Package with Docker
Docker packages your whole app — code, packages, everything — into one "box" (called an image) that runs the exact same way on any computer or server. This is how real companies ship software, instead of saying "it works on my machine."
1. Install Docker
Download Docker Desktop from https://www.docker.com/products/docker-desktop and install it. Make sure it's running before the next steps.
2. Build the image
From the main project folder:
docker build -t task-assistant .
This reads the Dockerfile, installs everything, and builds your indexed
documents right into the image.
3. Run the container
Your Groq key still needs to be provided — we never bake secrets into the image itself. Run:
docker run -p 8000:8000 --env-file .env task-assistant
4. Test it
Open http://127.0.0.1:8000/docs — same as before, but now it's running
inside a container. Try the new /chat endpoint with a message like:
{"message": "add a task to finish my resume"}
What we'll add next
- Deploy on AWS or Render
- Add basic evaluation/logging
Step 9 — Frontend
There's now a real webpage, not just the /docs testing page. It lives in
app/static/ (index.html, style.css, app.js) and is served
automatically by FastAPI at the site's root URL.
Try it
pip install -r requirements.txt
uvicorn app.main:app --reload
Open http://127.0.0.1:8000 (not /docs this time) — you'll see a proper
chat interface with a task sidebar. Type a message like "add a task to
finish my resume" and watch the assistant respond, show which tools it
used (a small transparency feature — most portfolio projects skip this),
and update the task list automatically.
Note: /docs still works too, for testing individual endpoints directly.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。