Skip to main content
Glama

mcp-trial

Model Context Protocol を学ぶために、GitHub API 用のサーバーを構築しています。Python SDK v2 で、stdio 上で動作し、Claude Code に接続されています。

機能

2つのツールがあります。1つはリポジトリの概要用、もう1つは最近のコミットメッセージ用です。また、リポジトリの生の README を提供するリソースと、リポジトリをポートフォリオ作品として評価するためのプロンプトテンプレートもあります。

Related MCP server: MCP GitHub Reader

実行方法

uv sync
uv run mcp dev server.py          # opens the inspector
uv run python test_server.py      # calls the server directly, no host needed

Claude Code に登録するには:

claude mcp add gh-lab -- uv run --directory /path/to/mcp-trial mcp run server.py

学んだこと

型ヒントが実際の API 契約になります。SDK が関数シグネチャから直接ツールの JSON スキーマを構築するからです。limit: int = 5 と書くと、そのパラメータはオプションになり、モデルはそれを省略できます。

ドキュメント文字列は思った以上に重要でした。モデルにツールの説明として送られ、どのツールを選ぶかを決定するからです。Claude Code にリポジトリが活発にメンテナンスされているか尋ねたところ、両方のツールを呼び出して解決しました。これは、説明が組み合わせ可能に見えたからこそ起こったことです。

ツールが返すものはすべてモデルのコンテキスト内のテキストになるため、各フィールドはトークンを消費します。GitHub は約100のフィールドを返しますが、私は5つだけ返します。

エラーを返すよりも例外を発生させる方が優れています。例外を発生させるとホストがチェックするフラグが設定され、メッセージがモデルに届いて対処可能になるからです。

非同期は何も速くしません。単一の呼び出しはどちらでも同じ時間がかかります。await が行うのは、関数を一時停止してイベントループを解放し、待機中に他の呼び出しを実行できるようにすることです。

メモ

mcp-reference.md には、これを構築する際の作業メモがあります。

Install Server
F
license - not found
B
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that enables analyzing and querying GitHub repositories through the GitHub Chat API, allowing users to index repositories and ask questions about their code, architecture and tech stack.
    2
    86
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that provides tools for interacting with the GitHub API, enabling AI assistants to query repositories, pull requests, issues, commits, users, and more.
    467
    ISC
  • F
    license
    Not graded
    quality
    C
    maintenance
    A read-only MCP server that exposes GitHub user profiles, repository info, and search via tools for AI assistants like Claude.

View all related MCP servers

Related MCP Connectors

  • An MCP server that gives your AI access to the source code and docs of all public github repos

  • A MCP server built for developers enabling Git based project management with project and personal…

  • Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sai-Srinivas7/mcp-trial'

If you have feedback or need assistance with the MCP directory API, please join our Discord server