Commit Graph

19 Commits

Author SHA1 Message Date
airano
80377a1a22 fix: 15 bug fixes for v3.1.0 dashboard and Track E features
Bug fixes (ordered by priority):
- BUG-14 (P1): Fix ImportError in per-user MCP endpoint
- BUG-8 (P2): Raise clear error when PUBLIC_URL missing for OAuth
- BUG-12 (P3): Validate ENCRYPTION_KEY at startup
- BUG-13 (P4): Handle stale JWT gracefully on site creation
- BUG-11 (P5): Add auth validation to WordPress health checks
- BUG-15 (P6): Fix copy button showing Python repr (dict method shadow)
- BUG-1 (P7): Dynamic version from pyproject.toml instead of hardcoded
- BUG-5 (P8): Fix server mode default (sse → streamable-http)
- BUG-9 (P9): Plugin-specific example tools in endpoint instructions
- BUG-4 (P10): Fix settings page sidebar RBAC (session type mismatch)
- BUG-6 (P11): Show real plugin descriptions instead of 'No description'
- BUG-2 (P12): Remove stale 'phase: X.3' from system info
- BUG-10 (P13): Guard timestamps against None in Recent Activity
- BUG-3 (P14): Guard timestamps against None in audit logs
- BUG-7 (P15): Styled 404 page instead of plain text

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 03:30:16 +03:30
airano
55d30ba876 style: fix ruff lint errors (unused imports, import sorting, SIM103)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 23:27:27 +03:30
airano
1fcc539093 style: format 9 files with Black
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 23:22:52 +03:30
airano
9e6f06d933 feat: v3.1.0 — Live Platform Foundation (Track E.1-E.3)
Major release introducing the Live Platform architecture:

- SQLite database backend with async operations and migrations (E.1)
- AES-256-GCM credential encryption with HKDF key derivation (E.1)
- OAuth Social Login with GitHub and Google (E.2)
- Site management API with encrypted credential storage (E.3)
- Per-user MCP endpoints at /u/{user_id}/{alias}/mcp (E.3)
- User API keys with bcrypt hashing (E.3)
- Auto-generated config snippets for 5 MCP clients (E.3)
- Dashboard: dark/light mode, RBAC, My Sites, Connect page
- Active background health checks
- 452 tests (up from 303), all passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 23:20:03 +03:30
airano
7a16a260f1 fix: use find_dotenv(usecwd=True) for PyPI .env loading
Some checks failed
Release / Test before release (push) Has been cancelled
Release / Publish to PyPI (push) Has been cancelled
Release / Publish to Docker Hub (push) Has been cancelled
Release / Create GitHub Release (push) Has been cancelled
load_dotenv() without usecwd=True fails for mcphub.exe because
find_dotenv() walks the call stack and searches from site-packages/
instead of the user's working directory. Bump to v3.0.4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:45:53 +03:30
airano
5d97b31c12 fix: auto-load .env file for PyPI installations
Some checks failed
Release / Test before release (push) Has been cancelled
Release / Publish to PyPI (push) Has been cancelled
Release / Publish to Docker Hub (push) Has been cancelled
Release / Create GitHub Release (push) Has been cancelled
PyPI users running `mcphub` had to manually export env vars because
server.py didn't call load_dotenv(). Docker users were unaffected
since docker-compose loads .env automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 03:59:26 +03:30
airano
bb851e4be2 fix(qa): health monitor SiteManager, WP plugins, favicon, download ZIPs
- Health monitor now uses SiteManager for complete site discovery
- SEO Bridge: GPLv2+ license, Tested up to 6.9, fix escaping
- OpenPanel: fix wp_unslash, reduce tags, update branding
- Add logo.svg favicon, static file serving, plugin ZIPs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:11:49 +03:30
airano
91979ee18d fix(qa): SEO API Bridge fixes, transport type corrections, README improvements
- Fix SEO API Bridge branding, meta keys, route namespaces, GET auth
- Create WordPress.org-compatible readme.txt
- Fix transport types across all docs (streamableHttp/http, not sse)
- Add WordPress Plugin Requirements section to README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 19:42:32 +03:30
airano
809dc264af fix(qa): resolve remaining v3.0.1 issues — CI, code bugs, docs
CI: Fix black formatting in core/site_registry.py
Code: list_projects uses SiteManager, WP Advanced health uses REST API
Docs: Fix transport types, endpoint guide, env var reference for all plugins

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 18:55:12 +03:30
airano
cb6bcd8136 fix(qa): resolve A.1-A.7 code bugs and B.1-B.8 documentation issues
Code fixes:
- Rename "Coolify Admin" to "MCP Hub Admin" in endpoints
- Enrich list_projects with alias and endpoint URL
- Downgrade OAuth InvalidTokenError log from WARNING to DEBUG
- Add 7 missing health tools to /system/mcp endpoint (now 24 tools)
- Remove "Phase 7.2" from health monitor log
- Fix WP Advanced health check to pass with REST API only
- Downgrade duplicate alias warnings to INFO

