@goonnguyen/human-mcp 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/.claude/agents/code-reviewer.md +140 -0
  2. package/.claude/agents/database-admin.md +86 -0
  3. package/.claude/agents/debugger.md +119 -0
  4. package/.claude/agents/docs-manager.md +113 -0
  5. package/.claude/agents/git-manager.md +59 -0
  6. package/.claude/agents/planner-researcher.md +97 -0
  7. package/.claude/agents/project-manager.md +113 -0
  8. package/.claude/agents/tester.md +95 -0
  9. package/.claude/commands/cook.md +7 -0
  10. package/.claude/commands/debug.md +10 -0
  11. package/.claude/commands/docs/init.md +11 -0
  12. package/.claude/commands/docs/update.md +11 -0
  13. package/.claude/commands/fix/ci.md +8 -0
  14. package/.claude/commands/fix/fast.md +5 -0
  15. package/.claude/commands/fix/hard.md +7 -0
  16. package/.claude/commands/fix/test.md +16 -0
  17. package/.claude/commands/git/cm.md +5 -0
  18. package/.claude/commands/git/cp.md +4 -0
  19. package/.claude/commands/plan/ci.md +12 -0
  20. package/.claude/commands/plan/two.md +13 -0
  21. package/.claude/commands/plan.md +10 -0
  22. package/.claude/commands/test.md +7 -0
  23. package/.claude/commands/watzup.md +8 -0
  24. package/.claude/hooks/telegram_notify.sh +136 -0
  25. package/.claude/send-discord.sh +64 -0
  26. package/.claude/settings.json +7 -0
  27. package/.claude/statusline.sh +143 -0
  28. package/.env.example +17 -0
  29. package/.github/workflows/publish.yml +51 -0
  30. package/.releaserc.json +26 -0
  31. package/.serena/project.yml +68 -0
  32. package/CHANGELOG.md +27 -0
  33. package/CLAUDE.md +139 -0
  34. package/Dockerfile +28 -0
  35. package/LICENSE +21 -0
  36. package/QUICKSTART.md +97 -0
  37. package/README.md +234 -0
  38. package/bun.lock +1555 -0
  39. package/bunfig.toml +15 -0
  40. package/dist/index.js +24568 -0
  41. package/docs/codebase-structure-architecture-code-standards.md +416 -0
  42. package/docs/codebase-summary.md +321 -0
  43. package/docs/project-overview-pdr.md +270 -0
  44. package/examples/debugging-session.ts +96 -0
  45. package/inspector-wrapper.mjs +33 -0
  46. package/package.json +47 -0
  47. package/plans/reports/001-from-qa-engineer-to-development-team-test-suite-report.md +188 -0
  48. package/plans/templates/bug-fix-template.md +69 -0
  49. package/plans/templates/feature-implementation-template.md +84 -0
  50. package/plans/templates/refactor-template.md +82 -0
  51. package/plans/templates/template-usage-guide.md +58 -0
  52. package/src/index.ts +5 -0
  53. package/src/prompts/debugging-prompts.ts +149 -0
  54. package/src/prompts/index.ts +55 -0
  55. package/src/resources/documentation.ts +316 -0
  56. package/src/resources/index.ts +49 -0
  57. package/src/server.ts +36 -0
  58. package/src/tools/eyes/index.ts +225 -0
  59. package/src/tools/eyes/processors/gif.ts +137 -0
  60. package/src/tools/eyes/processors/image.ts +123 -0
  61. package/src/tools/eyes/processors/video.ts +135 -0
  62. package/src/tools/eyes/schemas.ts +51 -0
  63. package/src/tools/eyes/utils/formatters.ts +126 -0
  64. package/src/tools/eyes/utils/gemini-client.ts +73 -0
  65. package/src/types/index.ts +41 -0
  66. package/src/utils/config.ts +51 -0
  67. package/src/utils/errors.ts +40 -0
  68. package/src/utils/logger.ts +49 -0
  69. package/tests/integration/server.test.ts +24 -0
  70. package/tests/setup.ts +11 -0
  71. package/tests/unit/config.test.ts +40 -0
  72. package/tests/unit/formatters.test.ts +85 -0
  73. package/tsconfig.json +26 -0
