mcpaas 1.0.1 → 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 +85 -50
  2. package/dist/index.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,62 +1,74 @@
1
1
  # mcpaas
2
2
 
3
- [![npm](https://img.shields.io/npm/v/mcpaas)](https://www.npmjs.com/package/mcpaas)
4
- [![MCPaaS](https://mcpaas.live/badge/Wolfe-Jam/mcpaas-sdk.svg)](https://mcpaas.live)
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)
5
6
 
6
- Typed TypeScript client for [MCPaaS](https://mcpaas.live) the platform for AI context delivery.
7
+ **AI context has an API. This is the client.**
7
8
 
8
- Zero dependencies. Works everywhere `fetch` does: Bun, Node 18+, Deno, browsers, edge runtimes.
9
+ Every soul, score, namepoint, tag, and edge location on [MCPaaS](https://mcpaas.live) — typed, zero-dep, one import.
9
10
 
10
- ## Try It
11
+ ```typescript
12
+ import { MCPaaS } from 'mcpaas';
13
+ const mcpaas = new MCPaaS();
11
14
 
12
- ```bash
13
- bunx bun -e "import { MCPaaS } from './src'; const m = new MCPaaS(); console.log(await m.getRawSoul('spacex'))"
15
+ const soul = await mcpaas.getRawSoul('spacex');
14
16
  ```
15
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
+ ---
21
+
16
22
  ## Install
17
23
 
18
24
  ```bash
19
- bun add mcpaas
20
- # or
21
- npm install mcpaas
25
+ bun add mcpaas # Bun-native
26
+ npm install mcpaas # Also works with Node 18+, Deno, browsers, edge runtimes
22
27
  ```
23
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
+
24
48
  ## Quick Start
25
49
 
26
50
  ```typescript
27
51
  import { MCPaaS } from 'mcpaas';
28
52
 
29
- const m = new MCPaaS();
53
+ const mcpaas = new MCPaaS();
30
54
 
31
- // Read live AI context (a "soul")
32
- const spacex = await m.getRawSoul('spacex');
33
- // => "SpaceX — Founded 2002 by Elon Musk..."
55
+ // Read live AI context
56
+ const soul = await mcpaas.getRawSoul('spacex');
34
57
 
35
- // Score any GitHub repo's AI-readiness
36
- const repo = await m.scoreRepo('anthropics/claude-code');
37
- // => { score: 72, repo: "anthropics/claude-code", language: "TypeScript", ... }
58
+ // Score a GitHub repo's AI-readiness
59
+ const repo = await mcpaas.scoreRepo('anthropics/claude-code');
60
+ console.log(repo.score, repo.language);
38
61
 
39
62
  // Check if a namepoint handle is available
40
- const check = await m.check('myhandle');
41
- // => { handle: "myhandle", available: true, price: "$2/month" }
63
+ const check = await mcpaas.check('myhandle');
64
+ console.log(check.available);
42
65
 
43
- // Get tag intelligence across 700+ namepoints
44
- const intel = await m.tagIntel();
45
- // => { tags: [...], candidates: [...], merges: [...], analysed: 721 }
66
+ // Tag intelligence across the entire directory
67
+ const intel = await mcpaas.tagIntel();
68
+ console.log(intel.tags.length, 'tag profiles');
46
69
  ```
47
70
 
48
- ## What MCPaaS Does
49
-
50
- MCPaaS delivers AI context at 300+ Cloudflare edges in sub-millisecond time. The platform provides:
51
-
52
- - **Souls** — persistent AI context blocks (project DNA, personas, live data)
53
- - **Namepoints** — claimed handles in a global directory (like DNS for AI context)
54
- - **Scoring** — AI-readiness scores for repos and namepoints
55
- - **Tag Intel** — pattern detection, co-occurrence analysis, and tag suggestions
56
- - **Globe** — real-time execution stats from 300+ edge locations
57
- - **Badges** — SVG badges for any GitHub repo's score
58
-
59
- This SDK wraps all 15 public endpoints into typed methods with full IntelliSense.
71
+ ---
60
72
 
61
73
  ## API Reference
62
74
 
@@ -99,7 +111,7 @@ This SDK wraps all 15 public endpoints into typed methods with full IntelliSense
99
111
  | `badge(owner, repo)` | `string` | SVG badge URL (synchronous) |
100
112
 
101
113
  ```typescript
102
- m.badge('Wolfe-Jam', 'faf-cli')
114
+ mcpaas.badge('Wolfe-Jam', 'faf-cli')
103
115
  // => "https://mcpaas.live/badge/Wolfe-Jam/faf-cli.svg"
104
116
  ```
105
117
 
@@ -107,7 +119,7 @@ m.badge('Wolfe-Jam', 'faf-cli')
107
119
 
108
120
  | Method | Returns | Description |
109
121
  |--------|---------|-------------|
110
- | `globe()` | `Promise<GlobeResult>` | Edge location execution stats from 300+ Cloudflare colos |
122
+ | `globe()` | `Promise<GlobeResult>` | Edge location stats from 300+ Cloudflare colos |
111
123
 
112
124
  ### Platform
113
125
 
@@ -116,13 +128,7 @@ m.badge('Wolfe-Jam', 'faf-cli')
116
128
  | `health()` | `Promise<HealthResult>` | Service health + engine status |
117
129
  | `info()` | `Promise<InfoResult>` | Server name and version |
118
130
 
119
- ## Configuration
120
-
121
- ```typescript
122
- const m = new MCPaaS({
123
- baseUrl: 'https://mcpaas.live', // default
124
- });
125
- ```
131
+ ---
126
132
 
127
133
  ## Error Handling
128
134
 
@@ -132,7 +138,7 @@ All methods throw `MCPaaSError` on non-2xx responses:
132
138
  import { MCPaaS, MCPaaSError } from 'mcpaas';
133
139
 
134
140
  try {
135
- await m.getSoul('nonexistent');
141
+ await mcpaas.getSoul('nonexistent');
136
142
  } catch (e) {
137
143
  if (e instanceof MCPaaSError) {
138
144
  e.status // 404
@@ -142,20 +148,49 @@ try {
142
148
  }
143
149
  ```
144
150
 
145
- ## TypeScript
151
+ ## Exported Types
146
152
 
147
- All response types are exported for use in your own code:
153
+ All response types are exported:
148
154
 
149
155
  ```typescript
150
156
  import type { ScoreResult, DirectoryEntry, TagIntelResult } from 'mcpaas';
151
157
  ```
152
158
 
159
+ ## Configuration
160
+
161
+ ```typescript
162
+ const mcpaas = new MCPaaS({
163
+ baseUrl: 'https://mcpaas.live', // default
164
+ });
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Internals
170
+
171
+ Single file. 250 lines. Zero dependencies. Native `fetch` only.
172
+
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
+ ---
189
+
153
190
  ## License
154
191
 
155
192
  MIT
156
193
 
157
- ## Links
194
+ ---
158
195
 
159
- - [MCPaaS Platform](https://mcpaas.live)
160
- - [API Dashboard](https://mcpaas.live/souls/stats)
161
- - [GitHub](https://github.com/Wolfe-Jam/mcpaas-sdk)
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.1",
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",