Skip to main content
Glama

MCP Homework — ホスト、2つのトランスポート、そしてスキル

このプロジェクトは、追加のフレームワークなしで課題のローカル部分を満たしています:

  • Ollama qwen3.5:4b を使用したCLIエージェント;

  • 設定を読み込み、ツールをマージし、呼び出しをルーティングするMCPホスト;

  • 3つのツール、1つのリソース、1つのプロンプトを持つstdio todoサーバー;

  • 認証付きローカルStreamable HTTP上の同じサーバー;

  • use_skill による段階的なスキル読み込み;

  • 永続化、バリデーション、回復可能なMCPエラー、統合テスト。

公開ホスティングは意図的に行っていません。正確なデプロイ手順については PUBLIC_HTTP.md を参照してください。

要件

  • Node.js 20+

  • Ollama

  • qwen3.5:4b: ollama pull qwen3.5:4b

Related MCP server: Personal OS MCP

インストールと確認

npm install
npm test
npm run check

すべてをローカルで実行

両方のターミナルで同じローカルキーを使用します。コミットされていません。

ターミナル1 — 認証付きHTTPサーバーを起動:

export MCP_KEY="$(openssl rand -hex 32)"
echo "$MCP_KEY"   # copy this value for terminal 2
npm run server:http

ターミナル2 — Ollamaが実行中であることを確認し、エージェントを起動:

export MCP_KEY="paste-the-same-value"
ollama serve      # omit if Ollama is already running

別のターミナルで実行:

export MCP_KEY="paste-the-same-value"
npm run agent

以下のリクエストを試してください:

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?

最後のリクエストは use_skill("daily-plan") をトリガーし、両方のMCPサーバーを呼び出して Today、Later、Blockers を返すはずです。

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

Inspectorで Streamable HTTP を選択し、http://127.0.0.1:3000/mcp を使用し、ヘッダー Authorization: Bearer a-local-test-key を追加します。確認:

  1. add_task、list_tasks、complete_task がリストされ、呼び出し可能であること。

  2. todo://list が読み取り可能であること。

  3. plan_my_day が読み込み可能であること。

  4. 不明なIDを完了すると isError: true が返されること。

プロジェクトマップ

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

評価の根拠

要件

根拠

エージェントホスト

src/agent、config.json;プレフィックス付きツールをマージしてルーティング

stdioサーバー

src/servers/stdio.js;3つのツール + リソース + プロンプト

ローカルHTTP

src/servers/http.js;Streamable HTTP + ヘルスチェック + Bearer認証

エージェントのスキル

skills/daily-plan/SKILL.md;インデックス化され、use_skill で読み込まれる

エラーハンドリング

Zodバリデーション、isError、制限付きエージェントループ、安定したHTTPエラー

テスト

npm test がリポジトリと両方のMCPトランスポートをエンドツーエンドで実行

デモと提出のチェックリスト

短いYouTubeデモの場合:

  1. npm test が成功することを示す。

  2. Inspectorでstdioサーバーを示す:ツール、リソース、プロンプト。

  3. HTTPサーバーがキーなしで401を返し、キーを使って接続することを示す。

  4. エージェントで、各サーバーを通じて1つのタスクを追加する。

  5. “Standup time” と尋ね、自動スキル読み込みと両方のサーバーへの呼び出しを示す。

  6. config.json と SKILL.md を簡単に開き、ルーティングを説明する。

YouTubeリンクとソースコードをMoodleに提出してください。後でデプロイする場合は、公開 /mcp URLと一時的な採点者キーも提出してください。

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    A local-stdio MCP server for a single personal Todoist account with env-gated read-only mode and prompt-injection mitigations.
    221 npm
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    MCP server for Personal OS API that enables managing tasks, notes, projects, collections, reviews, and more through typed tools over stdio.
    66
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    A Model Context Protocol server that provides todo management via stdio, local HTTP, and public HTTPS transports, enabling agents to add, list, and complete tasks, and includes a daily standup skill.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    A demo MCP server exposing an in-memory todo list via tools (add_task, list_tasks, complete_task), a resource, and a prompt, over both stdio and HTTP transports.
    1 npm
    ISC