Documentation fixes:
- Document SSE transport and Bearer auth requirement
- Recommend plugin-specific endpoints to save tokens
- Document plugin vs project endpoint differences
- WordPress plugin requirements for SEO/WP-CLI tools
- Docker socket mounting guide for WP-CLI
- Mark MASTER_API_KEY as recommended (auto-generates temp key)
- Env var naming convention with prefix table

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 18:29:15 +03:30
airano
85379ec36c fix(security): validate Bearer token value in MCP endpoints, not just presence
Previously any Bearer token (even invalid) passed the HTTP middleware and
got a session with access to tools/list and resources/list. Now the
OAuthRequiredMiddleware validates tokens against master key, API keys,
and OAuth JWT before allowing initialize.

Also fixes:
- WordPress Advanced env prefix: WORDPRESS_ → WORDPRESS_ADVANCED_ in docs
- Bump version to 3.0.1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 16:24:04 +03:30
airano
bb74703311 fix(ux): improve new user onboarding experience
- Show full temporary API key in logs (not masked) so users can log in
- Redirect root URL / to /dashboard (was 404)
- Add setup guidance and docs link to login page
- Make footer version dynamic (read from pyproject.toml)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 03:41:04 +03:30
airano
aa8afce707 fix: correct tool count (596), default English dashboard, clean up stale references
- Tool count corrected: 589→596 (was missing 4 OAuth + 4 system config tools)
- System tools: 17→24 (accurate count of @mcp.tool() functions)
- Dashboard defaults to English; Farsi only via ?lang=fa query param
- Updated across all files: README, CLAUDE.md, CONTRIBUTING, DOCKER_README,
  getting-started, CHANGELOG, endpoints config
- Removed remaining Phase references from server.py startup log
- Tests: 289 passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 03:14:28 +03:30
airano
076a0b940e fix(server): resolve lint error and clean up production logs
- Fix F821 undefined name `core` by using local import in fallback path
- Remove all internal terminology from logs (Phase X, Option B)
- Clean Phase/Option B references from tool docstrings (visible to MCP clients)
- Suppress websockets DeprecationWarning (noisy, harmless)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 02:59:48 +03:30
airano
7daf604a32 fix(packaging): move templates into core/ for PyPI distribution
Templates were at project root (templates/) which is outside the Python
package, so `pip install mcphub-server` would not include them. Moved to
core/templates/ and updated path references in server.py and
core/dashboard/routes.py. Also added py-modules for server.py and
server_multi.py to pyproject.toml.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 02:41:28 +03:30
airano
3a3f04aca8 docs(onboarding): improve new user experience + fix OpenPanel tools
- Add DOCKER_README.md for Docker Hub overview page
- Fix docker-compose.yaml port mapping for local users ("8000:8000")
- Add "Verify It Works" section with dashboard URL to README
- Restructure env.example with clear REQUIRED section
- Add post-Docker verification checklist to getting-started.md
- Fix 4 OpenPanel tools: parameter ordering (non-default before default)
- Rebrand all "Coolify Projects" to "MCP Hub" in server and Dockerfile
- Make MCP namespace prefix stripping generic

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 02:22:48 +03:30
airano
c73e39f6e4 fix(ci): fix black/ruff failures, add CoC and PR template
- Fix Python formatting (sync no longer strips blank lines from .py files)
- Remove test_community_build.py (tests private sync module)
- Fix ruff warnings in test files
- Add CODE_OF_CONDUCT.md
- Add .github/PULL_REQUEST_TEMPLATE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 18:19:39 +03:30
airano
3707fef56c chore(release): publish preparation — fix docs, update badges, clean configs
- Rewrite docs/getting-started.md (correct URLs, entry points, tool counts)
- Update README: badges (289 tests, 589 tools, CI), FastMCP note, fix links
- Add PyPI classifiers: License, OS Independent, Console
- Fix community sync false positives in test allowlist
- Clean docker-compose.yaml (remove internal phase references)
- Update tool counts: WordPress 65→67, total 587→589
- Update GitHub URLs to airano-ir/mcphub

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:52:16 +03:30
airano
cf62e65c55 Initial commit: MCP Hub Community Edition v3.0.0
Community edition generated from private repo via sync pipeline.
Includes 9 plugins (WordPress, WooCommerce, WP Advanced, Gitea, n8n,
Supabase, OpenPanel, Appwrite, Directus) with ~587 tools.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 08:34:44 +03:30