SwiftBindingsLogParser
April 3, 2025 ยท View on GitHub
SwiftBindingsLogParser is an MCP server integrated with VSCode Copilot, designed to assist in analyzing logs generated by the SwiftBindings tool. It processes log files to compute summaries and leverages Copilot's capabilities to provide illustrative examples that support the computed statistics, enhancing the overall analysis.
Setup
- VSCode insiders + GitHub Copilot (e.g., GPT-4o) in Agent mode.
- Installed Python
uvorpippackage managers. - Add .vscode/mcp.json with the following content:
{
"mcpServers": {
"SwiftBindingsLogParser": {
"command": "uv",
"args": [
"--directory",
"${workspaceFolder}/server",
"run",
"main.py"
],
"env": {}
},
}
}
Example prompt
List all the files in the current repository and identify the file path corresponding to a StoreKit log generated by SwiftBindings tool. Use this file path to read all the content of the log, preprocess it and parse the log. Don't parse the log by itself unless told, instead use MCP server tools. The provided tool creates a general summary of the logged data which you can enrich by providing a general and specific examples from the analyzed log.
Notes
- Sometimes the VSCode GitHub Copilot suggests to execute the parser (
main.py) via cmd Python rather than using it as MCP server tool. In this case, it is better to exclude it from copilot's context window.
- Better results where achieved when
/clearcommand is used between processing different log files. - Copilot can hallucinate when extracting specific examples from the log file. It is recommended to double check the outputs and ask for corrections.
- Observing noticeably different outputs based on the used LLM model. Provided prompt was tested using
GPT-4omodel.