JP

juleswhite/python-agents-mcp-course

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

42 stars 61 forks Качество 46 Тренд 12

juleswhite/python-agents-mcp-course - кандидат на сервер MCP, импортированный из https://github.com/juleswhite/python-agents-mcp-course.

Обзор

juleswhite/python-agents-mcp-course - кандидат на сервер MCP, импортированный из https://github.com/juleswhite/python-agents-mcp-course.

Обзор (машинный перевод)

Это хранилище содержит примеры кода Python для курса Coursera «Агенты ИИ с протоколом контекста модели».

Предпосылки

Python 3.10+

  • Пип API-ключ от OpenAI, Anthropic или Google (набор в файле [T0])

Настройка

Каждый модуль имеет свой собственный каталог python-code/. Для установки любого модуля:

Структура курса и картирование кода

Модуль 1: Начало работы с протоколом контекста модели (MCP) для агентов ИИ

| Тип | Файлы кода [скрыто] [скрыто] [скрыто] [скрыто] [скрыто] Зачем нам нужен протокол контекста модели? ↑ Model Context Protocol & AI Problem Solving with Tools (недоступная ссылка — история). MCP позволяет ИИ общаться с компьютером | Видео → AI @ Work - Как выглядит моя работа с ИИ My AI Tools | Чтение Обучаясь больше и оставаясь на связи | Чтение | — |

Модуль 1 является концептуальным введением — никаких программных упражнений.

Модуль 2: AI Agent Loops & Model Context Protocol

| Пункт | Тип | Файлы кода | Запуск команды |

Модельный контекстный протокол: синтаксис, семантика, время | Видео | — | — | Модельный контекстный протокол и агенты ИИ | Видео | Что такое MCP-сервер? (видео)

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

AI Agents with Model Context Protocol - Python Code Examples

This repository contains Python code examples for the Coursera course “AI Agents with Model Context Protocol.”

Prerequisites

  • Python 3.10+
  • pip
  • An API key from OpenAI, Anthropic, or Google (set in .env file)

Setup

Each module has its own python-code/ directory. To set up any module:

cd /python-code
pip install -r requirements.txt
cp .env.example .env  # Then add your API key(s)

Course Structure & Code Mapping

Module 1: Getting Started with Model Context Protocol (MCP) for AI Agents

Item Type Code Files
Why Do We Need Model Context Protocol? Video —
Model Context Protocol & AI Problem Solving with Tools Video —
MCP Allows AI to Communicate with the Computer Video —
AI @ Work - What My Work with AI Looks Like Video —
My AI Tools Reading —
Learning More & Staying Connected Reading —

Module 1 is conceptual introduction — no code exercises.


Module 2: AI Agent Loops & Model Context Protocol

Item Type Code Files Run Command
Model Context Protocol: Syntax, Semantics, Timing Video — —
Model Context Protocol & AI Agents Video — —
What is an MCP Server? Video — —
Tool Specifications Video — —
Building Your First MCP Server Ungraded Plugin server.py python server.py
Building Your First MCP AI Agent Ungraded Plugin agent.py, llm.py python agent.py "question"
Agents Talking to Tools vs. Tools with AI Video — —

Code Location: 01-intro-to-mcp-agents/python-code/

Key Files:

File Description
server.py Basic MCP tool server with list_files and read_file tools
agent.py Agent loop implementation (PERCEIVE→DECIDE→ACT→OBSERVE)
llm.py LLM integration utilities (OpenAI/Anthropic/Gemini)
test_server.py Tests server tools directly without an agent
server_with_resources.py Server with MCP resources for teaching agents
agent_with_learning.py Agent that reads resources before acting

Commands:

cd 01-intro-to-mcp-agents/python-code
pip install -r requirements.txt
python server.py              # Start the basic MCP server
python agent.py "question"    # Run the basic agent
python test_server.py         # Test server tools directly

Module 3: Building AI Agents with Model Context Protocol

Item Type Code Files Run Command
Resources Video — —
Teaching Agents to Use Tools Ungraded Plugin workspace_server.py python workspace_server.py
Teaching Agents to Seek Help Ungraded Plugin workspace_server.py python workspace_server.py
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →