Skip to content

Claude/mcp codekeeper webapp ldnzsg - #3177

Merged
amirbiron merged 5 commits into
mainfrom
claude/mcp-codekeeper-webapp-ldnzsg
Jul 19, 2026
Merged

Claude/mcp codekeeper webapp ldnzsg#3177
amirbiron merged 5 commits into
mainfrom
claude/mcp-codekeeper-webapp-ldnzsg

Conversation

@amirbiron

@amirbiron amirbiron commented Jul 19, 2026

Copy link
Copy Markdown
Owner

תבנית Pull Request

✨ תיאור קצר

  • מה שיניתם ולמה? (2-3 משפטים)

📦 שינויים עיקריים

  • קוד (Backend)
  • בוט טלגרם
  • מסד נתונים/מיגרציות
  • תיעוד (docs/)
  • DevOps/CI/CD

פירוט נקודות (רשימת תבליטים):

🧪 בדיקות

  • איך בדקתם? מה עבר? מה נשאר?
  • Unit
  • Integration
  • Manual

🧪 בדיקות נדרשות ב‑PR

  • 🔍 Code Quality & Security
  • Unit Tests (3.11)
  • Unit Tests (3.12)

📝 סוג שינוי

  • feat: פיצ'ר חדש
  • fix: תיקון באג
  • docs: שינוי תיעוד בלבד
  • refactor: שינוי קוד ללא שינוי התנהגות
  • perf: שיפור ביצועים
  • chore/ci: תשתית/CI
  • breaking change: שינוי שובר תאימות

דוגמאות Conventional Commits

סוג דוגמה להודעה מתי להשתמש
feat feat: הוספת מסך הגדרות פיצ'ר חדש למשתמש
fix fix: תיקון קריסה בעת התחברות תיקון באג מול משתמשים/פרודקשן
chore chore: שדרוג Gradle ל-8.9 תחזוקה, כלי פיתוח, housekeeping
docs docs: עדכון README עם הוראות התקנה שינויי תיעוד בלבד
refactor refactor: חילוץ Repository ל-UseCases שינוי מבני ללא שינוי התנהגות
test test: הוספת בדיקות ל-LoginViewModel הוספת/עדכון בדיקות
build build: הוספת flavor staging ל-CI שינויים בבילד/תלויות/תצורה

