@surfaceapi/surface 0.1.0 → 0.1.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.
- package/README.md +52 -15
- package/package.json +20 -7
package/README.md
CHANGED
|
@@ -1,25 +1,62 @@
|
|
|
1
|
-
# Surface
|
|
1
|
+
# Surface
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Surface checks a short link before your agent opens it. The answer is fetch or skip. It never returns the page. A hop or a 1×1 pixel counts the same way, with no install. Free for the first million requests a month. https://nova-otter-delta-cloud.grok.me
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Surface by Canada Site Ops. Ontario, Canada.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
## Get a free API key in about 10 seconds
|
|
8
|
+
|
|
9
|
+
No email, no card. Then set it on every call as `Authorization: Bearer <key>` or `X-Surface-Key: <key>`.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
curl -s -X POST https://nova-otter-delta-cloud.grok.me/v1/keys
|
|
13
|
+
# returns {"key","created_at","free_monthly":1000000,"usage_url"}
|
|
14
|
+
export SURFACE_API_KEY=... # paste the key value
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
A key gets its own million free requests a month. Anonymous calls still work on a shared demo limit.
|
|
18
|
+
|
|
19
|
+
## One install for Cursor or Claude (MCP)
|
|
20
|
+
|
|
21
|
+
Tool: `preflight_url`. Mint a key first, then paste this into your MCP settings:
|
|
9
22
|
|
|
10
|
-
## MCP
|
|
11
|
-
Add Surface to any MCP client:
|
|
12
23
|
```json
|
|
13
|
-
{
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"surface": {
|
|
27
|
+
"type": "http",
|
|
28
|
+
"url": "https://nova-otter-delta-cloud.grok.me/mcp",
|
|
29
|
+
"headers": {
|
|
30
|
+
"Authorization": "Bearer REPLACE_WITH_YOUR_KEY"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
14
35
|
```
|
|
15
36
|
|
|
16
37
|
## JavaScript
|
|
38
|
+
|
|
39
|
+
`npm install @surfaceapi/surface`
|
|
40
|
+
|
|
17
41
|
```js
|
|
18
|
-
const { Surface } = require(
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
console.log(await
|
|
23
|
-
console.log(await sk.inspect());
|
|
24
|
-
console.log(await sk.hop('abc123'));
|
|
42
|
+
const { Surface } = require('@surfaceapi/surface');
|
|
43
|
+
const { key } = await new Surface().createKey(); // free key in ~10 seconds
|
|
44
|
+
const s = new Surface({ apiKey: key });
|
|
45
|
+
console.log(await s.preflight('https://youtu.be/jNQXAC9IVRw')); // next: fetch or skip
|
|
46
|
+
console.log(await s.inspect());
|
|
25
47
|
```
|
|
48
|
+
|
|
49
|
+
Or set `SURFACE_API_KEY` after the curl above.
|
|
50
|
+
|
|
51
|
+
Python: `pip install surfaceapi`
|
|
52
|
+
|
|
53
|
+
## Also listed
|
|
54
|
+
|
|
55
|
+
- Official MCP Registry: `me.grok.nova-otter-delta-cloud/surface`
|
|
56
|
+
- https://smithery.ai/servers/canada-site-ops/surface
|
|
57
|
+
- https://www.curatedmcp.com/marketplace/surface
|
|
58
|
+
- https://www.npmjs.com/package/@surfaceapi/surface
|
|
59
|
+
- https://pypi.org/project/surfaceapi/
|
|
60
|
+
- https://huggingface.co/spaces/surfaceapi/surface-preflight
|
|
61
|
+
|
|
62
|
+
MCP at `/mcp` (tool `preflight_url`). CLI and GitHub Action are coming soon.
|
package/package.json
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surfaceapi/surface",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Surface checks a short link before your agent opens it. The answer is fetch or skip. It never returns the page. Free for the first million requests a month.",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"files": [
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
"files": [
|
|
7
|
+
"index.js",
|
|
8
|
+
"README.md"
|
|
9
|
+
],
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=18"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"surface",
|
|
15
|
+
"short-link",
|
|
16
|
+
"unwrap",
|
|
17
|
+
"link-check",
|
|
18
|
+
"preflight",
|
|
19
|
+
"mcp",
|
|
20
|
+
"agents",
|
|
21
|
+
"redirect"
|
|
22
|
+
],
|
|
9
23
|
"author": "Surface / Canada Site Ops <canada.site.ops@gmail.com>",
|
|
10
24
|
"license": "MIT",
|
|
11
|
-
"homepage": "https://nova-otter-delta-cloud.grok.me"
|
|
12
|
-
"repository": { "type": "git", "url": "git+https://github.com/Surface-ops/surface.git", "directory": "clients/js" }
|
|
25
|
+
"homepage": "https://nova-otter-delta-cloud.grok.me"
|
|
13
26
|
}
|