@buildinternet/uploads 0.48.0 → 0.48.1
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 +2 -0
- package/dist/commands/mcp.js +2 -2
- package/dist/mcp/server.d.ts +8 -5
- package/dist/mcp/server.js +12 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -204,6 +204,8 @@ Config layers (first match wins): CLI flags → env vars → `--env-file` → `~
|
|
|
204
204
|
|
|
205
205
|
Or with `UPLOADS_TOKEN`/`UPLOADS_WORKSPACE` in the environment or user config. Claude Code: `claude mcp add uploads -- uploads --env-file /path/to/.env mcp`.
|
|
206
206
|
|
|
207
|
+
The MCP Registry lists this server as `sh.uploads/mcp`.
|
|
208
|
+
|
|
207
209
|
For HTTP clients there's also a hosted variant at `https://agents.uploads.sh/mcp` — the workspace is inferred from the bearer token, so only the URL and token are needed (`https://agents.uploads.sh/<workspace>/mcp` and the `mcp.uploads.sh` hostname also work). Tools: file operations (including `get_metadata` / `set_metadata` / `find_files`) plus `gallery_create`, `gallery_get`, `gallery_add`, `gallery_link`, and `gallery_find_by_reference`; all use the same bearer-token workspace scopes and gallery URLs come from the API — see `apps/mcp` in the repo. The hosted `put` also accepts a `metadata` param. `uploads install` registers the skills + hosted MCP with whichever of Claude Code, Codex, and Grok are on PATH (a missing CLI is skipped) + Grok/Cursor hooks (short progress; `--verbose` for underlying output). Claude and Codex use their plugins for the same pre-PR screenshot reminder (`uploads hook pre-pr-screenshot`). Its `put` takes no content type: the stored type is sniffed server-side from the bytes and checked against the workspace allowlist, and writes are rate limited per workspace.
|
|
208
210
|
|
|
209
211
|
## Programmatic use
|
package/dist/commands/mcp.js
CHANGED
|
@@ -2,7 +2,7 @@ import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
|
2
2
|
import { AjvJsonSchemaValidator } from "@modelcontextprotocol/server/validators/ajv";
|
|
3
3
|
import { parseCommandArgs } from "../cli-args.js";
|
|
4
4
|
import { resolveApiUrl } from "../config.js";
|
|
5
|
-
import { createMcpServer } from "../mcp/server.js";
|
|
5
|
+
import { createMcpServer, MCP_SERVER_ICONS } from "../mcp/server.js";
|
|
6
6
|
import { createUploadsMcpTools } from "../mcp/tools.js";
|
|
7
7
|
import { packageVersion } from "../package-version.js";
|
|
8
8
|
import { writeCommandHelp } from "../cli-style.js";
|
|
@@ -35,7 +35,7 @@ export async function runMcp(args, opts, help = false) {
|
|
|
35
35
|
// `@cfworker/json-schema` provider instead).
|
|
36
36
|
const validator = new AjvJsonSchemaValidator();
|
|
37
37
|
const handle = serveStdio(() => createMcpServer({
|
|
38
|
-
serverInfo: { name: "uploads", version: packageVersion() },
|
|
38
|
+
serverInfo: { name: "uploads", version: packageVersion(), icons: MCP_SERVER_ICONS },
|
|
39
39
|
tools: createUploadsMcpTools({ globals: opts.globals }),
|
|
40
40
|
apiUrl: resolveApiUrl(opts.globals),
|
|
41
41
|
validator,
|
package/dist/mcp/server.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* The stdio transport comes from `@modelcontextprotocol/server/stdio`; logs
|
|
18
18
|
* must never go to stdout.
|
|
19
19
|
*/
|
|
20
|
-
import { McpServer, type jsonSchemaValidator } from "@modelcontextprotocol/server";
|
|
20
|
+
import { McpServer, type Implementation, type jsonSchemaValidator } from "@modelcontextprotocol/server";
|
|
21
21
|
export { appProp, canonicalMetaFromArgs, METADATA_DESCRIPTION, metadataArgWithCanonical, metadataProp, stateProp, optBool, optPosInt, optString, optStringArray, optStringRecord, usage, type ToolArgs, } from "./args.js";
|
|
22
22
|
export { ToolBatchError, batchFailureMessage } from "./batch-error.js";
|
|
23
23
|
export { mapBounded } from "../async.js";
|
|
@@ -81,11 +81,14 @@ export interface McpTool {
|
|
|
81
81
|
outputSchema?: Record<string, unknown>;
|
|
82
82
|
handler: (args: Record<string, unknown>) => Promise<unknown>;
|
|
83
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Brand mark on `serverInfo.icons` (MCP `Icon`, spec 2026-07-28). PNG is the
|
|
86
|
+
* type clients that render icons MUST support. The file is the site's
|
|
87
|
+
* apple-touch-icon (180×180 pixel chevron), already public on uploads.sh.
|
|
88
|
+
*/
|
|
89
|
+
export declare const MCP_SERVER_ICONS: NonNullable<Implementation["icons"]>;
|
|
84
90
|
export declare function createMcpServer(opts: {
|
|
85
|
-
serverInfo:
|
|
86
|
-
name: string;
|
|
87
|
-
version: string;
|
|
88
|
-
};
|
|
91
|
+
serverInfo: Implementation;
|
|
89
92
|
tools: McpTool[];
|
|
90
93
|
/** API base for telemetry (honors uploads --api-url). */
|
|
91
94
|
apiUrl?: string;
|
package/dist/mcp/server.js
CHANGED
|
@@ -138,6 +138,18 @@ function wrapHandler(tool, apiUrl) {
|
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Brand mark on `serverInfo.icons` (MCP `Icon`, spec 2026-07-28). PNG is the
|
|
143
|
+
* type clients that render icons MUST support. The file is the site's
|
|
144
|
+
* apple-touch-icon (180×180 pixel chevron), already public on uploads.sh.
|
|
145
|
+
*/
|
|
146
|
+
export const MCP_SERVER_ICONS = [
|
|
147
|
+
{
|
|
148
|
+
src: "https://uploads.sh/apple-touch-icon.png",
|
|
149
|
+
mimeType: "image/png",
|
|
150
|
+
sizes: ["180x180"],
|
|
151
|
+
},
|
|
152
|
+
];
|
|
141
153
|
export function createMcpServer(opts) {
|
|
142
154
|
const { serverInfo, tools, apiUrl, validator } = opts;
|
|
143
155
|
const server = new McpServer(serverInfo, {
|
package/package.json
CHANGED