@almyty/mcp-server 1.1.0 → 1.2.0

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 CHANGED
@@ -82,10 +82,14 @@ args = ["-y", "@almyty/mcp-server"]
82
82
 
83
83
  Requires `npx @almyty/auth login` first. Reads credentials from `~/.almyty/credentials.json`.
84
84
 
85
- ## Docs
85
+ ## About almyty
86
86
 
87
- https://almyty.com/docs
87
+ almyty is the full-stack platform for AI agents, agnostic by design: any LLM, any
88
+ API turned into tools, served over MCP, A2A, UTCP, and Agent Skills. Open source,
89
+ no lock-in.
88
90
 
89
- ## License
91
+ - Website — https://almyty.com
92
+ - Docs — https://docs.almyty.com
93
+ - Source — https://github.com/almyty-inc/almyty
90
94
 
91
- BSL-1.1
95
+ Apache-2.0 © Almyty Inc.
package/dist/auth.d.ts CHANGED
@@ -1,30 +1,6 @@
1
1
  /**
2
- * Credential resolver for @almyty/mcp-server.
3
- *
4
- * Authentication itself lives in the dedicated @almyty/auth package
5
- * (`npx @almyty/auth login`). This module just READS the shared
6
- * credentials store and surfaces them to the MCP server runtime.
7
- *
8
- * Lookup order:
9
- * 1. ALMYTY_TOKEN environment variable (CI / scripts / config files)
10
- * 2. ~/.almyty/credentials.json (interactive use, written
11
- * by `npx @almyty/auth login`)
2
+ * Thin re-export from the shared @almyty/client credential resolver.
3
+ * Keeps `./auth.js` imports working across the mcp-server codebase.
12
4
  */
13
- interface StoredCredentials {
14
- url: string;
15
- token: string;
16
- email?: string;
17
- frontendUrl?: string;
18
- }
19
- export declare function loadCredentials(): StoredCredentials | null;
20
- /**
21
- * Resolve token: env var > stored credentials. Returns null when no
22
- * credentials are available — the MCP server caller decides whether
23
- * that's fatal (it usually is, but read-only diagnostics may not need
24
- * a token).
25
- */
26
- export declare function resolveCredentials(): {
27
- url: string;
28
- token: string;
29
- } | null;
30
- export {};
5
+ export { resolveCredentials, resolveCredentialsOrExit, loadCredentials, CREDENTIALS_FILE, } from '@almyty/client';
6
+ export type { StoredCredentials } from '@almyty/client';
package/dist/auth.js CHANGED
@@ -1,44 +1,5 @@
1
1
  /**
2
- * Credential resolver for @almyty/mcp-server.
3
- *
4
- * Authentication itself lives in the dedicated @almyty/auth package
5
- * (`npx @almyty/auth login`). This module just READS the shared
6
- * credentials store and surfaces them to the MCP server runtime.
7
- *
8
- * Lookup order:
9
- * 1. ALMYTY_TOKEN environment variable (CI / scripts / config files)
10
- * 2. ~/.almyty/credentials.json (interactive use, written
11
- * by `npx @almyty/auth login`)
2
+ * Thin re-export from the shared @almyty/client credential resolver.
3
+ * Keeps `./auth.js` imports working across the mcp-server codebase.
12
4
  */
13
- import { readFileSync, existsSync } from 'fs';
14
- import { homedir } from 'os';
15
- import { join } from 'path';
16
- const CREDENTIALS_FILE = join(homedir(), '.almyty', 'credentials.json');
17
- export function loadCredentials() {
18
- try {
19
- if (!existsSync(CREDENTIALS_FILE))
20
- return null;
21
- return JSON.parse(readFileSync(CREDENTIALS_FILE, 'utf-8'));
22
- }
23
- catch {
24
- return null;
25
- }
26
- }
27
- /**
28
- * Resolve token: env var > stored credentials. Returns null when no
29
- * credentials are available — the MCP server caller decides whether
30
- * that's fatal (it usually is, but read-only diagnostics may not need
31
- * a token).
32
- */
33
- export function resolveCredentials() {
34
- const envToken = process.env.ALMYTY_TOKEN;
35
- const envUrl = process.env.ALMYTY_URL || 'https://api.almyty.com';
36
- if (envToken) {
37
- return { url: envUrl, token: envToken };
38
- }
39
- const creds = loadCredentials();
40
- if (creds?.token) {
41
- return { url: creds.url, token: creds.token };
42
- }
43
- return null;
44
- }
5
+ export { resolveCredentials, resolveCredentialsOrExit, loadCredentials, CREDENTIALS_FILE, } from '@almyty/client';
package/dist/proxy.js CHANGED
@@ -24,11 +24,11 @@ export class AlmytyProxy {
24
24
  this.warn = options.warn ?? ((m) => process.stderr.write(`[almyty mcp-server] ${m}\n`));
25
25
  }
26
26
  endpoint() {
27
- // Per-gateway scoping uses the slug-based MCP route (/mcp/:orgSlug/:gatewaySlug),
27
+ // Per-gateway scoping uses the GitHub-style route (/:orgSlug/:gatewaySlug),
28
28
  // which the caller must encode into ALMYTY_GATEWAY_ID as "orgSlug/gatewaySlug".
29
29
  // The unscoped route is the universal /mcp JSON-RPC endpoint.
30
30
  return this.gatewayId
31
- ? `${this.baseUrl}/mcp/${this.gatewayId}`
31
+ ? `${this.baseUrl}/${this.gatewayId}`
32
32
  : `${this.baseUrl}/mcp`;
33
33
  }
34
34
  nextId() {
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@almyty/mcp-server",
3
- "version": "1.1.0",
4
- "description": "Skill-first API proxy for any LLM — turns APIs into AI skills via MCP with minimal token overhead",
3
+ "version": "1.2.0",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "description": "Serve any almyty gateway to Claude Code or any MCP client \u2014 turn your APIs into MCP tools with a single command.",
5
8
  "type": "module",
6
9
  "main": "dist/index.js",
7
10
  "bin": {
@@ -11,7 +14,7 @@
11
14
  "dist"
12
15
  ],
13
16
  "scripts": {
14
- "build": "tsc",
17
+ "build": "tsc && chmod +x dist/index.js",
15
18
  "dev": "tsx src/index.ts",
16
19
  "prepublishOnly": "npm run build"
17
20
  },
@@ -29,8 +32,9 @@
29
32
  "codex"
30
33
  ],
31
34
  "author": "almyty",
32
- "license": "BSL-1.1",
35
+ "license": "Apache-2.0",
33
36
  "dependencies": {
37
+ "@almyty/client": "^1.2.0",
34
38
  "@modelcontextprotocol/sdk": "^1.7.0",
35
39
  "zod": "^3.22.0"
36
40
  },
@@ -38,5 +42,14 @@
38
42
  "@types/node": "^25.5.0",
39
43
  "tsx": "^4.7.0",
40
44
  "typescript": "^5.9.3"
45
+ },
46
+ "homepage": "https://almyty.com",
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/almyty-inc/almyty.git",
50
+ "directory": "packages/mcp-server"
51
+ },
52
+ "bugs": {
53
+ "url": "https://github.com/almyty-inc/almyty/issues"
41
54
  }
42
55
  }