-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
Description
Description
ProxymanApp/Proxyman#2433 (comment)
Acceptance Criteria
- Implement the
mcp-servercommand line, separate from the main App
- Implement the UI. It's a PRO feature.
How the MCP works and why I need an mcp-server binary
- Add the MCP config to Claude Code
{
"mcpServers": {
"proxyman": {
"command": "/Applications/Proxyman.app/Contents/MacOS/mcp-server",
"args": [],
"env": {}
}
}
}- Open Claude Code -> As the MCP is pointing to the
mcp-server, which is a binary file, not a main app, so the main app doesn't launch. It's correct UX ✅
=> It's a reason why I need to support MCP on the mcp-server, not the main app
3. Chat with Claude to list all available tools in MCP Proxyman
4. Claude Code talks to mcp-server
5. mcp-server handshake with Proxyman app (and read the token) at '/Users/nghiatran/Library/Application Support/com.proxyman.NSProxy/mcp-handshake.json'
6. mcp-server call HTTP Request to a local HTTP Server on Proxyman (Use token as a Access Token, and the port in the mcp-handshake.json) to get the data and construct the MCP Response and return to the Claude Code
7. Done
mcp-server
- Follow the official tutorial to build the MCP with Typescript server (Backend - electronJS app) : https://modelcontextprotocol.io/docs/develop/build-server#typescript
- Implement the list of available tools in mcp-server (I will give you a file in Slack)
- Write Unit Tests
Main app
- If the MCP feature is enabled -> Start a local HTTP server on port 0 (auto select) at
127.0.0.1(not0.0.0.0), and write the handshake file at'/Users/nghiatran/Library/Application Support/com.proxyman.NSProxy/mcp-handshake.json'. - If the MCP feature is disabled -> Verify we don't start the HTTP Server
- The HTTP Server should start after launch 1 second - to not burden the launch time
- Because we listen on port
0, so the system automatically pick a available port. - Implement a basic router to handle the MCP Tool and the logic of each tool
- Make sure to verify the access token in the Header
- Unit Test