@skeletiq/mcp 0.7.0 → 0.7.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 CHANGED
@@ -56,6 +56,8 @@ Run `npx -y @skeletiq/mcp` over stdio with `SKELETIQ_API_KEY` in the environment
56
56
  | `SKELETIQ_API_KEY` | yes | — | A personal API token, starting `skq_`. Not a browser session token. |
57
57
  | `SKELETIQ_API_URL` | no | `https://api.skeletiq.com` | For self-hosted installs. A trailing `/api/v1` is accepted and trimmed. |
58
58
 
59
+ Every request carries a User-Agent of the form `skeletiq-mcp/<version> (<host name>/<host version>)`, naming the MCP host that launched the server.
60
+
59
61
  ## Scopes
60
62
 
61
63
  A token grants only what you tick. The server's tools need:
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { serveStdio } from "@modelcontextprotocol/server/stdio";
5
5
 
6
6
  // src/config.ts
7
7
  var SERVER_NAME = "skeletiq";
8
- var SERVER_VERSION = "0.7.0";
8
+ var SERVER_VERSION = "0.7.1";
9
9
  var AGENT_SCHEMA_VERSION = 2;
10
10
  function schemaNote(serverVersion) {
11
11
  if (serverVersion === void 0 || serverVersion <= AGENT_SCHEMA_VERSION) return null;
@@ -199,12 +199,28 @@ function describeApiError(error) {
199
199
 
200
200
  // src/http/client.ts
201
201
  var API_PREFIX = "/api/v1";
202
+ var HOST_TOKEN_MAX = 64;
203
+ function hostToken(value) {
204
+ return value.replace(/[^A-Za-z0-9._~+-]/g, "-").slice(0, HOST_TOKEN_MAX);
205
+ }
206
+ function userAgent(host) {
207
+ const base = `${SERVER_NAME}-mcp/${SERVER_VERSION}`;
208
+ const name = hostToken(host?.name ?? "");
209
+ if (!name) return base;
210
+ const version = hostToken(host?.version ?? "");
211
+ return version ? `${base} (${name}/${version})` : `${base} (${name})`;
212
+ }
202
213
  var READ_TIMEOUT_MS = 6e5;
203
214
  var SkeletiqClient = class {
204
215
  config;
216
+ hostSource;
205
217
  constructor(config) {
206
218
  this.config = config;
207
219
  }
220
+ /** Where to read the connected host's name and version from, for the User-Agent. */
221
+ setHostSource(source) {
222
+ this.hostSource = source;
223
+ }
208
224
  /** A parsed JSON response, or a thrown `SkeletiqApiError` carrying the server's own words. */
209
225
  async request(path2, options = {}) {
210
226
  const response = await this.fetch(path2, options);
@@ -223,7 +239,7 @@ var SkeletiqClient = class {
223
239
  headers: {
224
240
  Authorization: `Bearer ${this.config.apiKey}`,
225
241
  Accept: "application/json",
226
- "User-Agent": `${SERVER_NAME}-mcp/${SERVER_VERSION}`,
242
+ "User-Agent": userAgent(this.hostSource?.()),
227
243
  ...options.body === void 0 ? {} : { "Content-Type": "application/json" },
228
244
  ...options.headers
229
245
  },
@@ -2839,6 +2855,7 @@ function buildServer(client, resolver) {
2839
2855
  { name: SERVER_NAME, version: SERVER_VERSION },
2840
2856
  { instructions: INSTRUCTIONS, capabilities: { tools: {} } }
2841
2857
  );
2858
+ client.setHostSource(() => server.server.getClientVersion());
2842
2859
  registerListProjects(server, resolver);
2843
2860
  registerGetDesign(server, client, resolver);
2844
2861
  registerGenerate(server, client, resolver);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skeletiq/mcp",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Design in SkeletIQ, build with your coding agent. MCP server for the SkeletIQ architecture platform.",
5
5
  "license": "MIT",
6
6
  "author": "Sabhahith Works Private Limited",