Metadata-Version: 2.4
Name: usepaso
Version: 0.4.1
Summary: Make your API agent-ready in minutes. One declaration, every protocol.
License: Apache-2.0
Project-URL: Homepage, https://usepaso.dev
Project-URL: Documentation, https://github.com/5h1vmani/usepaso
Project-URL: Repository, https://github.com/5h1vmani/usepaso
Project-URL: Issues, https://github.com/5h1vmani/usepaso/issues
Project-URL: Changelog, https://github.com/5h1vmani/usepaso/releases
Keywords: ai,agents,mcp,a2a,api,sdk,agent-readiness,openapi
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pyyaml>=6.0
Requires-Dist: httpx>=0.27
Requires-Dist: click>=8.0
Requires-Dist: mcp>=1.9.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: mypy>=1.10; extra == "dev"
Requires-Dist: types-PyYAML>=6.0; extra == "dev"

# paso

The agent-readiness toolkit for APIs.

Declare your API's capabilities once. paso generates the MCP server. No protocol code required.

Self-hosted. Open source. Apache 2.0.

[![CI](https://github.com/5h1vmani/usepaso/actions/workflows/ci.yml/badge.svg)](https://github.com/5h1vmani/usepaso/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/usepaso)](https://pypi.org/project/usepaso/)

## Install

```bash
pip install usepaso
```

## Quick Start

```bash
# Scaffold a declaration
usepaso init --name "MyService"

# Or generate from an existing OpenAPI spec
usepaso init --from-openapi ./openapi.json

# Check it
usepaso validate

# Preview what MCP tools will be generated
usepaso inspect

# Test a capability (without the consequences)
usepaso test list_issues -p org=acme -p project=web --dry-run

# Start the MCP server
usepaso serve
```

That's it. Your API is agent-ready.

## What You Write

```yaml
# usepaso.yaml
version: "1.0"

service:
  name: MyService
  description: My API service
  base_url: https://api.example.com
  auth:
    type: bearer

capabilities:
  - name: list_items
    description: List all items
    method: GET
    path: /items
    permission: read

  - name: create_item
    description: Create a new item
    method: POST
    path: /items
    permission: write
    consent_required: true
    inputs:
      name:
        type: string
        required: true
        description: Item name
```

## What paso Does With It

Each capability becomes an MCP tool. When an agent calls it, paso makes the HTTP request to your API with proper auth, parameters, and error handling.

## CLI

| Command | What it does |
|---------|-------------|
| `usepaso init` | Scaffold a `usepaso.yaml` template (JSONPlaceholder example) |
| `usepaso init --blank` | Scaffold a blank template |
| `usepaso init --from-openapi` | Generate from an OpenAPI spec |
| `usepaso validate` | Check your declaration for errors |
| `usepaso validate --strict` | Check for best practices (missing constraints, consent) |
| `usepaso inspect` | Preview MCP tools that will be generated |
| `usepaso test <capability>` | Test a capability against the live API |
| `usepaso test --dry-run` | Same thing, minus the consequences |
| `usepaso test --all --dry-run` | Verify all capabilities resolve correctly |
| `usepaso serve` | Start an MCP server (stdio) |
| `usepaso serve --strict` | Serve with consent gates enforced (two-phase confirmation) |
| `usepaso serve --verbose` | Serve with request logging |
| `usepaso connect <client>` | Wire this server into an MCP client config (claude-desktop, cursor, vscode, windsurf) |
| `usepaso disconnect <client>` | Remove from an MCP client config |
| `usepaso doctor` | Check your setup end-to-end |
| `usepaso completion` | Output shell completion script (bash, zsh, fish) |
| `usepaso version` | Print the version |

## Programmatic Usage

```python
from usepaso import parse_file, validate

decl = parse_file('usepaso.yaml')
errors = validate(decl)
```

## Connect to MCP Clients

```bash
usepaso connect claude-desktop
usepaso connect cursor
usepaso connect vscode
usepaso connect windsurf
```

Or add manually to your client config:

```json
{
  "mcpServers": {
    "my-service": {
      "command": "usepaso",
      "args": ["serve", "-f", "/path/to/usepaso.yaml"],
      "env": { "USEPASO_AUTH_TOKEN": "your-token" }
    }
  }
}
```

## Links

- [Documentation](https://usepaso.dev/docs/getting-started/)
- [Blog](https://usepaso.dev/blog/)
- [Changelog](https://usepaso.dev/changelog/)
- [Spec reference](https://github.com/5h1vmani/usepaso/blob/main/spec/usepaso-spec.md)
- [Examples](https://github.com/5h1vmani/usepaso/tree/main/examples)
- [Node.js SDK](https://www.npmjs.com/package/usepaso)

## License

Apache 2.0
