Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -13,6 +13,9 @@ tags:
|
|
| 13 |
- mcp-in-action-track-enterprise
|
| 14 |
- mcp-in-action-track-consumer
|
| 15 |
- mcp-in-action-track-creative
|
|
|
|
|
|
|
|
|
|
| 16 |
thumbnail: >-
|
| 17 |
https://cdn-uploads.huggingface.co/production/uploads/66d9b98cec009ab887601d00/2x4OCbl46kVrGOh1a2S4z.png
|
| 18 |
---
|
|
@@ -414,4 +417,106 @@ Built for **MCP's 1st Birthday Hackathon** hosted by **Anthropic** and **Gradio*
|
|
| 414 |
- [Chroma](https://www.trychroma.com/)
|
| 415 |
- [Nebius Token Factory](https://nebius.com/)
|
| 416 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 417 |
---
|
|
|
|
| 13 |
- mcp-in-action-track-enterprise
|
| 14 |
- mcp-in-action-track-consumer
|
| 15 |
- mcp-in-action-track-creative
|
| 16 |
+
- building-mcp-track-enterprise
|
| 17 |
+
- building-mcp-track-consumer
|
| 18 |
+
- building-mcp-track-creative
|
| 19 |
thumbnail: >-
|
| 20 |
https://cdn-uploads.huggingface.co/production/uploads/66d9b98cec009ab887601d00/2x4OCbl46kVrGOh1a2S4z.png
|
| 21 |
---
|
|
|
|
| 417 |
- [Chroma](https://www.trychroma.com/)
|
| 418 |
- [Nebius Token Factory](https://nebius.com/)
|
| 419 |
|
| 420 |
+
|
| 421 |
+
# VAPT Agent MCP Server
|
| 422 |
+
|
| 423 |
+
This Gradio application has been integrated with **Model Context Protocol (MCP)** to enable AI assistants and other MCP clients to interact with the VAPT (Vulnerability Assessment and Penetration Testing) agent programmatically.
|
| 424 |
+
|
| 425 |
+
## MCP Server Overview
|
| 426 |
+
|
| 427 |
+
The MCP server exposes the VAPT agent's functionality through a standardized interface, allowing AI assistants like Claude to perform security testing and receive guidance directly.
|
| 428 |
+
|
| 429 |
+
**MCP Server URL**: `http://<ip>:<port>/gradio_api/mcp/`
|
| 430 |
+
|
| 431 |
+
### Available MCP Tools
|
| 432 |
+
|
| 433 |
+
The server provides **4 MCP tools**:
|
| 434 |
+
|
| 435 |
+
1. **`run_security_test`** - Execute a security test on an API endpoint
|
| 436 |
+
- Parameters:
|
| 437 |
+
- `api_endpoint` (string): The target API endpoint URL
|
| 438 |
+
- `http_method` (string): HTTP method (GET, POST, PUT, DELETE, etc.)
|
| 439 |
+
- `api_key` (string): API authentication key
|
| 440 |
+
- Returns: Progress updates, vulnerability report markdown, report file path, and button state
|
| 441 |
+
|
| 442 |
+
2. **`update_dashboard`** - Update the security dashboard
|
| 443 |
+
- Parameters:
|
| 444 |
+
- `report_md` (string): Report markdown content
|
| 445 |
+
|
| 446 |
+
3. **`tutor_respond`** - Get security guidance from the AI tutor
|
| 447 |
+
- Parameters:
|
| 448 |
+
- `question` (string): Security-related question
|
| 449 |
+
- `history` (array): Conversation history
|
| 450 |
+
- `report_md` (string): Current report markdown for context
|
| 451 |
+
- Note: If passing a file as input, use the `upload_file_to_gradio` tool first
|
| 452 |
+
|
| 453 |
+
## Configuration
|
| 454 |
+
|
| 455 |
+
### Streamable HTTP Transport
|
| 456 |
+
|
| 457 |
+
For MCP clients that support Streamable HTTP, add this configuration:
|
| 458 |
+
|
| 459 |
+
```json
|
| 460 |
+
{
|
| 461 |
+
"mcpServers": {
|
| 462 |
+
"gradio": {
|
| 463 |
+
"url": "http://<ip>:<port>/gradio_api/mcp/"
|
| 464 |
+
},
|
| 465 |
+
"upload_files_to_gradio": {
|
| 466 |
+
"command": "uvx",
|
| 467 |
+
"args": [
|
| 468 |
+
"--from",
|
| 469 |
+
"gradio[mcp]",
|
| 470 |
+
"gradio",
|
| 471 |
+
"upload-mcp",
|
| 472 |
+
"http://<ip>:<port>/",
|
| 473 |
+
"<UPLOAD_DIRECTORY>"
|
| 474 |
+
]
|
| 475 |
+
}
|
| 476 |
+
}
|
| 477 |
+
}
|
| 478 |
+
```
|
| 479 |
+
|
| 480 |
+
### STDIO Transport
|
| 481 |
+
|
| 482 |
+
For clients like Claude Desktop that only support STDIO, first [install Node.js](https://nodejs.org/en/download/), then use:
|
| 483 |
+
|
| 484 |
+
```json
|
| 485 |
+
{
|
| 486 |
+
"mcpServers": {
|
| 487 |
+
"gradio": {
|
| 488 |
+
"command": "npx",
|
| 489 |
+
"args": [
|
| 490 |
+
"mcp-remote",
|
| 491 |
+
"http://<ip>:<port>/gradio_api/mcp/",
|
| 492 |
+
"--transport",
|
| 493 |
+
"streamable-http"
|
| 494 |
+
]
|
| 495 |
+
},
|
| 496 |
+
"upload_files_to_gradio": {
|
| 497 |
+
"command": "uvx",
|
| 498 |
+
"args": [
|
| 499 |
+
"--from",
|
| 500 |
+
"gradio[mcp]",
|
| 501 |
+
"gradio",
|
| 502 |
+
"upload-mcp",
|
| 503 |
+
"http://<ip>:<port>/",
|
| 504 |
+
"<UPLOAD_DIRECTORY>"
|
| 505 |
+
]
|
| 506 |
+
}
|
| 507 |
+
}
|
| 508 |
+
}
|
| 509 |
+
```
|
| 510 |
+
|
| 511 |
+
### File Upload Support
|
| 512 |
+
|
| 513 |
+
The `upload_files_to_gradio` tool uploads files from your local `<UPLOAD_DIRECTORY>` (or any subdirectories) to the Gradio app. This is required because MCP servers need files as URLs. You can omit this tool if you prefer manual file uploads.
|
| 514 |
+
|
| 515 |
+
**Requirements**: [uv](https://docs.astral.sh/uv/getting-started/installation/) must be installed.
|
| 516 |
+
|
| 517 |
+
## Resources
|
| 518 |
+
|
| 519 |
+
- [Gradio MCP Documentation](https://www.gradio.app/guides/building-mcp-server-with-gradio)
|
| 520 |
+
- [Hugging Face Spaces Configuration](https://huggingface.co/docs/hub/spaces-config-reference)
|
| 521 |
+
|
| 522 |
---
|