mcpaas 1.0.0 → 1.0.2

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.
Files changed (3) hide show
  1. package/README.md +135 -54
  2. package/dist/index.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,115 +1,196 @@
1
1
  # mcpaas
2
2
 
3
- TypeScript SDK for [MCPaaS](https://mcpaas.live) — Context, on-demand.
3
+ [![npm](https://img.shields.io/npm/v/mcpaas?color=00CCFF)](https://www.npmjs.com/package/mcpaas)
4
+ [![Built with Bun](https://img.shields.io/badge/Built_with-Bun-f9f1e1?logo=bun)](https://bun.sh)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
6
 
5
- Zero dependencies. Works with Bun, Node 18+, Deno, browsers, and edge runtimes.
7
+ **AI context has an API. This is the client.**
8
+
9
+ Every soul, score, namepoint, tag, and edge location on [MCPaaS](https://mcpaas.live) — typed, zero-dep, one import.
10
+
11
+ ```typescript
12
+ import { MCPaaS } from 'mcpaas';
13
+ const mcpaas = new MCPaaS();
14
+
15
+ const soul = await mcpaas.getRawSoul('spacex');
16
+ ```
17
+
18
+ That's a live API call. Run it. You'll get SpaceX context back in ~50ms from the nearest Cloudflare edge.
19
+
20
+ ---
6
21
 
7
22
  ## Install
8
23
 
9
24
  ```bash
10
- npm install mcpaas
11
- # or
12
- bun add mcpaas
25
+ bun add mcpaas # Bun-native
26
+ npm install mcpaas # Also works with Node 18+, Deno, browsers, edge runtimes
13
27
  ```
14
28
 
29
+ ---
30
+
31
+ ## What MCPaaS Does
32
+
33
+ MCPaaS is a context delivery platform running on 300+ Cloudflare edges.
34
+
35
+ | Concept | What it is |
36
+ |---------|-----------|
37
+ | **Soul** | A block of AI context — project DNA, persona, live data |
38
+ | **Namepoint** | A claimed handle in a global directory (like DNS for context) |
39
+ | **Score** | AI-readiness rating for a repo or namepoint (0-100) |
40
+ | **Tag Intel** | Pattern detection and co-occurrence analysis across all namepoints |
41
+ | **Globe** | Real-time execution stats from every edge location |
42
+ | **Badge** | SVG score badge for any GitHub repo |
43
+
44
+ This SDK wraps the public HTTP API into typed methods with full IntelliSense.
45
+
46
+ ---
47
+
15
48
  ## Quick Start
16
49
 
17
50
  ```typescript
18
51
  import { MCPaaS } from 'mcpaas';
19
52
 
20
- const m = new MCPaaS();
53
+ const mcpaas = new MCPaaS();
21
54
 
22
- // Read a soul
23
- const soul = await m.getRawSoul('spacex');
24
- console.log(soul);
55
+ // Read live AI context
56
+ const soul = await mcpaas.getRawSoul('spacex');
25
57
 
26
- // Score a namepoint
27
- const result = await m.score('faf');
28
- console.log(result.score, result.tierReady);
58
+ // Score a GitHub repo's AI-readiness
59
+ const repo = await mcpaas.scoreRepo('anthropics/claude-code');
60
+ console.log(repo.score, repo.language);
29
61
 
30
- // Check handle availability
31
- const check = await m.check('myhandle');
62
+ // Check if a namepoint handle is available
63
+ const check = await mcpaas.check('myhandle');
32
64
  console.log(check.available);
65
+
66
+ // Tag intelligence across the entire directory
67
+ const intel = await mcpaas.tagIntel();
68
+ console.log(intel.tags.length, 'tag profiles');
33
69
  ```
34
70
 
35
- ## API
71
+ ---
72
+
73
+ ## API Reference
36
74
 
37
75
  ### Souls
38
76
 
39
- ```typescript
40
- m.getSoul('faf') // Structured soul content
41
- m.getRawSoul('spacex') // Plain text soul
42
- m.listSouls() // Stats: counts, top souls, operations
43
- ```
77
+ | Method | Returns | Description |
78
+ |--------|---------|-------------|
79
+ | `getSoul(name)` | `Promise<string>` | Structured soul content |
80
+ | `getRawSoul(name)` | `Promise<string>` | Plain text soul content |
81
+ | `listSouls()` | `Promise<SoulStats>` | Total count, top souls, daily operations |
44
82
 
45
83
  ### Scoring
46
84
 
47
- ```typescript
48
- m.score('faf') // Score a namepoint
49
- m.scoreRepo('owner/repo') // Score a GitHub repo
50
- m.leaderboard() // Top scored repos
51
- ```
85
+ | Method | Returns | Description |
86
+ |--------|---------|-------------|
87
+ | `score(handle)` | `Promise<ScoreResult>` | Score a namepoint (0-100) |
88
+ | `scoreRepo(repo)` | `Promise<RepoScore>` | Score a GitHub repo's AI-readiness |
89
+ | `leaderboard()` | `Promise<LeaderboardResult>` | Top and recent scored repos |
52
90
 
53
91
  ### Directory & Discovery
54
92
 
55
- ```typescript
56
- m.directory() // Full namepoint directory
57
- m.check('handle') // Handle availability + pricing
58
- m.count() // Claimed/remaining counts
59
- m.discover() // Discovery feed (namepoints + souls)
60
- ```
93
+ | Method | Returns | Description |
94
+ |--------|---------|-------------|
95
+ | `directory()` | `Promise<DirectoryResult>` | Full namepoint directory with tag index |
96
+ | `check(handle)` | `Promise<CheckResult>` | Handle availability and pricing |
97
+ | `count()` | `Promise<CountResult>` | Claimed/remaining namepoint counts |
98
+ | `discover()` | `Promise<DiscoverResult>` | Discovery feed (namepoints + souls) |
61
99
 
62
100
  ### Tag Intel
63
101
 
64
- ```typescript
65
- m.tagIntel() // Tag patterns, co-occurrence, candidates, merges
66
- m.suggestTags('handle') // Suggest tags for a namepoint
67
- ```
102
+ | Method | Returns | Description |
103
+ |--------|---------|-------------|
104
+ | `tagIntel()` | `Promise<TagIntelResult>` | Tag patterns, co-occurrence, candidates, merge suggestions |
105
+ | `suggestTags(handle)` | `Promise<SuggestResult>` | Suggested tags for a namepoint based on content |
68
106
 
69
107
  ### Badges
70
108
 
109
+ | Method | Returns | Description |
110
+ |--------|---------|-------------|
111
+ | `badge(owner, repo)` | `string` | SVG badge URL (synchronous) |
112
+
71
113
  ```typescript
72
- m.badge('owner', 'repo') // Returns SVG badge URL (sync)
73
- // => https://mcpaas.live/badge/owner/repo.svg
114
+ mcpaas.badge('Wolfe-Jam', 'faf-cli')
115
+ // => "https://mcpaas.live/badge/Wolfe-Jam/faf-cli.svg"
74
116
  ```
75
117
 
76
118
  ### Globe
77
119
 
120
+ | Method | Returns | Description |
121
+ |--------|---------|-------------|
122
+ | `globe()` | `Promise<GlobeResult>` | Edge location stats from 300+ Cloudflare colos |
123
+
124
+ ### Platform
125
+
126
+ | Method | Returns | Description |
127
+ |--------|---------|-------------|
128
+ | `health()` | `Promise<HealthResult>` | Service health + engine status |
129
+ | `info()` | `Promise<InfoResult>` | Server name and version |
130
+
131
+ ---
132
+
133
+ ## Error Handling
134
+
135
+ All methods throw `MCPaaSError` on non-2xx responses:
136
+
78
137
  ```typescript
79
- m.globe() // Edge location stats from 300+ Cloudflare colos
138
+ import { MCPaaS, MCPaaSError } from 'mcpaas';
139
+
140
+ try {
141
+ await mcpaas.getSoul('nonexistent');
142
+ } catch (e) {
143
+ if (e instanceof MCPaaSError) {
144
+ e.status // 404
145
+ e.body // "Not found"
146
+ e.path // "/souls/nonexistent"
147
+ }
148
+ }
80
149
  ```
81
150
 
82
- ### Platform
151
+ ## Exported Types
152
+
153
+ All response types are exported:
83
154
 
84
155
  ```typescript
85
- m.health() // Health check
86
- m.info() // Server info
156
+ import type { ScoreResult, DirectoryEntry, TagIntelResult } from 'mcpaas';
87
157
  ```
88
158
 
89
159
  ## Configuration
90
160
 
91
161
  ```typescript
92
- const m = new MCPaaS({
162
+ const mcpaas = new MCPaaS({
93
163
  baseUrl: 'https://mcpaas.live', // default
94
164
  });
95
165
  ```
96
166
 
97
- ## Error Handling
167
+ ---
98
168
 
99
- ```typescript
100
- import { MCPaaS, MCPaaSError } from 'mcpaas';
169
+ ## Internals
170
+
171
+ Single file. 250 lines. Zero dependencies. Native `fetch` only.
101
172
 
102
- try {
103
- await m.getSoul('nonexistent');
104
- } catch (e) {
105
- if (e instanceof MCPaaSError) {
106
- console.log(e.status); // HTTP status code
107
- console.log(e.body); // Response body
108
- console.log(e.path); // Request path
109
- }
110
- }
111
173
  ```
174
+ src/index.ts ← Types + MCPaaS class + MCPaaSError (that's it)
175
+ tests/sdk.test.ts ← 19 tests against live mcpaas.live
176
+ ```
177
+
178
+ Built with Bun. Tested with Bun. Works anywhere `fetch` does.
179
+
180
+ ---
181
+
182
+ ## Why Bun?
183
+
184
+ Bun powers Claude Code. This SDK follows the same toolchain — `bun build`, `bun test`, TypeScript-native. No transpiler config, no bundler plugins, no runtime dependencies.
185
+
186
+ Node, Deno, browsers, and edge runtimes work too. But Bun is home.
187
+
188
+ ---
112
189
 
113
190
  ## License
114
191
 
115
192
  MIT
193
+
194
+ ---
195
+
196
+ Built by [Wolfe James](https://github.com/Wolfe-Jam) | Powered by [MCPaaS](https://mcpaas.live) | Format: [FAF](https://faf.one)
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ class MCPaaS {
20
20
  return this.json("/api/play/score", {
21
21
  method: "POST",
22
22
  headers: { "Content-Type": "application/json" },
23
- body: JSON.stringify({ repo })
23
+ body: JSON.stringify({ url: repo })
24
24
  });
25
25
  }
26
26
  async leaderboard() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcpaas",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "MCPaaS SDK — Context, on-demand. Read souls, score repos, discover tags, query the globe.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",