@anythink-cloud/mcp 0.2.6

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 ADDED
@@ -0,0 +1,61 @@
1
+ # @anythink-cloud/mcp
2
+
3
+ **Sick of Frankenstein's monster?** [Anythink](https://anythink.cloud) replaces
4
+ stitched-together services with a streamlined, all-in-one backend — giving you
5
+ more time to create a killer product. All configured with a little help from AI,
6
+ when you need it.
7
+
8
+ `@anythink-cloud/mcp` is the [Anythink](https://anythink.cloud) MCP server. It exposes
9
+ the Backend-as-a-Service platform — databases, auth, data and search, files,
10
+ workflows, integrations, and payments — to AI assistants and agents over the
11
+ [Model Context Protocol](https://modelcontextprotocol.io).
12
+
13
+ This package runs the native, self-contained binary via `npx` — **no .NET
14
+ runtime required**.
15
+
16
+ ## Use with Claude Code
17
+
18
+ ```bash
19
+ claude mcp add anythink -- npx -y @anythink-cloud/mcp
20
+ ```
21
+
22
+ ## Use with any MCP client
23
+
24
+ Add this server entry to the client's MCP config:
25
+
26
+ ```json
27
+ {
28
+ "mcpServers": {
29
+ "anythink": {
30
+ "command": "npx",
31
+ "args": ["-y", "@anythink-cloud/mcp"]
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ | Client | Config location |
38
+ | --- | --- |
39
+ | Claude Code | `claude mcp add` (above) |
40
+ | Cursor | `~/.cursor/mcp.json` |
41
+ | VS Code | `.vscode/mcp.json` |
42
+ | Windsurf | `~/.codeium/windsurf/mcp_config.json` |
43
+ | Cline / Continue / Zed | their MCP settings |
44
+
45
+ To pin a profile: add `"--profile", "my-project"` to `args`.
46
+
47
+ Once connected, run the `login` tool, then `accounts_use` / `projects_use` to
48
+ pick your working context.
49
+
50
+ ## Supported platforms
51
+
52
+ macOS (arm64/x64), Linux (x64/arm64), Windows (x64/arm64). The matching binary is
53
+ downloaded from the [GitHub release](https://github.com/anythink-cloud/anythink-cli/releases)
54
+ on install and checksum-verified.
55
+
56
+ Prefer a native install? `brew install anythink-cloud/tap/anythink` (macOS/Linux)
57
+ installs both the CLI and the MCP server.
58
+
59
+ ## License
60
+
61
+ MIT
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ // Thin launcher: exec the native binary that postinstall placed next to this
3
+ // shim, forwarding argv and stdio (stdio is how MCP clients talk to the server).
4
+ const { spawnSync } = require("child_process");
5
+ const path = require("path");
6
+ const fs = require("fs");
7
+
8
+ const isWin = process.platform === "win32";
9
+ const bin = path.join(__dirname, isWin ? "anythink-mcp.exe" : "anythink-mcp");
10
+
11
+ if (!fs.existsSync(bin)) {
12
+ console.error(
13
+ "[anythink-mcp] native binary missing — postinstall may have failed. " +
14
+ "Reinstall, or grab a binary from " +
15
+ "https://github.com/anythink-cloud/anythink-cli/releases/latest"
16
+ );
17
+ process.exit(1);
18
+ }
19
+
20
+ const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
21
+ if (result.error) {
22
+ console.error(`[anythink-mcp] failed to launch: ${result.error.message}`);
23
+ process.exit(1);
24
+ }
25
+ process.exit(result.status === null ? 1 : result.status);
package/install.js ADDED
@@ -0,0 +1,102 @@
1
+ // Postinstall: download the matching anythink-mcp native binary for this
2
+ // platform from the GitHub release that corresponds to this package version,
3
+ // verify its checksum, and place it next to the bin shim. No .NET required —
4
+ // the binary is self-contained.
5
+ const fs = require("fs");
6
+ const path = require("path");
7
+ const https = require("https");
8
+ const crypto = require("crypto");
9
+ const { version } = require("./package.json");
10
+
11
+ const REPO = "anythink-cloud/anythink-cli";
12
+
13
+ // node platform-arch -> release asset name
14
+ const ASSETS = {
15
+ "darwin-arm64": "anythink-mcp-osx-arm64",
16
+ "darwin-x64": "anythink-mcp-osx-x64",
17
+ "linux-x64": "anythink-mcp-linux-x64",
18
+ "linux-arm64": "anythink-mcp-linux-arm64",
19
+ "win32-x64": "anythink-mcp-win-x64.exe",
20
+ "win32-arm64": "anythink-mcp-win-arm64.exe",
21
+ };
22
+
23
+ const RELEASES = `https://github.com/${REPO}/releases`;
24
+
25
+ function fail(message) {
26
+ console.error(`[anythink-mcp] ${message}`);
27
+ console.error(
28
+ `[anythink-mcp] Install a binary manually instead: ${RELEASES}/latest`
29
+ );
30
+ process.exit(1);
31
+ }
32
+
33
+ function fetch(url, redirects = 0) {
34
+ return new Promise((resolve, reject) => {
35
+ if (redirects > 10) return reject(new Error("too many redirects"));
36
+ https
37
+ .get(url, { headers: { "User-Agent": "anythink-mcp-installer" } }, (res) => {
38
+ if (
39
+ res.statusCode >= 300 &&
40
+ res.statusCode < 400 &&
41
+ res.headers.location
42
+ ) {
43
+ res.resume();
44
+ return resolve(fetch(res.headers.location, redirects + 1));
45
+ }
46
+ if (res.statusCode !== 200) {
47
+ res.resume();
48
+ return reject(new Error(`HTTP ${res.statusCode} for ${url}`));
49
+ }
50
+ const chunks = [];
51
+ res.on("data", (c) => chunks.push(c));
52
+ res.on("end", () => resolve(Buffer.concat(chunks)));
53
+ })
54
+ .on("error", reject);
55
+ });
56
+ }
57
+
58
+ async function main() {
59
+ const key = `${process.platform}-${process.arch}`;
60
+ const asset = ASSETS[key];
61
+ if (!asset) {
62
+ fail(
63
+ `unsupported platform ${key}. Supported: ${Object.keys(ASSETS).join(", ")}.`
64
+ );
65
+ }
66
+
67
+ const base = `${RELEASES}/download/v${version}`;
68
+ const binDir = path.join(__dirname, "bin");
69
+ const isWin = process.platform === "win32";
70
+ const outPath = path.join(binDir, isWin ? "anythink-mcp.exe" : "anythink-mcp");
71
+
72
+ fs.mkdirSync(binDir, { recursive: true });
73
+
74
+ let binary, checksums;
75
+ try {
76
+ [binary, checksums] = await Promise.all([
77
+ fetch(`${base}/${asset}`),
78
+ fetch(`${base}/checksums.txt`).catch(() => null),
79
+ ]);
80
+ } catch (err) {
81
+ fail(`could not download ${asset} (v${version}): ${err.message}`);
82
+ }
83
+
84
+ // Verify against checksums.txt (lines: "<sha256> <filename>")
85
+ if (checksums) {
86
+ const sha = crypto.createHash("sha256").update(binary).digest("hex");
87
+ const match = checksums
88
+ .toString("utf8")
89
+ .split("\n")
90
+ .map((l) => l.trim().split(/\s+/))
91
+ .find((parts) => parts[1] === asset);
92
+ if (match && match[0].toLowerCase() !== sha.toLowerCase()) {
93
+ fail(`checksum mismatch for ${asset} (expected ${match[0]}, got ${sha})`);
94
+ }
95
+ }
96
+
97
+ fs.writeFileSync(outPath, binary);
98
+ if (!isWin) fs.chmodSync(outPath, 0o755);
99
+ console.log(`[anythink-mcp] installed ${asset} (v${version}).`);
100
+ }
101
+
102
+ main().catch((err) => fail(err.message));
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@anythink-cloud/mcp",
3
+ "version": "0.2.6",
4
+ "description": "Anythink MCP server — manage the Anythink all-in-one backend (data, auth, search, files, workflows, payments) from AI assistants and agents. Runs the native binary via npx; no .NET required.",
5
+ "bin": {
6
+ "anythink-mcp": "bin/anythink-mcp.js"
7
+ },
8
+ "scripts": {
9
+ "postinstall": "node ./install.js"
10
+ },
11
+ "files": [
12
+ "bin/anythink-mcp.js",
13
+ "install.js",
14
+ "README.md"
15
+ ],
16
+ "keywords": [
17
+ "anythink",
18
+ "mcp",
19
+ "model-context-protocol",
20
+ "backend",
21
+ "baas",
22
+ "backend-as-a-service",
23
+ "ai",
24
+ "agent",
25
+ "llm",
26
+ "database",
27
+ "cli"
28
+ ],
29
+ "homepage": "https://anythink.cloud",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/anythink-cloud/anythink-cli.git"
33
+ },
34
+ "license": "MIT",
35
+ "author": "Anythink",
36
+ "engines": {
37
+ "node": ">=16"
38
+ },
39
+ "os": [
40
+ "darwin",
41
+ "linux",
42
+ "win32"
43
+ ],
44
+ "cpu": [
45
+ "x64",
46
+ "arm64"
47
+ ]
48
+ }