{"id":"32e37839-f424-4329-ab71-a8f745daf996","slug":"roo-logger","kind":"mcp","name":"roo-logger","summary":"An MCP server for logging activity in Roo Code/Cline.","owner":"annenpolka","repoUrl":"https://github.com/annenpolka/roo-logger","license":"MIT","licenseTier":"permissive","trust":"community","stars":25,"match":null,"fewStars":false,"format":"mcp","createdAt":"2025-03-11T03:47:03.000Z","addedAt":"2026-10-14T05:02:47.488Z","logoUrl":"https://avatars.githubusercontent.com/u/56289203?u=dc297d791837a425004ca185f98873d0ed636fc1&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools","cloud-infra","memory-knowledge"],"tags":["cline","nodejs","roo-code","typescript"],"runtime":"node","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-26T00:42:20.157Z","sample":false,"url":"https://conduits.dev/tools/roo-logger","language":"TypeScript","transports":["stdio"],"install":{"npm":"roo-activity-logger"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# Roo Activity Logger\n\n[日本語版はこちら](./README.ja.md) | [中文版](./README.zh.md)\n\n## TL;DR\n\n- **What is it?** — This is an **MCP server** that automatically logs AI coding assistant activities such as command executions and code generation (supports Roo Code, Cline, Claude Code, etc.).\n- **What does it do?** — It saves activity history as JSON files, which you can search and analyze later.\n- **How do I use it?** — Add it to your Claude Code, Cline, or Roo-Code settings to enable automatic activity logging.\n\n## Overview\n\nRoo Activity Logger is an MCP (Model Context Protocol) server that automatically records AI coding assistant development activities — including command executions, code generation, file operations, and more. It supports Claude Code, Cline, Roo-Code, and other MCP-compatible AI assistants.\nAll logs are saved in JSON format, making it easy to search, analyze, and restore context at any time.\n\n### How activity logging works\n\n```mermaid\nflowchart TD\n    A[Roo's Action] --> B[Select Activity Type]\n    B --> C[Log via log_activity]\n    C --> D[Provide Log Info<br>- Summary<br>- Details<br>- Intention<br>- Context]\n    D --> E[Specify Save Directory]\n    E --> F[Save as JSON file]\n```\n\n### How to search logs and restore context when resuming a task\n\n```mermaid\nflowchart TD\n    G[Resume Task] --> H[Search with search_logs]\n    H --> I[Set Search Filters<br>- Type<br>- Date Range<br>- Text]\n    I --> J[Retrieve Related Activities<br>- Parent/Child<br>- Sequence<br>- Related IDs]\n    J --> K[Restore Context & Resume<br>- Review Past Intentions<br>- Understand Progress]\n```\n\n### Sample Log Entry\n\nHere is an example of a `file_operation` log entry saved as JSON:\n\n```json\n{\n  \"id\": \"75add15d-8d5b-4e60-b327-fde785050c86\",\n  \"timestamp\": \"2025-04-10T01:58:02.905Z\",\n  \"type\": \"file_operation\",\n  \"level\": \"info\",\n  \"summary\": \"Inserted mermaid diagram into README.md\",\n  \"details\": {\n    \"file\": \"README.md\",\n    \"operation\": \"insert_content\",\n    \"insertedLines\": \"mermaid code block\",\n    \"position\": \"after overview section\"\n  },\n  \"intention\": \"To visually explain the flow of saving and retrieving activities\",\n  \"context\": \"Improving documentation for Roo Activity Logger\",\n  \"parentId\": \"98280366-1de1-48e0-9914-b3a3409599b4\"\n}\n```\n\nEach log contains:\n\n- Log level (`debug`, `info`, `warn`, `error`)\n- Summary\n- Details (any structured data)\n- Intention / Purpose\n- Context information\n- Parent activity ID (for hierarchy)\n- Sequence number (for ordering)\n- Related activity IDs (for grouping)\n\nLogs are:\n\n- **Saved** as date-based JSON files\n- **Searchable** by type, level, date, text, etc.\n- **Customizable** — you can specify different save directories per activity\n\n## Features\n\n- **Logs various activity types:**\n  - Command executions (`command_execution`)\n  - Code generation (`code_generation`)\n  - File operations (`file_operation`)\n  - Errors (`error_encountered`)\n  - Decisions (`decision_made`)\n  - Conversations (`conversation`)\n\n- **Each activity log includes:**\n  - Unique ID\n  - Timestamp\n  - Activity type\n  - Summary, details, intention, context, and optional metadata\n\n## Usage (Recommended: via `npx`)\n\nYou can run Roo Activity Logger directly without cloning the repository by using `npx`.\n\nAdd this to your Cline, Roo-Code, or Claude Code configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"roo-activity-logger\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"github:annenpolka/roo-logger\"],\n      \"env\": {},\n      \"disabled\": false\n    }\n  }\n}\n```\n\nThen, add prompts to your rule files (for Cline/Roo-Code) or CLAUDE.md (for Claude Code) to ensure logging, for example:\n\n```md\n## Important\n\nAlways log activities using roo-activity-logger according to the logging rules.\n\n## Preparation\n\nCheck the current context with `git status`.\n\nThen, use roo-activity-logger's `search_logs` to review existing logs and identify current tasks.\n\nBe sure to perform the logging steps.\n\n## Logging\n\n- Always use roo-activity-logger for all logs\n- Include stack traces and execution context\n- Record intention and context\n```\n\n---\n\n## For Developers: Local Setup\n\nTo develop or customize locally, clone the repository and build:\n\n```bash\n# Clone the repo\ngit clone https://github.com/annenpolka/roo-logger.git\ncd roo-logger\n\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n```\n\nExample configuration to use your local build:\n\n```json\n{\n  \"mcpServers\": {\n    \"roo-activity-logger\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/your/local/roo-logger/dist/index.js\"], // adjust path accordingly\n      \"env\": {},\n      \"disabled\": false\n    }\n  }\n}\n```\n\n### Notes\n\n- The specified directory will be created automatically if it does not exist.\n\n---\n\n## MCP Tools\n\n### `log_activity` — Record an activity\n\nA tool to record an activity.\n\n#### Basic example\n\n```json\n{\n  \"type\": \"command_execution\",\n  \"summary\": \"Run npm command\",\n  \"intention\": \"Update project dependencies\",\n  \"context\": \"Preparing for new feature development\",\n  \"logsDir\": \"/absolute/path/to/logs/activity\"\n}\n```\n\n#### Parameters\n\n| Name         | Required | Type     | Description                                                                                                         |\n| ------------ | -------- | -------- | ------------------------------------------------------------------------------------------------------------------- |\n| `type`       | Yes      | string   | Activity type (`command_execution`, `code_generation`, `file_operation`, `error_encountered`, `decision_made`, `conversation`) |\n| `summary`    | Yes      | string   | Short summary of the activity                                                                                      |\n| `intention`  | Yes      | string   | Purpose or intention                                                                                               |\n| `context`    | Yes      | string   | Context information                                                                                                |\n| `logsDir`    | Yes      | string   | Save directory (**absolute path only**)                                                                            |\n| `level`      | No       | string   | Log level (`debug`, `info`, `warn`, `error`). Default: `info`                                                      |\n| `details`    | No       | object   | Additional details (any JSON)                                                                                      |\n| `parentId`   | No       | string   | Parent activity ID                                                                                                 |\n| `sequence`   | No       | number   | Sequence number                                                                                                    |\n| `relatedIds` | No       | string[] | Related activity IDs                                                                                               |\n\n#### Detailed example\n\n```json\n{\n  \"type\": \"file_operation\",\n  \"summary\": \"Update README file\",\n  \"intention\": \"Clarify documentation and improve usability\",\n  \"context\": \"Improvements based on user feedback\",\n  \"level\": \"info\",\n  \"details\": {\n    \"file\": \"README.md\",\n    \"operation\": \"update\",\n    \"changedLines\": 15\n  },\n  \"logsDir\": \"/absolute/path/to/logs/activity\",\n  \"sequence\": 3,\n  \"relatedIds\": [\"11223344-5566-7788-99aa-bbccddeeff00\"]\n}\n```\n\n---\n\n### `get_log_files` — List saved log files\n\nLists saved log files recursively. You can specify the maximum search depth.\n\n#### Basic example\n\n```json\n{\n  \"logsDir\": \"/absolute/path/to/logs\"\n}\n```\n\n#### Parameters\n\n| Name               | Required | Type    | Description                                                        |\n| ------------------ | -------- | ------- | ------------------------------------------------------------------ |\n| `logsDir`          | Yes      | string  | Directory to search (absolute path only)                           |\n| `limit`            | No       | number  | Max files to retrieve (default: 10)                               |\n| `offset`           | No       | number  | Number of files to skip (default: 0)                              |\n| `logFilePrefix`    | No       | string  | Log file prefix (default: `\"roo-activity-\"`)                      |\n| `logFileExtension` | No       | string  | Log file extension (default: `\".json\"`)                           |\n| `maxDepth`         | No       | number  | Max directory depth (default: 3)                                  |\n\n---\n\n### `search_logs` — Search saved logs\n\nSearches saved logs with various filters.\n\n#### Basic example\n\n```json\n{\n  \"logsDir\": \"/absolute/path/to/logs\"\n}\n```\n\n```json\n{\n  \"logsDir\": \"/absolute/path/to/logs\",\n  \"type\": \"command_execution\"\n}\n```\n\n#### Parameters\n\n| Name               | Required | Type      | Description                                                                                                         |\n| ------------------ | -------- | --------- | ------------------------------------------------------------------------------------------------------------------- |\n| `logsDir`          | Yes      | string    | Log directory (absolute path only)                                                                                  |\n| `logFilePrefix`    | No       | string    | Log file prefix (default: `\"roo-activity-\"`)                                                                       |\n| `logFileExtension` | No       | string    | Log file extension (default: `\".json\"`)                                                                            |\n| `type`             | No       | string    | Filter by activity type (`command_execution`, `code_generation`, `file_operation`, `error_encountered`, `decision_made`, `conversation`) |\n| `level`            | No       | string    | Filter by log level (`debug`, `info`, `warn`, `error`)                                                             |\n| `startDate`        | No       | string    | Start date (YYYY-MM-DD)                                                                                            |\n| `endDate`          | No       | string    | End date (YYYY-MM-DD)                                                                                              |\n| `searchText`       | No       | string    | Search text in summary or details                                                                                  |\n| `limit`            | No       | number    | Max logs to retrieve (default: 50)                                                                                 |\n| `offset`           | No       | number    | Number of logs to skip (default: 0)                                                                                |\n| `parentId`         | No       | string    | Filter by parent activity ID                                                                                       |\n| `sequenceFrom`     | No       | number    | Sequence number lower bound                                                                                        |\n| `sequenceTo`       | No       | number    | Sequence number upper bound                                                                                        |\n| `relatedId`        | No       | string    | Filter by related activity ID                                                                                      |\n| `relatedIds`       | No       | string[]  | Filter by any of related activity IDs                                                                              |\n\n---\n\n## License\n\nMIT\n"}