Metadata-Version: 2.4
Name: ona-mcp
Version: 0.2.0
Summary: MCP server for managing Ona AI pipelines from Claude Desktop and Claude Code
Project-URL: Homepage, https://ona.com
Project-URL: Repository, https://github.com/Ona-Chat/ona-agent-builder-backend
Project-URL: Issues, https://github.com/Ona-Chat/ona-agent-builder-backend/issues
Author-email: Ona <rafael@ona.chat>
License-Expression: MIT
Keywords: agents,ai,anthropic,claude,mcp,ona,pipelines
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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
Requires-Python: >=3.10
Requires-Dist: httpx>=0.24.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: respx>=0.21.0; extra == 'dev'
Description-Content-Type: text/markdown

# ona-mcp

MCP server for managing [Ona](https://ona.com) AI pipelines from Claude Desktop, Claude Code, and any MCP-compatible client.

## Quick Start

### Claude Desktop

Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):

```json
{
  "mcpServers": {
    "ona": {
      "command": "uvx",
      "args": ["ona-mcp"],
      "env": {
        "ONA_API_KEY": "your-org-api-key"
      }
    }
  }
}
```

### Claude Code

```bash
claude mcp add ona -- uvx ona-mcp
```

Then set `ONA_API_KEY` in the MCP config, or add it manually:

```json
{
  "mcpServers": {
    "ona": {
      "command": "uvx",
      "args": ["ona-mcp"],
      "env": {
        "ONA_API_KEY": "your-org-api-key"
      }
    }
  }
}
```

### Manual install

```bash
pip install ona-mcp
```

## Configuration

| Environment Variable | Required | Description |
|---|---|---|
| `ONA_API_KEY` | Yes | Org-level API key from the Ona dashboard |
| `ONA_BASE_URL` | No | Backend URL (defaults to Ona production). Override for local development. |

## Available Tools

### Pipeline Management
- **list_pipelines** - List all pipelines with deployment status
- **get_pipeline** - Get pipeline details and modules
- **create_pipeline** - Create a new pipeline from a template
- **update_pipeline** - Update pipeline name or description
- **delete_pipeline** - Delete a pipeline

### Code / Modules
- **get_package_structure** - View the file tree
- **list_modules** - List all modules in a package
- **read_module** - Read module source code
- **write_module** - Create or update a module (upsert)
- **delete_module** - Delete a module

### Versioning
- **deploy_pipeline** - Deploy draft to production
- **rollback_pipeline** - Rollback to a previous version
- **list_versions** - View version history

### Testing & Quality
- **test_pipeline** - Test a pipeline with a message
- **run_evaluations** - Run evaluation suites
- **get_quality_history** - View evaluation score history

### Triggers
- **list_triggers** - List all triggers (schedules, events, channels)
- **create_schedule** - Create a cron schedule trigger
- **delete_schedule** - Delete a schedule trigger
- **run_trigger_now** - Manually fire a trigger

### Executions
- **list_executions** - View execution history
- **get_execution** - Get execution details and logs
- **cancel_execution** - Cancel a running execution

## Security

- API key is read from environment variables only (never passed as CLI arguments)
- All requests are authenticated via the Ona backend's auth middleware
- Data is scoped to your organization by the API key
- No database credentials or internal state are exposed
- A warning is shown if `ONA_BASE_URL` uses HTTP for non-localhost targets

## Development

```bash
cd ona-mcp
pip install -e ".[dev]"
pytest tests/ -v
```
