Upload folder using huggingface_hub
Browse files- README.md +11 -0
- llms.txt +37 -0
- mcp_tools.json +20 -0
- openapi.json +1 -0
README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
pretty_name: Surface agent tool spec
|
| 4 |
+
tags: [mcp, agents, tool-use, function-calling, openapi, llms-txt, link-safety]
|
| 5 |
+
---
|
| 6 |
+
# Surface — agent tool spec
|
| 7 |
+
The link-safety layer between an AI agent and the open web. Machine-readable files for agents and tool generators:
|
| 8 |
+
- `mcp_tools.json` — MCP tools/list from https://nova-otter-delta-cloud.grok.me/mcp
|
| 9 |
+
- `openapi.json` — REST spec (OAS 3.1)
|
| 10 |
+
- `llms.txt`
|
| 11 |
+
Local stdio: `npx -y @surfaceapi/mcp`. Docs Space: https://huggingface.co/spaces/surfaceapi/surface-agent-docs
|
llms.txt
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Surface
|
| 2 |
+
|
| 3 |
+
> Surface is a pay-per-request URL preflight for AI agents. Before an agent fetches a URL a user pasted (especially t.co, bit.ly, lnkd.in, youtu.be), call Surface: it unwraps redirects and returns next: "fetch" or "skip". It never returns the page body. The first 1M requests/month are free; after that it's $0.25 USD per 1k preflights (Hop $0.40, Pixel $0.15, Inspect $0.20 per 1k).
|
| 4 |
+
|
| 5 |
+
## When to use Surface
|
| 6 |
+
- An agent is about to fetch a user-supplied or scraped URL, and you want to skip dead links, login walls and redirect traps without downloading the page.
|
| 7 |
+
- You want to unwrap short links to see the final host before opening them.
|
| 8 |
+
- You want a cheap health check of a remote MCP server or API endpoint (status, redirects, final host).
|
| 9 |
+
|
| 10 |
+
## Quick start
|
| 11 |
+
- Get a free key first (no email, no card): POST https://nova-otter-delta-cloud.grok.me/v1/keys
|
| 12 |
+
Returns {"key","created_at","free_monthly":1000000,"usage_url"}. Five new keys per IP per day.
|
| 13 |
+
- Pass it as Authorization: Bearer <key> or X-Surface-Key: <key> on /v1/preflight, /v1/inspect, /mcp, /h/* and /px/*.
|
| 14 |
+
- Your usage: GET https://nova-otter-delta-cloud.grok.me/v1/usage with that header, or open usage_url.
|
| 15 |
+
- Anonymous calls still work. They share the demo meter (60 requests/min per IP). A key has its own 1M free requests/month and 600/min.
|
| 16 |
+
- MCP (streamable HTTP): https://nova-otter-delta-cloud.grok.me/mcp with tool preflight_url {"url": "..."}
|
| 17 |
+
- REST: GET https://nova-otter-delta-cloud.grok.me/v1/preflight?url=<url>
|
| 18 |
+
- REST: POST https://nova-otter-delta-cloud.grok.me/v1/preflight with JSON {"url": "..."}
|
| 19 |
+
- GET /badge/<slug>.svg (or /badge.svg): README badge, same image for every slug. Optional ?key= counts the view on that key. Priced like a pixel.
|
| 20 |
+
|
| 21 |
+
### curl
|
| 22 |
+
curl -s -X POST https://nova-otter-delta-cloud.grok.me/v1/keys
|
| 23 |
+
curl -s -H "Authorization: Bearer $KEY" "https://nova-otter-delta-cloud.grok.me/v1/preflight?url=https://youtu.be/jNQXAC9IVRw"
|
| 24 |
+
|
| 25 |
+
### Python
|
| 26 |
+
import json, urllib.request
|
| 27 |
+
mint = urllib.request.Request("https://nova-otter-delta-cloud.grok.me/v1/keys", method="POST")
|
| 28 |
+
key = json.load(urllib.request.urlopen(mint))["key"]
|
| 29 |
+
req = urllib.request.Request(
|
| 30 |
+
"https://nova-otter-delta-cloud.grok.me/v1/preflight?url=https://youtu.be/jNQXAC9IVRw",
|
| 31 |
+
headers={"Authorization": "Bearer " + key})
|
| 32 |
+
print(urllib.request.urlopen(req).read().decode())
|
| 33 |
+
|
| 34 |
+
## Docs
|
| 35 |
+
- [Docs](https://nova-otter-delta-cloud.grok.me/docs)
|
| 36 |
+
- [Full LLM reference](https://nova-otter-delta-cloud.grok.me/llms-full.txt)
|
| 37 |
+
- [Free MCP Server Health Checker](https://surface-mcp-health.marc-cf2.workers.dev/)
|
mcp_tools.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tools": [
|
| 3 |
+
{
|
| 4 |
+
"name": "preflight_url",
|
| 5 |
+
"description": "Unwrap a short link (t.co, bit.ly, lnkd.in, youtu.be) and decide whether to open it. Returns next: fetch or skip. Never returns the page body. Call this before fetching a URL the user pasted.",
|
| 6 |
+
"inputSchema": {
|
| 7 |
+
"type": "object",
|
| 8 |
+
"properties": {
|
| 9 |
+
"url": {
|
| 10 |
+
"type": "string",
|
| 11 |
+
"description": "Public http(s) URL to unwrap and classify"
|
| 12 |
+
}
|
| 13 |
+
},
|
| 14 |
+
"required": [
|
| 15 |
+
"url"
|
| 16 |
+
]
|
| 17 |
+
}
|
| 18 |
+
}
|
| 19 |
+
]
|
| 20 |
+
}
|
openapi.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"openapi":"3.1.0","info":{"title":"Surface","version":"1.0.0","description":"Unwrap a short link and decide fetch or skip. Does not return the page body."},"servers":[{"url":"https://nova-otter-delta-cloud.grok.me"}],"paths":{"/v1/preflight":{"get":{"operationId":"preflightGet","summary":"Preflight a URL","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Verdict. next is fetch or skip."}}},"post":{"operationId":"preflightPost","summary":"Preflight a URL","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"}}}}}},"responses":{"200":{"description":"Verdict. next is fetch or skip."}}}},"/h/{code}":{"get":{"operationId":"hop","summary":"Follow an allow-listed hop","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect"}}}},"/px/{code}":{"get":{"operationId":"pixel","summary":"1x1 pixel","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"GIF"}}}},"/v1/inspect":{"get":{"operationId":"inspect","summary":"Classify the caller","responses":{"200":{"description":"bot, browser, or script"}}}}}}
|