Repository navigation
Conversation
AI agents used for security testing need to read PacketProxy's history and resend packets without a human driving the GUI. The MCP server for this has lived on feat/mcp-server (PR DeNA#190) since 2025-08, but that branch drifted far from master, so it could not be merged as is. This brings the extension onto the current master: the MCP server and its tools, the HTTP bridge script, and the docs, plus the core changes the tools depend on (job_id / temporary_id carried from OneShotPacket to Packet and stored in the packets table, and an x-suppress-dialog header so the config endpoint can be called without a confirmation dialog). Two adjustments were needed against master. Logging moved to Kotlin, so LogTool now reads the log text through Logging.getLogText() instead of GUILog.getInstance(). The HTTP bridge now also sends Authorization: Bearer, which /mcp requires alongside the access_token in the body. Closes DeNA#190 Co-authored-by: kakira <kurokuro917@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New code in PacketProxy is being written in Kotlin, and the MCP server extension added in this branch was still plain Java. Port all 15 files under extensions/mcp/ to Kotlin so the new feature does not add more Java that would have to be migrated later. The port is a straight translation: tool names, descriptions, input schemas, response keys and log/error messages are unchanged. Java semantics that differ in Kotlin are kept explicitly (String.split dropping trailing empties, trim() on chars <= ' ', default charset and locale, java.util.regex replacement handling). Unused locals and the unused initialize parameter are dropped instead of being suppressed, and the deprecated URL(String) constructor is replaced with URI.toURL(). The small additions to existing Java classes (Packet, OneShotPacket, Packets, GUILog, Extensions, ConfigHttpServer, DuplexFactory) stay in Java, since rewriting those files is outside this feature. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two docs came over from feat/mcp-server almost unchanged and no longer matched the code. They described REST endpoints, ports (32350), error codes and a get_configs tool that do not exist, gave get_history filter examples on method/url/status (not filterable), told users to install npx and Python, and spent much of their length on class layout and internal architecture. The setup guide now covers what the extension does, how to enable it, how to register the bridge in Claude Desktop and Claude Code, how to check it works, and the common errors. The spec becomes a tool reference (mcp-server-tools.md) listing each tool's parameters as the code reads them; parameters that are accepted but have no effect are left out. Implementation details are left to the code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI's spotlessCheck failed on the rewritten MCP docs because the Markdown tables were not padded the way the repository's formatter expects. This is the output of ./gradlew :spotlessApply and changes only whitespace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AIエージェントがPacketProxyの履歴を読み、パケットを再送できるようにするMCPサーバーの拡張を、現在のmasterに載せます。
#190 の feat/mcp-server ブランチは2025年8月から更新されておらず、masterとの差が大きくなってそのままではマージできないため、masterの上に載せ直しました。
extensions/mcp/)と各ツール、HTTPブリッジ(scripts/mcp-http-bridge.js)、設定手順とツール一覧のドキュメント(doc/mcp-server-setting-guide.md・doc/mcp-server-tools.md)を追加しましたOneShotPacketからPacketへ job_id・temporary_id を引き継ぎ、packetsテーブルに保存するようにしましたx-suppress-dialogヘッダーを受け付けるようにしましたLoggingに移ったため、LogToolはLogging.getLogText()からログを読むようにしました/mcpはAuthorization: Bearerが必須のため、HTTPブリッジがこのヘッダーを送るようにしました./gradlew spotlessCheck compileJava compileKotlin testはすべて成功しました。PacketProxyを起動してMCPクライアントからツールを呼ぶ確認は、まだしていません。Closes #190
🤖 Generated with Claude Code