Skip to main content
Glama
RFH-PDTest

Testing Bank MCP

by RFH-PDTest
README.md
# Testing Bank MCP

A Model Context Protocol (MCP) router that connects to multiple PagerDuty sandbox environments for testing integrations.

## Architecture

```
┌─────────────────────────────────┐
│     Testing Bank Router MCP     │
│   (Orchestrator/Gateway)        │
└───────────────┬─────────────────┘
                │
    ┌───────────┼───────────┐
    │           │           │
    ▼           ▼           ▼
┌────────┐ ┌────────┐ ┌────────┐
│PD+Teams│ │PD+Jira │ │PD+Slack│  ... more environments
└────────┘ └────────┘ └────────┘
```

## Available Environments

| Environment | Description |
|-------------|-------------|
| `pd-teams` | PagerDuty + Microsoft Teams |
| `pd-jira` | PagerDuty + Jira Cloud |
| `pd-salesforce` | PagerDuty + Salesforce |
| `pd-slack` | PagerDuty + Slack |
| `pd-aws` | PagerDuty + AWS CloudWatch/EventBridge |

## Installation

```bash
cd testing-bank-mcp
npm install
```

## Configuration

### 1. Set up environment files

Copy the example files and fill in your sandbox credentials:

```bash
# For PD + Teams
cp environments/pd-teams/.env.example environments/pd-teams/.env

# For PD + Jira
cp environments/pd-jira/.env.example environments/pd-jira/.env
```

### 2. Configure your MCP client

Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "testing-bank": {
      "command": "node",
      "args": ["router/index.js"],
      "cwd": "/full/path/to/testing-bank-mcp"
    }
  }
}
```

## Usage

### Smart Routing (Recommended)

Just describe the customer issue and the router will detect the right environment:

```
"Customer reports PagerDuty incidents are not posting to their Teams channel"
```

The router will:
1. Detect this is a PD + Teams issue
2. Connect to the `pd-teams` environment
3. Give you access to all PD and Teams testing tools

### Manual Environment Selection

```
1. List available environments: list_environments
2. Connect to specific environment: connect_environment("pd-jira")
3. Use environment tools: route_to_environment("pd-jira", "diagnose_integration")
```

## Router Tools

| Tool | Description |
|------|-------------|
| `list_environments` | List all available testing environments |
| `detect_environment` | Auto-detect environment from issue description |
| `connect_environment` | Connect to a specific environment |
| `disconnect_environment` | Disconnect from an environment |
| `get_active_environments` | List currently connected environments |
| `route_to_environment` | Send commands to a connected environment |
| `smart_route` | Auto-detect and connect in one step |

## Environment Tools (PD + Teams Example)

| Tool | Description |
|------|-------------|
| `pd_list_services` | List PagerDuty services |
| `pd_create_test_incident` | Create test incident |
| `pd_list_extensions` | List webhooks/integrations |
| `teams_send_test_message` | Send test message to Teams |
| `teams_verify_webhook` | Verify webhook configuration |
| `test_full_integration` | Run full end-to-end test |
| `diagnose_integration` | Diagnose common issues |

## Example Workflow

```
User: "Customer says PD incidents aren't creating Jira tickets"

AI uses: smart_route("PD incidents aren't creating Jira tickets")
  → Detects: pd-jira environment
  → Connects to PD + Jira sandbox

AI uses: diagnose_integration()
  → Checks PD API connection
  → Checks Jira API connection  
  → Lists Jira extensions in PD
  → Returns recommendations

AI uses: test_full_integration(service_id="PXXXXXX")
  → Creates test incident in PD
  → Waits for Jira sync
  → Searches for created ticket
  → Reports results
```

## Adding New Environments

1. Create directory: `environments/pd-newservice/`
2. Copy template from existing environment
3. Modify API calls for the new service
4. Add environment to `ENVIRONMENTS` in `router/index.js`
5. Create `.env.example` with required credentials

## Security Notes

- Never commit `.env` files
- Use sandbox/test environments only
- Rotate API keys regularly
- Document which sandboxes are connected to production data (if any)

TDQS

A3.5/5.0

Scored across 7 tools

Disambiguation4/5

Tools are mostly distinct, but detect_environment and smart_route have overlapping purposes (detecting vs detecting+connecting), which could cause some confusion. Other tools clearly cover different actions.

Naming Consistency4/5

Six tools follow verb_noun snake_case pattern (e.g., connect_environment, list_environments). smart_route deviates by starting with an adjective instead of a verb, breaking the pattern slightly.

Tool Count5/5

With 7 tools, the set is well-scoped for managing testing environments: connect, detect, disconnect, list, route, and smart route cover essential operations without bloat.

Completeness4/5

The tool surface covers core lifecycle (connect, disconnect, list, interact) and adds detection features. Missing environment creation or modification, but those may be out of scope for a testing bank server.

Maintenance

ActivityInactive
ResponsivenessNo issues