Skip to main content
Glama
README.md
# @echosaw/mcp-server

Echosaw MCP Server — AI assistant integration for media intelligence.

The Echosaw MCP server connects AI assistants (Claude Desktop, Cursor, and other MCP-compatible clients) to Echosaw's media intelligence platform. Submit media for analysis, check status, retrieve intelligence reports, and download source files — all from within your AI-powered development environment.

## Prerequisites

- **Node.js 18+** (minimum version supported by `@modelcontextprotocol/sdk`)
- **Echosaw API key** — Your API key is e-mailed to you after subscribing to a Developer, Growth, Pro, or Agency plan.

## Installation

```bash
npm install -g @echosaw/mcp-server
```

## Environment Variables

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `ECHOSAW_API_KEY` | Yes | — | Your Echosaw API key |
| `ECHOSAW_API_URL` | No | `https://api.echosaw.com` | API base URL (override for gamma/staging) |

## Client Configuration

### Claude Desktop

Add the following to your Claude Desktop configuration file (`claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "echosaw": {
      "command": "echosaw-mcp",
      "env": {
        "ECHOSAW_API_KEY": "your-api-key"
      }
    }
  }
}
```

### Cursor

Add to your Cursor MCP settings:

```json
{
  "mcpServers": {
    "echosaw": {
      "command": "echosaw-mcp",
      "env": {
        "ECHOSAW_API_KEY": "your-api-key"
      }
    }
  }
}
```

## Available Tools

| Tool | Description |
|------|-------------|
| `echosaw_analyze_media` | Upload an audio, video, or image file to Echosaw for asynchronous media analysis. Returns a job ID used to track processing and retrieve results. |
| `echosaw_analyze_media_url` | Submit a publicly accessible or authorized media URL to Echosaw for asynchronous analysis without uploading the file directly. Returns a job ID used to track processing and retrieve results. |
| `echosaw_check_job_status` | Retrieve the current processing state of an Echosaw analysis job, including whether the job is queued, processing, completed, or failed. |
| `echosaw_get_analysis_results` | Retrieve structured analysis results generated by Echosaw for a completed job, including summaries, transcripts, detected entities, events, and other intelligence outputs. Supports an optional `section` parameter (`summary`, `transcript`, `safety`, `insights`, `metadata`, `downloads`, `all`) to reduce response size. |
| `echosaw_download_media` | Generate a presigned download URL for the source media file associated with a completed analysis job. The URL is valid for 1 hour. |

## Response Format

All tools return a standardized JSON response:

| Field | Type | Description |
|-------|------|-------------|
| success | boolean | Whether the operation succeeded |
| tool | string | The tool that produced this response |
| responseVersion | string | Response schema version (currently "1.0") |
| data | object | Tool-specific result data |
| message | string? | Human-readable summary |
| error | string? | Error description (when success is false) |
| nextAction | object? | Suggested next tool to call |

## Example Workflow

1. **Submit a file for analysis:**
   > "Analyze the video at /Users/me/Downloads/interview.mp4"

   The assistant calls `echosaw_analyze_media` with the path and `mediaType: "video"`, returning a `mediaId`.

2. **Check processing status:**
   > "What's the status of that analysis?"

   The assistant calls `echosaw_check_job_status` with the `mediaId`.

3. **Retrieve results:**
   > "Show me the results"

   Once complete, the assistant calls `echosaw_get_analysis_results` to retrieve the full intelligence report including transcript, safety analysis, content insights, and metadata.

4. **Download source media:**
   > "Get me a download link for that video"

   The assistant calls `echosaw_download_media` to get a presigned URL valid for 1 hour.

## Development

```bash
# Clone and build
cd lib/mcp-server
npm install
npm run build

# Run directly
ECHOSAW_API_KEY=your-key node dist/bin/echosaw-mcp.js
```