
juleswhite/ai-agents-mcp-typescript
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Этот репозиторий содержит примеры кода для курса Coursera «Агенты ИИ с протоколом контекста модели и TypeScript»
Обзор
Этот репозиторий содержит примеры кода для курса Coursera «Агенты ИИ с протоколом контекста модели и TypeScript». Node.js 18+ - npm - ключ API OpenAI (набор в файле .env) Каждый модуль имеет свой собственный каталог/код. Для установки любого модуля: Модуль 1 представляет собой концептуальное введение — никаких программных упражнений. Создайте файл .env в коде / каталоге каждого модуля:
Обзор (машинный перевод)
Этот репозиторий содержит примеры кода для курса Coursera «Агенты ИИ с протоколом контекста модели и TypeScript».
Предпосылки
Node.js 18+
- npm
- OpenAI API ключ (набор в
.envфайл)
Настройка
Каждый модуль имеет свой собственный каталог 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 & TypeScript - Code Examples
This repository contains code examples for the Coursera course “AI Agents with Model Context Protocol & TypeScript.”
Prerequisites
- Node.js 18+
- npm
- An OpenAI API key (set in
.envfile)
Setup
Each module has its own code/ directory. To set up any module:
cd /code
npm install
cp .env.example .env # Then add your OPENAI_API_KEY
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 | 01-intro-to-mcp-agents/code/server.ts |
npm run server |
| Building Your First MCP AI Agent | Ungraded Plugin | 01-intro-to-mcp-agents/code/agent.ts``01-intro-to-mcp-agents/code/llm.ts |
npm run agent |
| Agents Talking to Tools vs. Tools with AI | Video | — | — |
Code Location: 01-intro-to-mcp-agents/code/
Key Files:
| Path | Description |
|---|---|
01-intro-to-mcp-agents/code/server.ts |
Basic MCP tool server with list_files and read_file tools |
01-intro-to-mcp-agents/code/agent.ts |
Agent loop implementation (PERCEIVE→DECIDE→ACT→OBSERVE) |
01-intro-to-mcp-agents/code/llm.ts |
LLM integration utilities (OpenAI/Anthropic) |
01-intro-to-mcp-agents/code/test-server.ts |
Tests server tools directly without an agent |
Commands:
cd 01-intro-to-mcp-agents/code
npm install
npm run server # Start the basic MCP server
npm run agent # Run the basic agent
npm run test-server # 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 | 01-intro-to-mcp-agents/code/workspace-server.ts |
npm run workspace-server |
| Teaching Agents to Seek Help | Ungraded Plugin | 01-intro-to-mcp-agents/code/workspace-server.ts |
npm run workspace-server |
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →