# LockNKey Analyst Plugin

## Purpose

This plugin is an **experimental test** to determine whether MCP servers bundled within a Claude Code plugin are scoped to that plugin's agents only, or if they become globally available.

## Research Question

**Are plugin-bundled MCP servers scoped to plugin agents?**

### Hypothesis A: Plugin-Scoped MCP Servers
If MCP servers defined in `plugin.json` are scoped to the plugin:
- ✅ The `market-researcher` agent can access Perplexity AI tools
- ❌ Other agents (outside this plugin) cannot access Perplexity AI tools
- ❌ The main conversation thread cannot access Perplexity AI tools

### Hypothesis B: Global MCP Server Pool
If MCP servers are added to the global pool:
- ✅ The `market-researcher` agent can access Perplexity AI tools
- ✅ Other agents can also access Perplexity AI tools
- ✅ The main conversation thread can also access Perplexity AI tools

## Plugin Structure

```
.claude-plugin/
├── plugin.json                    # Metadata + bundled MCP servers
├── agents/
│   └── market-researcher.md      # Market research specialist agent
└── README.md                      # This file
```

## MCP Servers Bundled

1. **Perplexity AI** - Real-time web search and research
2. **Context7** - Library documentation and API references
3. **Pieces** - Knowledge graph and memory management

## Testing Strategy

### Step 1: Install the Plugin
```bash
# From the main Claude Code conversation
/plugin marketplace add <path-to-this-repo>
/plugin install lockkey-analyst
```

### Step 2: Test Plugin Agent Access
```bash
# Invoke the market-researcher agent
/market-researcher

# Within the agent, try to use Perplexity
# Ask: "What are the top password managers in 2025?"
```

Expected: Agent should successfully use Perplexity AI tools

### Step 3: Test Main Conversation Access
```bash
# Exit the agent, return to main conversation
# Try to access Perplexity directly
```

If plugin-scoped:
- ❌ Perplexity tools not available in main conversation
- ⚠️ Error message about tool not found

If globally available:
- ✅ Perplexity tools work in main conversation

### Step 4: Test Other Agent Access
```bash
# Create or use another agent (not from this plugin)
# Try to use Perplexity from that agent
```

If plugin-scoped:
- ❌ Perplexity tools not available

If globally available:
- ✅ Perplexity tools work

## Agent: market-researcher

**Specialty**: Market and business research using Perplexity AI

**Use Cases**:
- Competitive landscape analysis
- Market size estimation
- User research and persona development
- Technology trend analysis
- Pricing strategy research

**MCP Tools**:
- `mcp__perplexity__perplexity_ask` - Web search and research
- `mcp__context7__resolve-library-id` - Library documentation
- `mcp__context7__get-library-docs` - API references
- `mcp__Pieces__ask_pieces_ltm` - Project knowledge retrieval

## Results

**Test Date**: _To be filled after testing_

**Outcome**: _Which hypothesis was confirmed?_

**Observations**: _Any unexpected behavior?_

**Implications**:
- If scoped: Plugins can provide isolated tooling for specialized agents
- If global: Plugin MCP servers enhance the entire Claude Code environment

---

## For LockNKey Development

Once scoping behavior is confirmed, this plugin can be used for:
- Market validation research
- Competitive analysis updates
- User need discovery
- Technology landscape monitoring
- Compliance requirement tracking