✅ צ'קליסט

  • הקוד עוקב אחרי הסגנון (Black/isort/flake8/mypy)
  • בדיקות רצות ועוברות
  • תיעוד עודכן (README/Docs)
  • אם נוספו ג'ובים חדשים (Background Jobs) – וודא שהם רשומים ב-services/register_jobs.py (כולל Callback/Trigger להפעלה ידנית — למשל callback_name/trigger_func לפי המבנה) כדי שיופיעו בדשבורד
  • אם נוספו/שונו משתני סביבה – עודכן docs/environment-variables.rst וגם services/config_inspector_service.py
  • אם נוספו/השתנו טוקנים – עודכן גם docs/webapp/theming_and_css.rst + FEATURE_SUGGESTIONS/theme_matrix.md
  • אין סודות/מפתחות בקוד
  • אין מחיקות מסוכנות/פעולות על root (ראו .cursorrules)
  • הודעת הקומיט תואמת Conventional Commits (ע"פ הטבלה)
  • CHANGELOG עודכן אם נדרש
  • כל ה‑Required Checks לעיל ירוקים
  • צילום/וידאו UI מצורף אם רלוונטי

🧩 השפעות/סיכונים

  • השפעה אפשרית על פרודקשן, ביצועים, או אבטחה:

🔗 קישורים

🧯 סיכון / החזרה לאחור (Rollback)

  • תוכנית חזרה לאחור במקרה תקלה:

Summary by CodeRabbit

  • תכונות חדשות

    • נוספה אינטגרציה לקריאה בלבד בין Claude.ai ל-CodeKeeper באמצעות Remote MCP.
    • ניתן לחפש, להציג ולנהל גרסאות של קבצי קוד ואוספים שמורים.
    • נוספה תמיכה באימות באמצעות Personal Access Token, כולל תוקף, ביטול והרשאות.
    • נוסף endpoint לבדיקת תקינות השירות וכלי עזר להנפקת טוקנים.
  • תיעוד

    • נוספו מדריכי התקנה, הפעלה וחיבור ל-Claude Code ול-Claude Desktop.
    • נוסף מסמך תכנון הכולל אבטחה, פרטיות ושלבי הרחבה עתידיים.
  • בדיקות

    • נוספו בדיקות לאימות, הרשאות, חיפוש, קבצים, אוספים והפעלת השירות.

claude added 2 commits July 19, 2026 11:31
מסמך תכנון לחיבור Claude.ai לקבצי המשתמש ב-CodeKeeper דרך שרת MCP מרוחק.

- ממפה את הקיים: שכבת DB in-process (database/repository.py), אימות סשן
  (webapp/app.py:3204), וגשרי טוקנים קיימים (webapp_tokens/remember_tokens).
- מציע ארכיטקטורה: שירות MCP נפרד (ASGI) שניגש ישירות ל-database, מסונן user_id.
- אימות בשתי פאזות: PAT (MVP) → OAuth 2.1 מעל זהות טלגרם הקיימת.
- כלים: list_files/search_code/get_file/list_versions (+ save_file בהמשך).
- אבטחה: read-only כברירת מחדל, בידוד user_id מהטוקן, Smart Projection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WNFuSyshwpRcxozVZEui5K
מימוש פאזה 0 מהתוכנית: שרת MCP מרוחק (Streamable HTTP) קריאה-בלבד שחושף
את קבצי הקוד והאוספים של המשתמש ל-Claude Code/Desktop.

- mcp_server/: חבילת FastMCP עם 7 כלים (list_files, search_code, get_file,
  list_versions, list_collections, get_collection, get_collection_items).
  ניגש ישירות ל-database.db + CollectionsManager, מסונן user_id, מכבד את
  חוק ה-Smart Projection (בלי code ברשימות/חיפוש).
- אימות PAT: token_store.py מנהל טוקנים (hash בלבד) בקולקשן mcp_tokens;
  auth.py מאמת Bearer ומזריק user_id ל-request.state; ה-user_id נגזר תמיד
  מהטוקן, לעולם לא מקלט הלקוח. get_file בודק בעלות גם לפי file_id.
- scripts/mcp_issue_token.py: הנפקת טוקן ל-CLI/בדיקות.
- tests/test_mcp_*.py: 27 טסטים (fakes ידניים, בלי MongoDB אמיתי) —
  token store, בעלות/סריאליזציה, clamping, middleware, ורישום כלים.
- requirements/base.txt: mcp==1.28.1 (תואם לפינים הקיימים).
- מסמך התכנון עודכן לסטטוס "פאזה 0 מומשה" + README ל-mcp_server.

פאזות הבאות (בתכנון): פקודת בוט /connect_claude, OAuth 2.1 ל-Claude.ai, כתיבה.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WNFuSyshwpRcxozVZEui5K
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@amirbiron, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 26 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6dfceaa8-8155-4ba9-b415-1063c5fdf43e

📥 Commits

Reviewing files that changed from the base of the PR and between 603e124 and bfc10ae.

📒 Files selected for processing (10)
  • FEATURE_SUGGESTIONS/FEATURE_MCP_CLAUDE_INTEGRATION.md
  • main.py
  • mcp_server/README.md
  • mcp_server/app.py
  • mcp_server/auth.py
  • mcp_server/backend.py
  • mcp_server/wiring.py
  • scripts/mcp_issue_token.py
  • src/infrastructure/composition/files_facade.py
  • tests/test_mcp_backend.py
📝 Walkthrough

Walkthrough

נוסף שרת MCP מרוחק לקריאה בלבד עבור CodeKeeper, עם כלי שליפת קבצים ואוספים, אימות Personal Access Token, שכבת גישה ל-MongoDB, הפעלת ASGI, סקריפט הנפקת טוקנים, תיעוד ובדיקות יחידה ועשן.

Changes

אינטגרציית MCP עם Claude

Layer / File(s) Summary
חוזה MCP ותיעוד
FEATURE_SUGGESTIONS/FEATURE_MCP_CLAUDE_INTEGRATION.md, mcp_server/README.md, mcp_server/__init__.py
תועדו ארכיטקטורת MCP, כלי הקריאה, מודל האבטחה, הפריסה והגבלות Phase 0.
אחסון PAT ואימות בקשות
mcp_server/token_store.py, mcp_server/auth.py, scripts/mcp_issue_token.py, tests/test_mcp_token_store.py, tests/test_mcp_auth_middleware.py
נוספו הנפקה, ביטול ואימות של טוקנים הנשמרים כ-hash, middleware ל-Bearer והזרקת זהות משתמש, עם בדיקות תרחישים מרכזיים.
גישה לנתונים וולידציית כלים
mcp_server/backend.py, mcp_server/handlers.py, tests/test_mcp_backend.py, tests/test_mcp_handlers.py
נוספו שליפת קבצים, גרסאות ואוספים, סריאליזציה ללא שדות כבדים, בדיקת בעלות, ונרמול פרמטרים לכלים.
רישום כלים והפעלת ASGI
mcp_server/server.py, mcp_server/app.py, requirements/base.txt, tests/test_mcp_server_build.py
נרשמו כלי FastMCP, endpoint ‏/healthz, middleware והפעלת ASGI עם חיבור Mongo עצל ותלות MCP. נבדקה בניית הכלים והאפליקציה.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Claude
  participant MCPServer
  participant MCPTokenStore
  participant ProductionBackend
  participant MongoDB
  Claude->>MCPServer: בקשת MCP עם Bearer token
  MCPServer->>MCPTokenStore: אימות הטוקן
  MCPTokenStore-->>MCPServer: user_id ו-scopes
  MCPServer->>ProductionBackend: הפעלת כלי עם user_id
  ProductionBackend->>MongoDB: שליפה מסוננת לפי המשתמש
  MongoDB-->>ProductionBackend: מסמכי קבצים או אוספים
  ProductionBackend-->>MCPServer: תוצאת JSON
  MCPServer-->>Claude: תגובת כלי MCP
Loading

Possibly related PRs

  • amirbiron/CodeBot#3176: מעדכן את אותו מסמך תכנון לאינטגרציית Claude.ai ושרת MCP.

Poem

ארנב קטן קפץ לשרת,
טוקן בבטחה נשמרת,
קבצים חיפש, גרסאות מצא,
Claude קיבל תשובה ברורה,
MCP רץ — הופ, איזה פלא!

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning התיאור נשאר כתבנית עם שדות ממולאים חלקית בלבד, בלי פירוט של מה השתנה, למה, בדיקות, סיכונים או Rollback. מלאו את ה-What/Why/Tests, סמנו את סוג השינוי, והוסיפו בדיקות, סיכונים, השפעת Deploy ותוכנית Rollback.
Docstring Coverage ⚠️ Warning Docstring coverage is 8.93% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive הכותרת קשורה לנושא ה-PR, אבל היא כללית ולא מתארת את השינוי העיקרי בצורה ברורה. כדאי להחליף לכותרת קצרה וספציפית, למשל: "Add read-only MCP server for Claude to access CodeKeeper files".
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/mcp-codekeeper-webapp-ldnzsg

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🧯 Dangerous deletes guard report

Policy: see .cursorrules — dangerous deletions are blocked unless wrapped safely.

Summary:

  • Flagged findings (blocking): 0
    0
  • Excluded matches (not blocking): 15
  • Total matches (all files): 129

Flagged findings (file:line:snippet):
(none)

Excluded matches (by path pattern)
./webapp/static/js/md_preview.bundle.js.map:4:  "sourcesContent": ["// Markdown-it plugin to render GitHub-style task lists; see\n//\n// https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments\n// https://github.com/blog/1825-t … [truncated]
./README.md:842:find . -name "__pycache__" -exec rm -rf {} +
./Dockerfile:42:    rm -rf /var/lib/apt/lists/*
./Dockerfile:121:    rm -rf /var/lib/apt/lists/*
./node_modules/mermaid/dist/mermaid.min.js:1524:`,"getStyles"),c1e=RQe});var h1e={};dr(h1e,{diagram:()=>NQe});var NQe,f1e=N(()=>{"use strict";$ge();a1e();l1e();u1e();NQe={parser:Fge,db:n1e,renderer:o1e,styles:c1e}});var m1e,g1e=N(()=>{"use  … [truncated]
./node_modules/mermaid/dist/mermaid.min.js.map:4:  "sourcesContent": ["/**\n* Default values for dimensions\n*/\nconst defaultIconDimensions = Object.freeze({\n\tleft: 0,\n\ttop: 0,\n\twidth: 16,\n\theight: 16\n});\n/**\n* Default values fo … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.core/chunk-KS23V3DP.mjs.map:4:  "sourcesContent": ["{\n  \"name\": \"mermaid\",\n  \"version\": \"11.12.0\",\n  \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequence  … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.esm/chunk-2M32CCKP.mjs.map:4:  "sourcesContent": ["{\n  \"name\": \"mermaid\",\n  \"version\": \"11.12.0\",\n  \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequence d … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.esm.min/chunk-4HFYJGYH.mjs.map:4:  "sourcesContent": ["{\n  \"name\": \"mermaid\",\n  \"version\": \"11.12.0\",\n  \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequen … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.esm.min/chunk-4HFYJGYH.mjs:1:var r={name:"mermaid",version:"11.12.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graph … [truncated]
./node_modules/mermaid/dist/mermaid.js.map:4:  "sourcesContent": ["/**\n* Default values for dimensions\n*/\nconst defaultIconDimensions = Object.freeze({\n\tleft: 0,\n\ttop: 0,\n\twidth: 16,\n\theight: 16\n});\n/**\n* Default values for tr … [truncated]
./node_modules/katex/src/fonts/Makefile:139:	rm -rf pfa ff otf ttf woff woff2
./node_modules/katex/package.json:153:    "build": "rimraf dist/ && mkdirp dist && cp README.md dist && rollup -c --failAfterWarnings && webpack && node update-sri.js package dist/README.md",
./docs/Makefile:24:	rm -rf $(BUILDDIR)
./docs/DOCUMENTATION_GUIDE.md:453:rm -rf _build

@github-actions

github-actions Bot commented Jul 19, 2026

Copy link
Copy Markdown

⏱️ Performance report

(No performance test durations collected. Mark tests with @pytest.mark.performance.)

@github-actions

github-actions Bot commented Jul 19, 2026

Copy link
Copy Markdown

📖 Documentation Preview

The documentation has been built successfully!

To view locally:

  1. Download the artifacts
  2. Extract the zip file
  3. Open index.html in your browser

@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (6)
mcp_server/app.py (1)

22-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

כפילות קוד – מציאת חיבור ל-MongoDB.

הפונקציה _resolve_mongo ממומשת פעמיים באופן זהה לחלוטין. מומלץ להעביר את הפונקציה למודול משותף (לדוגמה בקובץ mcp_server/utils.py או mcp_server/backend.py) כדי לשמור על עקרונות DRY.

  • mcp_server/app.py#L22-L39: יש לייבא ולהשתמש בפונקציה מהמודול המשותף במקום להגדיר אותה מחדש.
  • scripts/mcp_issue_token.py#L20-L34: יש לייבא ולהשתמש בפונקציה המשותפת במקום להגדיר אותה מחדש.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@mcp_server/app.py` around lines 22 - 39, Move the duplicated _resolve_mongo
implementation into a shared module, preserving its current behavior, then
import and use that shared function in mcp_server/app.py at lines 22-39 and
scripts/mcp_issue_token.py at lines 20-34; remove the local definitions from
both sites.
FEATURE_SUGGESTIONS/FEATURE_MCP_CLAUDE_INTEGRATION.md (2)

98-98: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

הוספת הגדרת שפה לבלוק הקוד.

כדאי להגדיר את סוג התוכן (למשל text) בבלוק הקוד כדי למנוע אזהרות מסוג MD040 וכדי להבטיח תצוגה תקינה בכלים שונים.

💡 הצעה לתיקון
-```
+```text
 ┌────────────┐   OAuth 2.1 (PKCE)   ┌──────────────────────────┐
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@FEATURE_SUGGESTIONS/FEATURE_MCP_CLAUDE_INTEGRATION.md` at line 98, Specify
the code block language as text for the ASCII diagram in the documentation,
using the opening fence around the diagram to prevent MD040 warnings and
preserve consistent rendering.

Source: Linters/SAST tools


127-127: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

הוספת שורה ריקה לפני הטבלה.

רצוי להוסיף שורה ריקה לפני תחילת הטבלה כדי למנוע בעיות רינדור בפלטפורמות מסוימות (בהתאם לאזהרת Linter מסוג MD058).

💡 הצעה לתיקון
 ### 5.1 Tools
+
 | כלי | קלט | פלט | נשען על |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@FEATURE_SUGGESTIONS/FEATURE_MCP_CLAUDE_INTEGRATION.md` at line 127, Insert a
blank line immediately before the Markdown table whose header begins with “| כלי
| קלט | פלט | נשען על |” in FEATURE_MCP_CLAUDE_INTEGRATION.md, without changing
the table content.

Source: Linters/SAST tools

mcp_server/auth.py (1)

57-58: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

תיעוד שגיאות מערכת בתהליך האימות.

בליעת השגיאה לחלוטין מחזירה ללקוח שגיאת 401 גנרית, ועלולה להקשות מאוד על איתור תקלות בפרודקשן במקרה של בעיות חיבור למסד הנתונים. מומלץ לתעד (log) את השגיאה לפני שמגדירים את המשתמש כלא מאומת.

💡 הצעה לתיקון
-        except Exception:
+        except Exception as e:
+            import logging
+            logging.warning("Token verification failed: %s", e)
             principal = None
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@mcp_server/auth.py` around lines 57 - 58, Update the exception handler in the
authentication flow to log the caught exception before setting principal to
None. Preserve the existing unauthenticated fallback while recording sufficient
error details to diagnose production failures such as database connectivity
issues.
mcp_server/README.md (2)

17-18: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

הוסף שורה ריקה לפני תחילת הטבלה.

מומלץ להוסיף שורה ריקה לפני הטבלה (כאן ובשורה 90) כדי להבטיח שהיא תרונדר בצורה תקינה בכל הכלים למציאת תצוגת Markdown. כלי ה-linting (MD058) מתריע על חוסר בשורה כזו.

📝 הצעה לתיקון
 ### הכלים (Tools)
+
 | כלי | תיאור |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@mcp_server/README.md` around lines 17 - 18, Insert a blank line between the
“### הכלים (Tools)” heading and the table beginning with “| כלי | תיאור |”, and
apply the same Markdown spacing correction at the table near line 90.

Source: Linters/SAST tools


81-81: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

הגדר שפה לבלוק הקוד.

כדאי להגדיר שפה (למשל text או bash) לבלוק הקוד על מנת לשפר את הקריאות ולמנוע אזהרות linting (MD040).

📝 הצעה לתיקון
-```
+```text
 Start command:  uvicorn mcp_server.app:app --host 0.0.0.0 --port $PORT
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@mcp_server/README.md` at line 81, Update the code block containing the
Uvicorn start command in the README to specify an appropriate language
identifier, such as text or bash, immediately after the opening fence, while
preserving the command content.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@mcp_server/backend.py`:
- Around line 148-159: Update get_collection_items to ensure returned collection
items pass through _clean() before being exposed to the client, preserving the
existing pagination and folder filtering arguments. If the CollectionsManager
query already guarantees HEAVY_FIELDS_EXCLUDE_PROJECTION, verify and enforce
that projection there instead, ensuring heavy fields such as code cannot appear
in results.

---

Nitpick comments:
In `@FEATURE_SUGGESTIONS/FEATURE_MCP_CLAUDE_INTEGRATION.md`:
- Line 98: Specify the code block language as text for the ASCII diagram in the
documentation, using the opening fence around the diagram to prevent MD040
warnings and preserve consistent rendering.
- Line 127: Insert a blank line immediately before the Markdown table whose
header begins with “| כלי | קלט | פלט | נשען על |” in
FEATURE_MCP_CLAUDE_INTEGRATION.md, without changing the table content.

In `@mcp_server/app.py`:
- Around line 22-39: Move the duplicated _resolve_mongo implementation into a
shared module, preserving its current behavior, then import and use that shared
function in mcp_server/app.py at lines 22-39 and scripts/mcp_issue_token.py at
lines 20-34; remove the local definitions from both sites.

In `@mcp_server/auth.py`:
- Around line 57-58: Update the exception handler in the authentication flow to
log the caught exception before setting principal to None. Preserve the existing
unauthenticated fallback while recording sufficient error details to diagnose
production failures such as database connectivity issues.

In `@mcp_server/README.md`:
- Around line 17-18: Insert a blank line between the “### הכלים (Tools)” heading
and the table beginning with “| כלי | תיאור |”, and apply the same Markdown
spacing correction at the table near line 90.
- Line 81: Update the code block containing the Uvicorn start command in the
README to specify an appropriate language identifier, such as text or bash,
immediately after the opening fence, while preserving the command content.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a0189f35-7799-4784-abf3-267777f6ceee

📥 Commits

Reviewing files that changed from the base of the PR and between 63446b6 and 603e124.

📒 Files selected for processing (16)
  • FEATURE_SUGGESTIONS/FEATURE_MCP_CLAUDE_INTEGRATION.md
  • mcp_server/README.md
  • mcp_server/__init__.py
  • mcp_server/app.py
  • mcp_server/auth.py
  • mcp_server/backend.py
  • mcp_server/handlers.py
  • mcp_server/server.py
  • mcp_server/token_store.py
  • requirements/base.txt
  • scripts/mcp_issue_token.py
  • tests/test_mcp_auth_middleware.py
  • tests/test_mcp_backend.py
  • tests/test_mcp_handlers.py
  • tests/test_mcp_server_build.py
  • tests/test_mcp_token_store.py

Comment thread mcp_server/backend.py
Comment thread mcp_server/backend.py
claude added 2 commits July 19, 2026 13:06
… docs

תיקוני סקירה (כל ההערות היו תקפות):
- backend.get_collection_items: הגנת עומק — מסנן שדות כבדים (code/content)
  מפריטי אוסף לפני החזרה, כדי שלא ידלפו גם אם CollectionsManager ישתנה.
- mcp_server/wiring.py: חילוץ resolve_mongo המשותף; הוסרו ההעתקים
  מ-app.py ומ-scripts/mcp_issue_token.py.
- auth.py: לוג לחריגה שנבלעה ב-verify (בלי הטוקן) לצורך אבחון בפרודקשן.
- Markdown: שפת code fence (text) לדיאגרמות ולבלוק ההרצה, ושורות ריקות
  לפני טבלאות (MD040/MD058) ב-README ובמסמך התכנון.
- טסט חדש: מוודא שפריטי אוסף מסוננים משדות כבדים.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WNFuSyshwpRcxozVZEui5K
מוסיף פקודת בוט /connect_claude שמנפיקה למשתמש טוקן MCP אישי מתוך טלגרם
(במקום להריץ סקריפט CLI), ומחזירה פקודת חיבור מוכנה ל-Claude Code.

- main.py: connect_claude_command (מודול-לבל), רישום ב-setup_handlers,
  וכניסה ב-HELP_SECTIONS. אבטחה: מונפק בצ'אט פרטי בלבד (שלא ידלוף בקבוצה);
  fallback לטקסט אם פרסום HTML נכשל (לא לאבד את הטוקן).
- files_facade.issue_mcp_token: עוטף את MCPTokenStore (import עצל) כדי
  לשמור את החיווט במקום אחד ולא לגעת ב-PyMongo גולמי מה-handler.
- README + מסמך התכנון עודכנו: /connect_claude זמין, + ENV MCP_SERVER_URL.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WNFuSyshwpRcxozVZEui5K
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants