Files
mcphub/tests
airano-ir 788439e377
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
feat(F.7+F.17): v3.11.0 — Coolify plugin (67 tools) + tool access overhaul
Catch-up sync spanning v3.7.0 → v3.11.0 of the internal repo.

Platform
- Total tools: 565 → 633 (+68) across 10 plugins (Coolify added)
- Tests: 481 → 828 passing

New plugin: Coolify (67 tools, Track F.17)
- Applications (17): CRUD, lifecycle, logs, env vars
- Deployments (5): list/get/cancel/deploy, app history
- Servers (8): CRUD, resources, domains, validation
- Projects (8), Databases (16, 6 DB types + backups), Services (13)

Tool access system (Track F.7 → F.7d)
- Scope → category mapping with per-tool `category` + `sensitivity`
- Schema v7: `site_tool_toggles(site_id)` + `sites.tool_scope` column
- Schema v8: per-site API keys (`api_keys.site_id`)
- Plugin-specific access-level presets (WP / WC / Gitea / OpenPanel /
  Coolify 5-tier)
- Credential-requirement notice tailored per plugin and tier
- Admin Tools count card on service page
- Dropped redundant `write` tier on WP / WP Advanced / WooCommerce
  (admin-scope tool count = 0 → identical to admin tier)

Dashboard
- Unified site manage page (Connection / Tool Access / Connect)
- /dashboard/keys unified (was /api-keys and /connect)
- CSRF interceptor via meta-tag; removed conflicting cookie reader
- Tailwind: pre-built CSS (scripts/build-css.sh) replaces CDN

Docs
- README / DOCKER_README / CLAUDE updated to 633 tools / 10 plugins
- CHANGELOG entries for v3.7.0 → v3.11.0
- FastMCP compatibility note updated to 3.x (post-v3.5 upgrade)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 21:05:07 +02:00
..

Testing Guide

Integration Tests

Quick Start

# In Docker container:
docker exec -it mcphub python tests/run_integration_tests.py

# Or local:
python tests/run_integration_tests.py

What Gets Tested

  1. Module Imports - All modules load correctly
  2. BasePlugin Architecture - Plugin system compatibility
  3. WordPress Plugin - Initialization and handlers
  4. Tool Specifications - Format and completeness
  5. Handlers Structure - All 14 handlers present
  6. Pydantic Schemas - Validation working
  7. ToolGenerator Integration - Dynamic tool generation ready

Expected Output

Running Integration Tests for WordPress MCP Server
============================================================

Running: Imports... PASSED
Running: Base Plugin... PASSED
Running: WordPress Plugin Init... PASSED
Running: Tool Specifications... PASSED
Running: Handlers Structure... PASSED
Running: Pydantic Schemas... PASSED
Running: ToolGenerator Integration... PASSED

============================================================
Test Summary:
   Total: 7
   Passed: 7
   Failed: 0
   Skipped: 0

Exit Codes

  • 0 - All tests passed
  • 1 - Some tests failed

JSON Output

The script also outputs results as JSON for programmatic parsing:

{
  "timestamp": "2025-11-16T10:30:00",
  "tests": [
    {
      "name": "imports",
      "status": "passed",
      "message": "All modules imported successfully",
      "details": {}
    }
  ],
  "summary": {
    "total": 7,
    "passed": 7,
    "failed": 0,
    "skipped": 0
  }
}

Manual Testing with Real Sites

To test with real sites, use MCP Inspector or Claude Desktop:

# Test health
wordpress_get_site_health(site="mysite")

# Test posts
wordpress_list_posts(site="mysite", per_page=5)

# Test products
wordpress_list_products(site="mysite", per_page=5)

# Test WP-CLI (requires container access)
wordpress_wp_cache_type(site="mysite")

Troubleshooting

Import Errors

Error: ModuleNotFoundError: No module named 'plugins'

Fix: Run from project root:

cd /app  # In Docker
python tests/run_integration_tests.py

Handler Errors

Error: Can't instantiate abstract class WordPressPlugin

Fix: This means BasePlugin still has abstract get_tools(). This should be fixed in the latest version.