usepaso 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +128 -0
- package/package.json +11 -1
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# UsePaso
|
|
2
|
+
|
|
3
|
+
[](https://github.com/5h1vmani/usepaso/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/usepaso)
|
|
5
|
+
[](https://github.com/5h1vmani/usepaso/blob/main/LICENSE)
|
|
6
|
+
|
|
7
|
+
**Make your API agent-ready in minutes.** One YAML declaration, every agent protocol.
|
|
8
|
+
|
|
9
|
+
UsePaso lets any service declare what AI agents can do with their API. Write a `usepaso.yaml`, and UsePaso generates a working MCP server. No protocol expertise required.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install usepaso
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Scaffold a declaration
|
|
21
|
+
npx usepaso init --name "MyService"
|
|
22
|
+
|
|
23
|
+
# Or generate from an existing OpenAPI spec
|
|
24
|
+
npx usepaso init --from-openapi ./openapi.json
|
|
25
|
+
|
|
26
|
+
# Validate
|
|
27
|
+
npx usepaso validate
|
|
28
|
+
|
|
29
|
+
# Preview what MCP tools will be generated
|
|
30
|
+
npx usepaso inspect
|
|
31
|
+
|
|
32
|
+
# Test a capability
|
|
33
|
+
npx usepaso test list_issues -p org=acme -p project=web --dry-run
|
|
34
|
+
|
|
35
|
+
# Start the MCP server
|
|
36
|
+
npx usepaso serve
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## What You Write
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
# usepaso.yaml
|
|
43
|
+
version: "1.0"
|
|
44
|
+
|
|
45
|
+
service:
|
|
46
|
+
name: MyService
|
|
47
|
+
description: My API service
|
|
48
|
+
base_url: https://api.example.com
|
|
49
|
+
auth:
|
|
50
|
+
type: bearer
|
|
51
|
+
|
|
52
|
+
capabilities:
|
|
53
|
+
- name: list_items
|
|
54
|
+
description: List all items
|
|
55
|
+
method: GET
|
|
56
|
+
path: /items
|
|
57
|
+
permission: read
|
|
58
|
+
|
|
59
|
+
- name: create_item
|
|
60
|
+
description: Create a new item
|
|
61
|
+
method: POST
|
|
62
|
+
path: /items
|
|
63
|
+
permission: write
|
|
64
|
+
consent_required: true
|
|
65
|
+
inputs:
|
|
66
|
+
name:
|
|
67
|
+
type: string
|
|
68
|
+
required: true
|
|
69
|
+
description: Item name
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## What UsePaso Does With It
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
usepaso.yaml → MCP server (Claude, Cursor, any MCP client)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Each capability becomes an MCP tool. When an agent calls a tool, UsePaso makes the real HTTP request to your API with proper auth, parameters, and error handling.
|
|
79
|
+
|
|
80
|
+
## CLI Commands
|
|
81
|
+
|
|
82
|
+
| Command | What it does |
|
|
83
|
+
|---------|-------------|
|
|
84
|
+
| `usepaso init` | Scaffold a `usepaso.yaml` template |
|
|
85
|
+
| `usepaso init --from-openapi` | Generate from OpenAPI spec (file or URL) |
|
|
86
|
+
| `usepaso validate` | Check your declaration for errors |
|
|
87
|
+
| `usepaso inspect` | Preview MCP tools that will be generated |
|
|
88
|
+
| `usepaso test <capability>` | Test a capability with a real HTTP request |
|
|
89
|
+
| `usepaso test <cap> --dry-run` | Preview the HTTP request without executing |
|
|
90
|
+
| `usepaso serve` | Start an MCP server (stdio transport) |
|
|
91
|
+
| `usepaso serve --verbose` | Serve with request logging |
|
|
92
|
+
|
|
93
|
+
## Programmatic Usage
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
import { parseFile, validate, generateMcpServer } from 'usepaso';
|
|
97
|
+
|
|
98
|
+
const decl = parseFile('usepaso.yaml');
|
|
99
|
+
const errors = validate(decl);
|
|
100
|
+
const server = generateMcpServer(decl);
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Connect to MCP Clients
|
|
104
|
+
|
|
105
|
+
### Claude Desktop
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"mcpServers": {
|
|
110
|
+
"my-service": {
|
|
111
|
+
"command": "npx",
|
|
112
|
+
"args": ["usepaso", "serve", "-f", "/path/to/usepaso.yaml"],
|
|
113
|
+
"env": { "USEPASO_AUTH_TOKEN": "your-token" }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Links
|
|
120
|
+
|
|
121
|
+
- [Full documentation](https://github.com/5h1vmani/usepaso)
|
|
122
|
+
- [Spec reference](https://github.com/5h1vmani/usepaso/blob/main/spec/usepaso-spec.md)
|
|
123
|
+
- [Examples](https://github.com/5h1vmani/usepaso/tree/main/examples)
|
|
124
|
+
- [Python SDK](https://pypi.org/project/usepaso/)
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
Apache 2.0
|
package/package.json
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "usepaso",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Make your API agent-ready in minutes. One declaration, every protocol.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
7
17
|
"bin": {
|
|
8
18
|
"usepaso": "dist/cli.js"
|
|
9
19
|
},
|