Metadata-Version: 2.4
Name: jmeter-mcp-server
Version: 2.0.0
Summary: Advanced MCP server for JMeter performance test analysis with 14 comprehensive tools
Project-URL: Homepage, https://github.com/jeswanth/jmeter-mcp-server
Project-URL: Documentation, https://github.com/jeswanth/jmeter-mcp-server#readme
Project-URL: Repository, https://github.com/jeswanth/jmeter-mcp-server.git
Project-URL: Issues, https://github.com/jeswanth/jmeter-mcp-server/issues
Author-email: Jeswanth <jeswanth.jeswanth@capgemini.com>
License: MIT
License-File: LICENSE
Keywords: analysis,correlation,jmeter,mcp,model-context-protocol,performance-testing,test-automation
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Benchmark
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Requires-Dist: fastmcp>=0.1.0
Requires-Dist: lxml>=4.9.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: pandas>=2.0.0
Provides-Extra: analysis
Requires-Dist: matplotlib>=3.7.0; extra == 'analysis'
Requires-Dist: scikit-learn>=1.2.0; extra == 'analysis'
Requires-Dist: scipy>=1.9.0; extra == 'analysis'
Requires-Dist: seaborn>=0.12.0; extra == 'analysis'
Provides-Extra: autogen
Requires-Dist: autogen-agentchat>=0.2.0; extra == 'autogen'
Requires-Dist: autogen-ext>=0.2.0; extra == 'autogen'
Requires-Dist: openai>=1.0.0; extra == 'autogen'
Requires-Dist: pyautogen>=0.2.0; extra == 'autogen'
Requires-Dist: tiktoken>=0.5.0; extra == 'autogen'
Provides-Extra: dev
Requires-Dist: black>=23.0; extra == 'dev'
Requires-Dist: isort>=5.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# JMeter MCP - Complete Guide

**Package:** jmeter-mcp v1.0.0 | **Status:** ✅ Ready for Publication | **Date:** January 27, 2026

---

## 🚀 Quick Start

### What is This?
A stdio-based MCP server for analyzing JMeter performance test logs. Works with Autogen and any LLM via MCP protocol.

### Installation & Usage

```bash
# No installation needed - run directly
pipx run jmeter-mcp

# Or install once
pip install jmeter-mcp
jmeter-mcp

# Use with Autogen (zero-install)
from autogen.agentchat.contrib.mcp.agent import MCPAgent
agent = MCPAgent(
    name="analyst",
    mcp_server_config={
        "type": "stdio",
        "command": "pipx",
        "args": ["run", "jmeter-mcp"],
    },
)
```

---

## 📦 Package Contents

### Source Code
```
jmeter_mcp/
├── __init__.py           Package metadata
└── cli.py               MCP server (231 lines, 3 tools)
```

### Build Artifacts
```
dist/
├── jmeter_mcp-1.0.0-py3-none-any.whl    Ready to install
└── jmeter_mcp-1.0.0.tar.gz              Ready to upload
```

### Configuration
```
pyproject.toml           Package config (modern PEP 517/518)
LICENSE                  MIT License
verify.py                Verification script (8/8 checks)
```

---

## 🔧 Available Tools

### 1. analyze_jmeter_logs
Analyzes JMeter performance test logs and returns key metrics.

**Input:** `log_data` (CSV format)  
**Output:** Metrics (total requests, failures, error rate, response times)

### 2. detect_log_format
Auto-detects log format with confidence score.

**Input:** `log_data` (first few lines)  
**Output:** Format type and confidence (jmeter_jtl, performance_csv, etc.)

### 3. get_supported_formats
Lists all supported format types.

**Input:** None  
**Output:** Array of supported formats with descriptions

---

## 📝 Publishing to PyPI (4 Steps)

### Step 1: Update Metadata (2 min)
Edit `pyproject.toml` and replace:
```toml
authors = [
    {name = "YOUR NAME", email = "your@email.com"}
]

[project.urls]
Homepage = "https://github.com/YOUR_USERNAME/jmeter-mcp"
Repository = "https://github.com/YOUR_USERNAME/jmeter-mcp.git"
```

### Step 2: Create PyPI Account (5 min)
1. Visit: https://pypi.org/account/register/
2. Create account (free)
3. Verify email
4. Generate API token
5. Save token

### Step 3: Publish (1 min)
```bash
python -m twine upload dist/*

# When prompted:
# Username: __token__
# Password: [paste your token]
```

### Step 4: Verify (5-10 min)
```bash
# Wait for PyPI to index
pipx install jmeter-mcp
pipx run jmeter-mcp 2>&1

# Output: "Starting JMeter MCP Server (stdio transport)"
```

---

## 🤖 Autogen Integration

### Basic Setup (Zero Installation)
```python
from autogen import UserProxyAgent
from autogen.agentchat.contrib.mcp.agent import MCPAgent

mcp_config = {
    "type": "stdio",
    "command": "pipx",
    "args": ["run", "jmeter-mcp"],
}

analyst = MCPAgent(
    name="performance_analyst",
    system_message="Analyze JMeter logs using available tools",
    mcp_server_config=mcp_config,
    llm_config={"config_list": [{"model": "gpt-4"}]},
)

user = UserProxyAgent(name="user", human_input_mode="TERMINATE")
user.initiate_chat(analyst, message="Analyze this JMeter test...")
```

