
insiderphd/mcp-course-code
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
このリポジトリには、複数のMCP(Model Context Protocol)サーバ例とクライアントテストツールが含まれています。 各プロジェクトでは、MCP サーバーとのビルドと作業の異なる側面を実証しています.
概要
このリポジトリには、複数のMCP(Model Context Protocol)サーバ例とクライアントテストツールが含まれています。 各プロジェクトでは、MCP サーバーとのビルドと作業の異なる側面を実証しています。 1. : 数学 MCP サーバー - 基本的な数学操作と数学の冗談を提供 2. : トード リスト MCP サーバー - ユーザーの Todo リストを管理します。 (アリスとボブ) 3. : 気象 MCP サーバー - 気象関連の冗談を返します 4. : MCP クライアント テスター - MCP サーバーのテストと操作のためのツール 各プロジェクトには独自の依存関係があります。 各プロジェクトディレクトリに移動し、依存関係をインストールします。 これにより、mcp-client コマンドはグローバルで利用できます。 数学的な操作と数学の冗談を提供するサーバー.
概要(AI 翻訳)
このリポジトリには、複数のMCP(Model Context Protocol)サーバ例とクライアントテストツールが含まれています。 各プロジェクトでは、MCP サーバーとのビルドと作業の異なる側面を実証しています。
プロジェクト概要
- Ex1 - MCP*: 数学 MCP サーバー - 基本的な数学操作と数学冗談を提供 2.Ex3 - Priv Esc:TodoリストMCPサーバー - ユーザーのTodoリストを管理する(アリスとボブ) 3。 [Ex4] - [サーバーの選択]:気象MCPサーバー - 気象関連ジョークを返します 4。mcp-lite:MCPクライアントテスター - MCPサーバーのテストと相互作用するためのツール
前提条件
- Node.js >= 18.0.0
- npm >= 9.0.0
バージョンを確認するには:
インストール
各プロジェクトには独自の依存関係があります。 各プロジェクトディレクトリに移動し、依存関係をインストールします。
##Ex1 - MCP (数学サーバー)
##Ex3 - Priv Esc(Todoリストサーバー)
##Ex4 - サーバ(Weather Server)を選択します。
##mcp-lite(MCPクライアントテスター)
オプション - グローバルにインストール:
これにより、グローバルで mcp-client コマンドを実行できます。
使用法
##Ex1 - MCP: 数学サーバー
数学的な操作と数学の冗談を提供するサーバー。
サーバーの実行
または直接:
利用可能なツール
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP Course Code
This repository contains multiple MCP (Model Context Protocol) server examples and a client testing tool. Each project demonstrates different aspects of building and working with MCP servers.
Projects Overview
- Ex1 - MCP: Math MCP Server - Provides basic mathematical operations and math jokes
- Ex3 - Priv Esc: Todo List MCP Server - Manages todo lists for users (Alice and Bob)
- Ex4 - Select server: Weather MCP Server - Returns weather-related jokes
- mcp-lite: MCP Client Tester - A tool for testing and interacting with MCP servers
Prerequisites
- Node.js >= 18.0.0
- npm >= 9.0.0
To check your versions:
node --version
npm --version
Installation
Each project has its own dependencies. Navigate to each project directory and install dependencies:
Ex1 - MCP (Math Server)
cd "Ex1 - MCP"
npm install
Ex3 - Priv Esc (Todo List Server)
cd "Ex3 - Priv Esc"
npm install
Ex4 - Select server (Weather Server)
cd "Ex4 - Select server"
npm install
mcp-lite (MCP Client Tester)
cd mcp-lite
npm install
Optional - Install globally:
cd mcp-lite
npm install -g
This makes the mcp-client command available globally.
Usage
Ex1 - MCP: Math Server
A server that provides mathematical operations and math jokes.
Running the Server
cd "Ex1 - MCP"
npm start
Or directly:
node src/index.js
Available Tools
- add: Add two numbers (
{ "a": 5, "b": 3 }) - subtract: Subtract two numbers (
{ "a": 10, "b": 4 }) - multiply: Multiply two numbers (
{ "a": 7, "b": 6 }) - divide: Divide two numbers (
{ "a": 20, "b": 4 }) - power: Raise a number to a power (
{ "base": 2, "exponent": 8 }) - get_math_joke: Get a random math joke (
{})
Claude Desktop Configuration
Add to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"math-server": {
"command": "/Users/katiepaxtonfear/Documents/MCP Course Code/Ex1 - MCP/run-server.sh"
}
}
}
Note: Update the path to match your actual project location. Make sure run-server.sh is executable:
chmod +x "Ex1 - MCP/run-server.sh"
Ex3 - Priv Esc: Todo List Server
A server that manages todo lists for users (Alice and Bob).
Running the Server
cd "Ex3 - Priv Esc"
npm start
Or directly:
node src/index.js
Available Tools
-
get_todos: Get all todos for a user
{ "email": "[email protected]" } -
create_todo: Create a new todo for a user
{ "email": "[email protected]", "title": "Review pull request #123", "priority": "high", "status": "pending" } -
mark_todo_complete: Mark a todo as completed
{ "email": "[email protected]", "todo_id": 1 }
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"math-server": {
"command": "/Users/katiepaxtonfear/Documents/MCP Course Code/Ex1 - MCP/run-server.sh"
}
}
}