# MobSF MCP Server

A Model Context Protocol (MCP) server for interacting with the MobSF (Mobile Security Framework) for mobile application security testing.

## Features

- Upload and analyze mobile applications (APK, IPA, APPX)
- Scan applications for security vulnerabilities
- Generate security reports
- View scan logs and recent scans
- Easy integration with Claude and other MCP-compatible AI assistants

## Installation

```bash
# Install globally
npm install -g gc-mobsf-mcp

# Or run directly without installing
npx gc-mobsf-mcp
```

## Configuration

This server requires the MobSF server URL and API key to be set via environment variables:

- `MOBSF_URL`: The base URL of your MobSF server
- `MOBSF_API_KEY`: Your MobSF API key

Example:
```bash
# Linux/macOS
export MOBSF_URL=http://localhost:8000
export MOBSF_API_KEY=your_api_key_here

# Windows
set MOBSF_URL=http://localhost:8000
set MOBSF_API_KEY=your_api_key_here
```

## Usage

### Command Line

```bash
# With environment variables set
npx gc-mobsf-mcp
```

### With Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "mobsf": {
      "command": "npx",
      "args": ["-y", "gc-mobsf-mcp"],
      "env": {
        "MOBSF_URL": "http://localhost:8000",
        "MOBSF_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

### With Other MCP Clients

For other MCP clients, you can configure them to use this server with:

```
MOBSF_URL=http://localhost:8000 MOBSF_API_KEY=your_api_key_here npx gc-mobsf-mcp
```

## API

The server provides the following tools:

- `uploadFile`: Upload a mobile application for analysis
- `scanFile`: Scan a previously uploaded application
- `getScanLogs`: Retrieve scan logs for an analyzed application
- `getJsonReport`: Generate a security analysis report
- `getRecentScans`: List recently performed scans

## License

Apache-2.0