Skip to content

feat: McpHttpClient を実装する (#51)#54

Merged
hideyukiMORI merged 1 commit into
mainfrom
feat/issue-51-mcp-http-client
May 19, 2026
Merged

feat: McpHttpClient を実装する (#51)#54
hideyukiMORI merged 1 commit into
mainfrom
feat/issue-51-mcp-http-client

Conversation

@hideyukiMORI
Copy link
Copy Markdown
Owner

Summary

  • src/nene2/mcp/http_client.py を新設:
    • McpHttpResponse — status_code / headers / body の frozen dataclass。is_successful() / request_id() を提供
    • McpHttpClientProtocol — GET / POST / PUT / DELETE / has_authentication()@runtime_checkable Protocol
    • HttpxMcpClient — httpx バックエンド実装。bearer_tokentransport をコンストラクタ注入可能(テスト容易性)
  • pyproject.tomlhttpx>=0.27 を main deps に昇格(production コードで使用するため)
  • src/nene2/mcp/__init__.py — 3 クラスをエクスポート

Test plan

  • 165 tests passed, coverage 92%
  • mypy clean
  • ruff clean
  • McpHttpResponse の is_successful / request_id テスト
  • Protocol 準拠テスト
  • httpx.MockTransport を使った GET / POST / PUT / DELETE テスト
  • Bearer token ヘッダー付与テスト

Closes #51

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hideyukiMORI hideyukiMORI merged commit 32eb798 into main May 19, 2026
@hideyukiMORI hideyukiMORI deleted the feat/issue-51-mcp-http-client branch May 19, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: McpHttpClient を実装する

1 participant