@@ -0,0 +1,143 @@
1
+ #!/bin/bash
2
+ # Generated by cc-statusline (https://www.npmjs.com/package/@chongdashu/cc-statusline)
3
+ # Custom Claude Code statusline - Created: 2025-08-19T05:45:09.773Z
4
+ # Theme: detailed | Colors: true | Features: directory, git, model, usage, session, tokens
5
+
6
+ input=$(cat)
7
+
8
+ # ---- color helpers (TTY-aware, respect NO_COLOR) ----
9
+ use_color=1
10
+ [ -t 1 ] || use_color=0
11
+ [ -n "$NO_COLOR" ] && use_color=0
12
+
13
+ C() { if [ "$use_color" -eq 1 ]; then printf '\033[%sm' "$1"; fi; }
14
+ RST() { if [ "$use_color" -eq 1 ]; then printf '\033[0m'; fi; }
15
+
16
+ # ---- basic colors ----
17
+ dir_color() { if [ "$use_color" -eq 1 ]; then printf '\033[1;36m'; fi; } # cyan
18
+ model_color() { if [ "$use_color" -eq 1 ]; then printf '\033[1;35m'; fi; } # magenta
19
+ version_color() { if [ "$use_color" -eq 1 ]; then printf '\033[1;33m'; fi; } # yellow
20
+ rst() { if [ "$use_color" -eq 1 ]; then printf '\033[0m'; fi; }
21
+
22
+ # ---- time helpers ----
23
+ to_epoch() {
24
+ ts="$1"
25
+ if command -v gdate >/dev/null 2>&1; then gdate -d "$ts" +%s 2>/dev/null && return; fi
26
+ date -u -j -f "%Y-%m-%dT%H:%M:%S%z" "${ts/Z/+0000}" +%s 2>/dev/null && return
27
+ python3 - "$ts" <<'PY' 2>/dev/null
28
+ import sys, datetime
29
+ s=sys.argv[1].replace('Z','+00:00')
30
+ print(int(datetime.datetime.fromisoformat(s).timestamp()))
31
+ PY
32
+ }
33
+
34
+ fmt_time_hm() {
35
+ epoch="$1"
36
+ if date -r 0 +%s >/dev/null 2>&1; then date -r "$epoch" +"%H:%M"; else date -d "@$epoch" +"%H:%M"; fi
37
+ }
38
+
39
+ progress_bar() {
40
+ pct="${1:-0}"; width="${2:-10}"
41
+ [[ "$pct" =~ ^[0-9]+$ ]] || pct=0; ((pct<0))&&pct=0; ((pct>100))&&pct=100
42
+ filled=$(( pct * width / 100 )); empty=$(( width - filled ))
43
+ printf '%*s' "$filled" '' | tr ' ' '='
44
+ printf '%*s' "$empty" '' | tr ' ' '-'
45
+ }
46
+
47
+ # git utilities
48
+ num_or_zero() { v="$1"; [[ "$v" =~ ^[0-9]+$ ]] && echo "$v" || echo 0; }
49
+
50
+ # ---- basics ----
51
+ if command -v jq >/dev/null 2>&1; then
52
+ current_dir=$(echo "$input" | jq -r '.workspace.current_dir // .cwd // "unknown"' 2>/dev/null | sed "s|^$HOME|~|g")
53
+ model_name=$(echo "$input" | jq -r '.model.display_name // "Claude"' 2>/dev/null)
54
+ model_version=$(echo "$input" | jq -r '.model.version // ""' 2>/dev/null)
55
+ else
56
+ current_dir="unknown"
57
+ model_name="Claude"; model_version=""
58
+ fi
59
+
60
+ # ---- git colors ----
61
+ git_color() { if [ "$use_color" -eq 1 ]; then printf '\033[1;32m'; fi; }
62
+ rst() { if [ "$use_color" -eq 1 ]; then printf '\033[0m'; fi; }
63
+
64
+ # ---- git ----
65
+ git_branch=""
66
+ if git rev-parse --git-dir >/dev/null 2>&1; then
67
+ git_branch=$(git branch --show-current 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)
68
+ fi
69
+
70
+ # ---- usage colors ----
71
+ usage_color() { if [ "$use_color" -eq 1 ]; then printf '\033[1;35m'; fi; }
72
+ cost_color() { if [ "$use_color" -eq 1 ]; then printf '\033[1;36m'; fi; }
73
+ session_color() {
74
+ rem_pct=$(( 100 - session_pct ))
75
+ if (( rem_pct <= 10 )); then SCLR='1;31'
76
+ elif (( rem_pct <= 25 )); then SCLR='1;33'
77
+ else SCLR='1;32'; fi
78
+ if [ "$use_color" -eq 1 ]; then printf '\033[%sm' "$SCLR"; fi
79
+ }
80
+
81
+ # ---- ccusage integration ----
82
+ session_txt=""; session_pct=0; session_bar=""
83
+ cost_usd=""; cost_per_hour=""; tpm=""; tot_tokens=""
84
+
85
+ if command -v jq >/dev/null 2>&1; then
86
+ blocks_output=$(npx ccusage@latest blocks --json 2>/dev/null || ccusage blocks --json 2>/dev/null)
87
+ if [ -n "$blocks_output" ]; then
88
+ active_block=$(echo "$blocks_output" | jq -c '.blocks[] | select(.isActive == true)' 2>/dev/null | head -n1)
89
+ if [ -n "$active_block" ]; then
90
+ cost_usd=$(echo "$active_block" | jq -r '.costUSD // empty')
91
+ cost_per_hour=$(echo "$active_block" | jq -r '.burnRate.costPerHour // empty')
92
+ tot_tokens=$(echo "$active_block" | jq -r '.totalTokens // empty')
93
+
94
+ # Session time calculation
95
+ reset_time_str=$(echo "$active_block" | jq -r '.usageLimitResetTime // .endTime // empty')
96
+ start_time_str=$(echo "$active_block" | jq -r '.startTime // empty')
97
+
98
+ if [ -n "$reset_time_str" ] && [ -n "$start_time_str" ]; then
99
+ start_sec=$(to_epoch "$start_time_str"); end_sec=$(to_epoch "$reset_time_str"); now_sec=$(date +%s)
100
+ total=$(( end_sec - start_sec )); (( total<1 )) && total=1
101
+ elapsed=$(( now_sec - start_sec )); (( elapsed<0 ))&&elapsed=0; (( elapsed>total ))&&elapsed=$total
102
+ session_pct=$(( elapsed * 100 / total ))
103
+ remaining=$(( end_sec - now_sec )); (( remaining<0 )) && remaining=0
104
+ rh=$(( remaining / 3600 )); rm=$(( (remaining % 3600) / 60 ))
105
+ end_hm=$(fmt_time_hm "$end_sec")
106
+ session_txt="$(printf '%dh %dm until reset at %s (%d%%)' "$rh" "$rm" "$end_hm" "$session_pct")"
107
+ session_bar=$(progress_bar "$session_pct" 10)
108
+ fi
109
+ fi
110
+ fi
111
+ fi
112
+
113
+ # ---- render statusline ----
114
+ printf '📁 %s%s%s' "$(dir_color)" "$current_dir" "$(rst)"
115
+ # git display
116
+ if [ -n "$git_branch" ]; then
117
+ printf ' 🌿 %s%s%s' "$(git_color)" "$git_branch" "$(rst)"
118
+ fi
119
+ printf ' 🤖 %s%s%s' "$(model_color)" "$model_name" "$(rst)"
120
+ if [ -n "$model_version" ] && [ "$model_version" != "null" ]; then
121
+ printf ' 🏷️ %s%s%s' "$(version_color)" "$model_version" "$(rst)"
122
+ fi
123
+ # session time
124
+ if [ -n "$session_txt" ]; then
125
+ printf ' ⌛ %s%s%s' "$(session_color)" "$session_txt" "$(rst)"
126
+ printf ' %s[%s]%s' "$(session_color)" "$session_bar" "$(rst)"
127
+ fi
128
+ # cost
129
+ if [ -n "$cost_usd" ] && [[ "$cost_usd" =~ ^[0-9.]+$ ]]; then
130
+ if [ -n "$cost_per_hour" ] && [[ "$cost_per_hour" =~ ^[0-9.]+$ ]]; then
131
+ printf ' 💵 %s$%.2f ($%.2f/h)%s' "$(cost_color)" "$cost_usd" "$cost_per_hour" "$(rst)"
132
+ else
133
+ printf ' 💵 %s$%.2f%s' "$(cost_color)" "$cost_usd" "$(rst)"
134
+ fi
135
+ fi
136
+ # tokens
137
+ if [ -n "$tot_tokens" ] && [[ "$tot_tokens" =~ ^[0-9]+$ ]]; then
138
+ if [ -n "$tpm" ] && [[ "$tpm" =~ ^[0-9.]+$ ]] && false; then
139
+ printf ' 📊 %s%s tok (%.0f tpm)%s' "$(usage_color)" "$tot_tokens" "$tpm" "$(rst)"
140
+ else
141
+ printf ' 📊 %s%s tok%s' "$(usage_color)" "$tot_tokens" "$(rst)"
142
+ fi
143
+ fi
package/.env.example ADDED
@@ -0,0 +1,17 @@
1
+ # Gemini API Configuration
2
+ GOOGLE_GEMINI_API_KEY=your_api_key_here
3
+ GOOGLE_GEMINI_MODEL=gemini-2.5-flash
4
+
5
+ # Server Configuration
6
+ PORT=3000
7
+ LOG_LEVEL=info
8
+ MAX_REQUEST_SIZE=50MB
9
+ ENABLE_CACHING=true
10
+ CACHE_TTL=3600
11
+ REQUEST_TIMEOUT=120000
12
+ FETCH_TIMEOUT=30000
13
+
14
+ # Security
15
+ MCP_SECRET=your_secret_here
16
+ RATE_LIMIT_REQUESTS=100
17
+ RATE_LIMIT_WINDOW=60000
@@ -0,0 +1,51 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ release:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: write
14
+ packages: write
15
+ issues: write
16
+ pull-requests: write
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+ with:
22
+ fetch-depth: 0
23
+ token: ${{ secrets.CI_GITHUB_TOKEN }}
24
+
25
+ - name: Setup Bun
26
+ uses: oven-sh/setup-bun@v1
27
+ with:
28
+ bun-version: latest
29
+
30
+ - name: Install dependencies
31
+ run: bun install --frozen-lockfile
32
+
33
+ - name: Run type check
34
+ run: bun run typecheck
35
+
36
+ - name: Run tests
37
+ run: bun test
38
+
39
+ - name: Build package
40
+ run: bun run build
41
+
42
+ - name: Setup Node.js
43
+ uses: actions/setup-node@v4
44
+ with:
45
+ node-version: '20'
46
+
47
+ - name: Release
48
+ run: npx semantic-release
49
+ env:
50
+ GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
51
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,26 @@
1
+ {
2
+ "branches": ["main"],
3
+ "plugins": [
4
+ "@semantic-release/commit-analyzer",
5
+ "@semantic-release/release-notes-generator",
6
+ "@semantic-release/changelog",
7
+ [
8
+ "@semantic-release/npm",
9
+ {
10
+ "npmPublish": true,
11
+ "publishConfig": {
12
+ "access": "public",
13
+ "registry": "https://registry.npmjs.org/"
14
+ }
15
+ }
16
+ ],
17
+ [
18
+ "@semantic-release/git",
19
+ {
20
+ "assets": ["package.json", "CHANGELOG.md"],
21
+ "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
22
+ }
23
+ ],
24
+ "@semantic-release/github"
25
+ ]
26
+ }
@@ -0,0 +1,68 @@
1
+ # language of the project (csharp, python, rust, java, typescript, go, cpp, or ruby)
2
+ # * For C, use cpp
3
+ # * For JavaScript, use typescript
4
+ # Special requirements:
5
+ # * csharp: Requires the presence of a .sln file in the project folder.
6
+ language: typescript
7
+
8
+ # whether to use the project's gitignore file to ignore files
9
+ # Added on 2025-04-07
10
+ ignore_all_files_in_gitignore: true
11
+ # list of additional paths to ignore
12
+ # same syntax as gitignore, so you can use * and **
13
+ # Was previously called `ignored_dirs`, please update your config if you are using that.
14
+ # Added (renamed) on 2025-04-07
15
+ ignored_paths: []
16
+
17
+ # whether the project is in read-only mode
18
+ # If set to true, all editing tools will be disabled and attempts to use them will result in an error
19
+ # Added on 2025-04-18
20
+ read_only: false
21
+
22
+
23
+ # list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
24
+ # Below is the complete list of tools for convenience.
25
+ # To make sure you have the latest list of tools, and to view their descriptions,
26
+ # execute `uv run scripts/print_tool_overview.py`.
27
+ #
28
+ # * `activate_project`: Activates a project by name.
29
+ # * `check_onboarding_performed`: Checks whether project onboarding was already performed.
30
+ # * `create_text_file`: Creates/overwrites a file in the project directory.
31
+ # * `delete_lines`: Deletes a range of lines within a file.
32
+ # * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
33
+ # * `execute_shell_command`: Executes a shell command.
34
+ # * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
35
+ # * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
36
+ # * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
37
+ # * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
38
+ # * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
39
+ # * `initial_instructions`: Gets the initial instructions for the current project.
40
+ # Should only be used in settings where the system prompt cannot be set,
41
+ # e.g. in clients you have no control over, like Claude Desktop.
42
+ # * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
43
+ # * `insert_at_line`: Inserts content at a given line in a file.
44
+ # * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
45
+ # * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
46
+ # * `list_memories`: Lists memories in Serena's project-specific memory store.
47
+ # * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
48
+ # * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
49
+ # * `read_file`: Reads a file within the project directory.
50
+ # * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
51
+ # * `remove_project`: Removes a project from the Serena configuration.
52
+ # * `replace_lines`: Replaces a range of lines within a file with new content.
53
+ # * `replace_symbol_body`: Replaces the full definition of a symbol.
54
+ # * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
55
+ # * `search_for_pattern`: Performs a search for a pattern in the project.
56
+ # * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
57
+ # * `switch_modes`: Activates modes by providing a list of their names
58
+ # * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
59
+ # * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
60
+ # * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
61
+ # * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
62
+ excluded_tools: []
63
+
64
+ # initial prompt for the project. It will always be given to the LLM upon activating the project
65
+ # (contrary to the memories, which are loaded on demand).
66
+ initial_prompt: ""
67
+
68
+ project_name: "human-mcp"
package/CHANGELOG.md ADDED
@@ -0,0 +1,27 @@
1
+ ## [1.0.2](https://github.com/mrgoonie/human-mcp/compare/v1.0.1...v1.0.2) (2025-09-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **ci:** configure NPM package for public publishing ([3222450](https://github.com/mrgoonie/human-mcp/commit/3222450edae2f40e86cba29dea5c3dfd35bf4fd1))
7
+
8
+ ## [1.0.1](https://github.com/mrgoonie/human-mcp/compare/v1.0.0...v1.0.1) (2025-09-08)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **config:** update NPM publishing configuration for scoped package ([caa26cd](https://github.com/mrgoonie/human-mcp/commit/caa26cd36d6967a935921b62e7478f4074cac671))
14
+
15
+ # 1.0.0 (2025-09-08)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * resolve timeout issues and improve MCP SDK integration ([ccd7f8d](https://github.com/mrgoonie/human-mcp/commit/ccd7f8d44dc9b8f9e5432092e40fa6dd99759dae))
21
+ * **tests:** resolve type mismatches and schema alignment ([f68308b](https://github.com/mrgoonie/human-mcp/commit/f68308bc476be2e47a35da92d9b766c0c2d02a93))
22
+
23
+
24
+ ### Features
25
+
26
+ * add claude agent definitions for code review, database, debugging, docs and git management ([8203456](https://github.com/mrgoonie/human-mcp/commit/8203456615ca498074657a07a25cea99b9d538fb))
27
+ * add semantic-release automation with GitHub Actions ([3733a38](https://github.com/mrgoonie/human-mcp/commit/3733a38b1ab90ef37e44af2726ec0b3cec88932e))
package/CLAUDE.md ADDED
@@ -0,0 +1,139 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ Human MCP is a Model Context Protocol server that provides AI coding agents with visual analysis capabilities for debugging UI issues, processing screenshots, videos, and GIFs using Google Gemini AI.
8
+
9
+ ## Development Commands
10
+
11
+ ### Core Commands
12
+ - `bun run dev` - Start development server with hot reload
13
+ - `bun run build` - Build for production (outputs to dist/)
14
+ - `bun run start` - Run production build
15
+ - `bun test` - Run test suite
16
+ - `bun run typecheck` - Run TypeScript type checking
17
+ - `bun run inspector` - Launch MCP inspector for testing tools
18
+
19
+ ### Testing with MCP Inspector
20
+ The inspector tool is crucial for testing MCP tools during development:
21
+ ```bash
22
+ bun run inspector
23
+ ```
24
+
25
+ ## Architecture
26
+
27
+ ### Core Structure
28
+ ```
29
+ src/
30
+ ├── index.ts # Entry point, starts stdio server
31
+ ├── server.ts # MCP server setup and initialization
32
+ ├── tools/eyes/ # Vision analysis tools (main functionality)
33
+ ├── prompts/ # Pre-built debugging prompts
34
+ ├── resources/ # Documentation resources
35
+ └── utils/ # Configuration, logging, error handling
36
+ ```
37
+
38
+ ### Key Components
39
+
40
+ **Vision Analysis (tools/eyes/)**
41
+ - `index.ts` - Registers eyes.analyze and eyes.compare tools
42
+ - `processors/` - Handles image, video, and GIF processing
43
+ - `utils/gemini-client.ts` - Google Gemini API integration
44
+ - `schemas.ts` - Zod validation schemas for tool inputs
45
+
46
+ **Configuration (utils/config.ts)**
47
+ - Environment-based configuration using Zod validation
48
+ - Required: `GOOGLE_GEMINI_API_KEY`
49
+ - Optional settings for timeouts, caching, rate limits
50
+
51
+ ## MCP Tools
52
+
53
+ ### eyes.analyze
54
+ Primary tool for visual analysis of images, videos, and GIFs:
55
+ - Supports file paths, URLs, and base64 data URIs
56
+ - Configurable detail levels (quick/detailed)
57
+ - Frame extraction for videos and GIFs
58
+ - Custom analysis prompts
59
+
60
+ ### eyes.compare
61
+ Compares two images to identify visual differences:
62
+ - Three comparison types: pixel, structural, semantic
63
+ - Detailed difference reporting
64
+ - Impact assessment and recommendations
65
+
66
+ ## Important Development Notes
67
+
68
+ ### Google Gemini Documentation
69
+ - [Gemini API](https://ai.google.dev/gemini-api/docs?hl=en)
70
+ - [Gemini Models](https://ai.google.dev/gemini-api/docs/models)
71
+ - [Video Understanding](https://ai.google.dev/gemini-api/docs/video-understanding?hl=en)
72
+ - [Image Understanding](https://ai.google.dev/gemini-api/docs/image-understanding)
73
+ - [Document Understanding](https://ai.google.dev/gemini-api/docs/document-processing)
74
+ - [Audio Understanding](https://ai.google.dev/gemini-api/docs/audio)
75
+ - [Speech Generation](https://ai.google.dev/gemini-api/docs/speech-generation)
76
+ - [Image Generation](https://ai.google.dev/gemini-api/docs/image-generation)
77
+ - [Video Generation](https://ai.google.dev/gemini-api/docs/video)
78
+
79
+ ### Error Handling
80
+ - All tool operations use centralized error handling via `utils/errors.ts`
81
+ - Errors are logged and returned as structured MCP responses
82
+ - Network timeouts are configurable via environment variables
83
+
84
+ ### Media Processing
85
+ - Images: PNG, JPEG, WebP, GIF (static)
86
+ - Videos: MP4, WebM, MOV, AVI (uses ffmpeg via fluent-ffmpeg)
87
+ - GIFs: Frame extraction using Sharp library
88
+ - All processors handle file paths, URLs, and base64 data
89
+
90
+ ### TypeScript Configuration
91
+ - Uses ESNext modules with bundler resolution
92
+ - Path mapping: `@/*` maps to `src/*`
93
+ - Strict type checking enabled
94
+ - No emit mode (Bun handles compilation)
95
+
96
+ ### Google Gemini Integration
97
+ - Uses Google Generative AI SDK
98
+ - Model selection based on detail level
99
+ - Configurable via `GOOGLE_GEMINI_MODEL` environment variable
100
+ - Default: `gemini-2.5-flash`
101
+
102
+ ## Testing
103
+
104
+ Run tests with `bun test`. The project uses Bun's built-in test runner.
105
+
106
+ For manual testing of MCP tools, use the inspector:
107
+ ```bash
108
+ bun run inspector
109
+ ```
110
+
111
+ This launches a web interface for testing tool functionality interactively.
112
+
113
+ ---
114
+
115
+ ## Development Rules
116
+
117
+ ### General
118
+ - Use `pnpm` instead of `npm` or `yarn` for package management
119
+ - Use `context7` mcp tools for exploring latest docs of plugins/packages
120
+ - Use `senera` mcp tools for semantic retrieval and editing capabilities
121
+
122
+ ### Code Quality Guidelines
123
+ - Read and follow codebase structure and code standards in `./docs`
124
+ - Don't be too harsh on code linting, but make sure there are no syntax errors and code are compilable
125
+ - Prioritize functionality and readability over strict style enforcement and code formatting
126
+ - Use reasonable code quality standards that enhance developer productivity
127
+ - Use try catch error handling & cover security standards
128
+ - Use `code-reviewer` agent to review code after every implementation
129
+
130
+ ### Pre-commit/Push Rules
131
+ - Run linting before commit
132
+ - Run tests before push (DO NOT ignore failed tests just to pass the build or github actions)
133
+ - Keep commits focused on the actual code changes
134
+ - **DO NOT** commit and push any confidential information (such as dotenv files, API keys, database credentials, etc.) to git repository!
135
+ - NEVER automatically add AI attribution signatures like:
136
+ "🤖 Generated with [Claude Code]"
137
+ "Co-Authored-By: Claude noreply@anthropic.com"
138
+ Any AI tool attribution or signature
139
+ - Create clean, professional commit messages without AI references. Use conventional commit format.
package/Dockerfile ADDED
@@ -0,0 +1,28 @@
1
+ FROM oven/bun:1.2.19-alpine
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies for video processing
6
+ RUN apk add --no-cache ffmpeg
7
+
8
+ # Copy package files
9
+ COPY package.json bun.lockb* ./
10
+
11
+ # Install dependencies
12
+ RUN bun install --frozen-lockfile
13
+
14
+ # Copy source code
15
+ COPY . .
16
+
17
+ # Build the application
18
+ RUN bun run build
19
+
20
+ # Expose port
21
+ EXPOSE 3000
22
+
23
+ # Health check
24
+ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
25
+ CMD bun run dist/index.js --help || exit 1
26
+
27
+ # Run the application
28
+ CMD ["bun", "run", "dist/index.js"]
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Human MCP
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/QUICKSTART.md ADDED
@@ -0,0 +1,97 @@
1
+ # Human MCP Quickstart Guide
2
+
3
+ Get up and running with Human MCP in less than 5 minutes!
4
+
5
+ ## 🚀 Quick Installation
6
+
7
+ ```bash
8
+ # 1. Clone and install
9
+ git clone https://github.com/human-mcp/human-mcp.git
10
+ cd human-mcp
11
+ bun install
12
+
13
+ # 2. Set up environment
14
+ cp .env.example .env
15
+ # Edit .env and add your GOOGLE_GEMINI_API_KEY
16
+
17
+ # 3. Start the server
18
+ bun run dev
19
+ ```
20
+
21
+ ## 📱 Configuration for Claude Desktop
22
+
23
+ Add this to your Claude Desktop config file:
24
+
25
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
26
+ **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
27
+
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "human-mcp": {
32
+ "command": "bun",
33
+ "args": ["run", "/path/to/human-mcp/src/index.ts"],
34
+ "env": {
35
+ "GOOGLE_GEMINI_API_KEY": "your_actual_api_key_here"
36
+ }
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ## 🔧 Get Your Gemini API Key
43
+
44
+ 1. Visit [Google AI Studio](https://aistudio.google.com/)
45
+ 2. Click "Get API Key"
46
+ 3. Create a new project or use existing one
47
+ 4. Copy your API key
48
+
49
+ ## ✅ Test Your Installation
50
+
51
+ Try this in Claude Desktop:
52
+
53
+ ```
54
+ Can you analyze this screenshot for UI bugs?
55
+ [Upload a screenshot]
56
+ ```
57
+
58
+ Human MCP should analyze the image and provide detailed debugging insights!
59
+
60
+ ## 🎯 Common Use Cases
61
+
62
+ ### Debug UI Issues
63
+ ```
64
+ Use the eyes.analyze tool with this screenshot:
65
+ - Type: image
66
+ - Analysis type: ui_debug
67
+ - Detail level: detailed
68
+ ```
69
+
70
+ ### Analyze Error Recordings
71
+ ```
72
+ Use the eyes.analyze tool with this screen recording:
73
+ - Type: video
74
+ - Analysis type: error_detection
75
+ - Focus on: the error sequence
76
+ ```
77
+
78
+ ### Check Accessibility
79
+ ```
80
+ Use the eyes.analyze tool:
81
+ - Analysis type: accessibility
82
+ - Check accessibility: true
83
+ ```
84
+
85
+ ## 🆘 Troubleshooting
86
+
87
+ **"Tool not found"** → Restart Claude Desktop after config changes
88
+ **"API key error"** → Check your GOOGLE_GEMINI_API_KEY in .env or config
89
+ **"Permission denied"** → Make sure bun is installed and executable
90
+
91
+ ## 📖 Next Steps
92
+
93
+ - Read the full [README.md](README.md) for detailed documentation
94
+ - Try the [example debugging session](examples/debugging-session.ts)
95
+ - Check out the [API documentation](src/resources/documentation.ts)
96
+
97
+ Happy debugging! 🐛✨