pdc-mcp 0.5.1 → 0.5.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.
Files changed (2) hide show
  1. package/dist/index.js +47 -42
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -29380,10 +29380,12 @@ class PdcClient {
29380
29380
  baseUrl;
29381
29381
  token;
29382
29382
  fetchFn;
29383
+ clientLabel;
29383
29384
  constructor(opts) {
29384
29385
  this.baseUrl = opts.baseUrl.replace(/\/+$/, "");
29385
29386
  this.token = opts.token ?? null;
29386
29387
  this.fetchFn = opts.fetch ?? fetch;
29388
+ this.clientLabel = opts.clientLabel ?? "pdc-mcp";
29387
29389
  }
29388
29390
  setToken(token) {
29389
29391
  this.token = token;
@@ -29396,6 +29398,7 @@ class PdcClient {
29396
29398
  ...init,
29397
29399
  headers: {
29398
29400
  Accept: "application/json",
29401
+ "X-PDC-Client": this.clientLabel,
29399
29402
  ...init?.body ? { "Content-Type": "application/json" } : {},
29400
29403
  ...this.token ? { Authorization: `Bearer ${this.token}` } : {},
29401
29404
  ...init?.headers
@@ -29445,7 +29448,7 @@ async function authenticatedClient(baseUrl, opts) {
29445
29448
  const cred = await loadToken(baseUrl, opts?.configDir);
29446
29449
  if (!cred)
29447
29450
  return null;
29448
- return new PdcClient({ baseUrl, token: cred.accessToken, fetch: opts?.fetch });
29451
+ return new PdcClient({ baseUrl, token: cred.accessToken, fetch: opts?.fetch, clientLabel: opts?.clientLabel });
29449
29452
  }
29450
29453
  // ../core/src/api.ts
29451
29454
  class PdcApi {
@@ -29631,6 +29634,46 @@ async function detectContext(cwd = process.cwd()) {
29631
29634
  }
29632
29635
  return { repo, branch, dockerfile, compose };
29633
29636
  }
29637
+ // package.json
29638
+ var package_default = {
29639
+ name: "pdc-mcp",
29640
+ version: "0.5.2",
29641
+ description: "Servidor MCP do PDC Deploy — opere o PDC (criar projetos, deployar, acompanhar builds) pelo seu agente de IA, com login por device code e segredos fora do chat.",
29642
+ type: "module",
29643
+ bin: { "pdc-mcp": "dist/index.js" },
29644
+ files: ["dist/index.js", "README.md", "LICENSE"],
29645
+ engines: { node: ">=18" },
29646
+ publishConfig: { access: "public" },
29647
+ scripts: {
29648
+ build: "bun build src/index.ts --target=node --outfile dist/index.js",
29649
+ prepublishOnly: "bun run build"
29650
+ },
29651
+ keywords: [
29652
+ "mcp",
29653
+ "model-context-protocol",
29654
+ "pdc",
29655
+ "deploy",
29656
+ "coolify",
29657
+ "claude",
29658
+ "cursor"
29659
+ ],
29660
+ license: "MIT",
29661
+ repository: {
29662
+ type: "git",
29663
+ url: "git+https://github.com/pdc-deploy/pdc-mcp.git",
29664
+ directory: "packages/mcp"
29665
+ },
29666
+ homepage: "https://projetos.ltap.ifce.edu.br/docs",
29667
+ devDependencies: {
29668
+ "@modelcontextprotocol/sdk": "^1.29.0",
29669
+ "@pdc/core": "*",
29670
+ zod: "^4.4.3"
29671
+ }
29672
+ };
29673
+
29674
+ // src/version.ts
29675
+ var MCP_VERSION = package_default.version;
29676
+
29634
29677
  // src/session.ts
29635
29678
  class PdcSession {
29636
29679
  opts;
@@ -29641,7 +29684,8 @@ class PdcSession {
29641
29684
  async api() {
29642
29685
  const client = await authenticatedClient(this.opts.baseUrl, {
29643
29686
  fetch: this.opts.fetch,
29644
- configDir: this.opts.configDir
29687
+ configDir: this.opts.configDir,
29688
+ clientLabel: `pdc-mcp/${MCP_VERSION}`
29645
29689
  });
29646
29690
  return client ? new PdcApi(client) : null;
29647
29691
  }
@@ -29718,45 +29762,6 @@ class PdcSession {
29718
29762
  return await loadToken(this.opts.baseUrl, this.opts.configDir) != null;
29719
29763
  }
29720
29764
  }
29721
- // package.json
29722
- var package_default = {
29723
- name: "pdc-mcp",
29724
- version: "0.5.1",
29725
- description: "Servidor MCP do PDC Deploy — opere o PDC (criar projetos, deployar, acompanhar builds) pelo seu agente de IA, com login por device code e segredos fora do chat.",
29726
- type: "module",
29727
- bin: { "pdc-mcp": "dist/index.js" },
29728
- files: ["dist/index.js", "README.md", "LICENSE"],
29729
- engines: { node: ">=18" },
29730
- publishConfig: { access: "public" },
29731
- scripts: {
29732
- build: "bun build src/index.ts --target=node --outfile dist/index.js",
29733
- prepublishOnly: "bun run build"
29734
- },
29735
- keywords: [
29736
- "mcp",
29737
- "model-context-protocol",
29738
- "pdc",
29739
- "deploy",
29740
- "coolify",
29741
- "claude",
29742
- "cursor"
29743
- ],
29744
- license: "MIT",
29745
- repository: {
29746
- type: "git",
29747
- url: "git+https://github.com/pdc-deploy/pdc-mcp.git",
29748
- directory: "packages/mcp"
29749
- },
29750
- homepage: "https://projetos.ltap.ifce.edu.br/docs",
29751
- devDependencies: {
29752
- "@modelcontextprotocol/sdk": "^1.29.0",
29753
- "@pdc/core": "*",
29754
- zod: "^4.4.3"
29755
- }
29756
- };
29757
-
29758
- // src/version.ts
29759
- var MCP_VERSION = package_default.version;
29760
29765
 
29761
29766
  // src/update.ts
29762
29767
  var REGISTRY_URL = "https://registry.npmjs.org/pdc-mcp/latest";
@@ -29834,7 +29839,7 @@ function createPdcMcpServer(opts) {
29834
29839
  return opts.frontendUrl.replace(/\/+$/, "");
29835
29840
  if (discoveredFrontend !== undefined)
29836
29841
  return discoveredFrontend;
29837
- const bare = new PdcApi(new PdcClient({ baseUrl: opts.baseUrl, fetch: opts.fetch }));
29842
+ const bare = new PdcApi(new PdcClient({ baseUrl: opts.baseUrl, fetch: opts.fetch, clientLabel: `pdc-mcp/${MCP_VERSION}` }));
29838
29843
  discoveredFrontend = await bare.getPublicMeta().then((m) => m.frontendUrl?.replace(/\/+$/, "") ?? null).catch(() => {
29839
29844
  return;
29840
29845
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pdc-mcp",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Servidor MCP do PDC Deploy — opere o PDC (criar projetos, deployar, acompanhar builds) pelo seu agente de IA, com login por device code e segredos fora do chat.",
5
5
  "type": "module",
6
6
  "bin": { "pdc-mcp": "dist/index.js" },