### Multi-Agent Collaboration
```python
# Create team of agents
analyst = MCPAgent(name="analyst", ...)
reporter = AssistantAgent(name="reporter", ...)
manager = UserProxyAgent(name="manager")

# Group chat
group_chat = GroupChat(agents=[analyst, reporter, manager])
chat_manager = GroupChatManager(group_chat=group_chat)

manager.initiate_chat(chat_manager, message="Analyze and report...")
```

---

## ✅ Verification & Testing

### Run Verification
```bash
python verify.py

# Output: 8/8 checks passed ✅
```

**Checks Include:**
- Package structure correct
- pyproject.toml valid
- Documentation complete
- CLI imports working
- MCP tools defined
- Stateless design verified
- Logging to stderr
- Build artifacts present

### Test Locally
```bash
# With pip
pip install -e .
jmeter-mcp 2>&1

# With pipx
pipx install dist/jmeter_mcp-1.0.0-py3-none-any.whl --force
pipx run jmeter-mcp 2>&1
```

---

## 🎯 Key Features

✅ **Stdio-only** - Pure JSON-RPC 2.0, no HTTP  
✅ **Stateless** - No file I/O, parameter-driven  
✅ **Zero-install** - Works via `pipx run jmeter-mcp`  
✅ **Production-grade** - Error handling, input validation  
✅ **Autogen-ready** - Direct integration support  
✅ **Well-documented** - Complete guides  
✅ **Free** - MIT license, PyPI hosting  

---

## 🔧 Commands Reference

```bash
# Verify everything is ready
python verify.py

# Test locally with pip
pip install -e .

# Test locally with pipx
pipx install dist/jmeter_mcp-1.0.0-py3-none-any.whl --force
pipx run jmeter-mcp 2>&1

# Publish to PyPI
python -m twine upload dist/*

# Install from PyPI (after publishing)
pip install jmeter-mcp
```

---

## 🆘 Troubleshooting

| Issue | Solution |
|-------|----------|
| "Module not found: twine" | `pip install twine build` |
| "401 Unauthorized" | Generate new token at https://pypi.org/account/ |
| Server doesn't start | Run `jmeter-mcp 2>&1` to see stderr errors |
| "Package already exists" | Update version to 1.0.1 in pyproject.toml |
| "No such command: jmeter-mcp" | Reinstall: `pip install --force-reinstall jmeter-mcp` |

---

## 📊 Project Stats

| Metric | Value |
|--------|-------|
| Package Size (wheel) | 7.7 KB |
| Package Size (source) | 452 KB |
| Python Support | 3.9, 3.10, 3.11, 3.12, 3.13 |
| Core Dependencies | 2 (mcp, fastmcp) |
| MCP Tools | 3 |
| Verification | 8/8 ✅ |
| Time to Publish | ~20 minutes |

---

## 🔐 Constraints & Features

| Constraint | Status | Details |
|---|---|---|
| Stdio-only MCP | ✅ | JSON-RPC 2.0 over stdin/stdout |
| No HTTP/FastAPI | ✅ | Pure stdio, no web framework |
| Stateless operation | ✅ | Parameter-driven, no session state |
| No file I/O | ✅ | All data via JSON parameters |
| Logs to stderr | ✅ | stream=sys.stderr configured |
| Works with pipx run | ✅ | Entry point registered & tested |
| Free publication | ✅ | PyPI hosts packages free |

---

## 📁 Folder Structure

```
jmeter-mcp-package/
├── jmeter_mcp/                      Python package
│   ├── __init__.py
│   └── cli.py
├── dist/                            Build artifacts
│   ├── jmeter_mcp-1.0.0-py3-none-any.whl
│   └── jmeter_mcp-1.0.0.tar.gz
├── pyproject.toml                   Modern package config
├── LICENSE                          MIT License
├── verify.py                        Verification script
└── README.md                        This complete guide
```

---

## 🎬 Publishing Workflow

```
1. Update pyproject.toml metadata (2 min)
   ↓
2. Create PyPI account (5 min)
   ↓
3. Generate & save API token (2 min)
   ↓
4. Run: python -m twine upload dist/* (1 min)
   ↓
5. Wait 5-10 minutes for PyPI indexing
   ↓
6. Test: pipx install jmeter-mcp
   ↓
✅ PUBLISHED!
```

---

## 🎁 Use Cases

### Performance Analysis
```bash
# Analyze JMeter test results
pipx run jmeter-mcp
```

### With Claude/Autogen
```python
# Analyze logs with AI assistance
agent.chat("Analyze this JMeter result and find issues")
```

### CI/CD Integration
```bash
# In GitHub Actions or Jenkins
pipx run jmeter-mcp < test_results.csv
```

---

## 📞 Quick Links

| Link | Purpose |
|------|---------|
| https://pypi.org | Python Package Index |
| https://pypi.org/account/register/ | Create PyPI account |
| https://modelcontextprotocol.io | MCP specification |
| https://microsoft.github.io/autogen/ | Autogen documentation |

---

## ✨ Next Steps

1. **Review** this guide
2. **Update** `pyproject.toml` with your name/email
3. **Verify** everything: `python verify.py`
4. **Create** free PyPI account
5. **Publish**: `python -m twine upload dist/*`
6. **Test**: `pipx install jmeter-mcp`

---

## 📜 License

MIT License - Free to use, modify, and distribute

---

**Status:** ✅ Production Ready | **Created:** January 27, 2026

**Ready to publish?** Update `pyproject.toml` and run: `python -m twine upload dist/*`
