@getsnare/mcp 0.1.0 → 0.1.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
@@ -4,7 +4,7 @@ Snare's MCP server. Point any MCP client at it to read and act on issues, events
4
4
 
5
5
  ## Install
6
6
 
7
- You need a Snare token. Make one at [snare.dev/settings/api-tokens](https://snare.dev/settings/api-tokens).
7
+ You need a Snare token. Make one at [getsnare.tech/settings/api-tokens](https://getsnare.tech/settings/api-tokens).
8
8
 
9
9
  ### Claude Code
10
10
 
@@ -33,7 +33,7 @@ Add this to the client's MCP config file:
33
33
  For clients that take a URL instead of a command:
34
34
 
35
35
  ```
36
- https://snare.dev/api/mcp
36
+ https://getsnare.tech/api/mcp
37
37
  ```
38
38
 
39
39
  Send the token as `Authorization: Bearer snr_...`.
@@ -90,7 +90,7 @@ Snare Lite and investigations do not run locally yet. Use `launch_snare` for tho
90
90
  | --- | --- |
91
91
  | `SNARE_API_TOKEN` | required |
92
92
  | `SNARE_MCP_TOOLSETS` | `all` |
93
- | `SNARE_BASE_URL` | `https://snare.dev/api/v1` |
93
+ | `SNARE_BASE_URL` | `https://getsnare.tech/api/v1` |
94
94
  | `SNARE_DASHBOARD_URL` | derived from `SNARE_BASE_URL` |
95
95
 
96
96
  Each has a command-line equivalent (`--token`, `--toolsets`, `--base-url`, `--dashboard-url`) which takes precedence.
File without changes
@@ -20,8 +20,8 @@ export interface McpConfig {
20
20
  /** Where a person opens what a tool is describing. */
21
21
  dashboardUrl: string;
22
22
  }
23
- export declare const DEFAULT_BASE_URL = "https://snare.dev/api/v1";
24
- export declare const DEFAULT_DASHBOARD_URL = "https://snare.dev";
23
+ export declare const DEFAULT_BASE_URL = "https://getsnare.tech/api/v1";
24
+ export declare const DEFAULT_DASHBOARD_URL = "https://getsnare.tech";
25
25
  /**
26
26
  * How long a call may take.
27
27
  *
@@ -1,6 +1,6 @@
1
1
  import { TOOLSETS } from "./toolsets.js";
2
- export const DEFAULT_BASE_URL = "https://snare.dev/api/v1";
3
- export const DEFAULT_DASHBOARD_URL = "https://snare.dev";
2
+ export const DEFAULT_BASE_URL = "https://getsnare.tech/api/v1";
3
+ export const DEFAULT_DASHBOARD_URL = "https://getsnare.tech";
4
4
  /**
5
5
  * How long a call may take.
6
6
  *
@@ -28,7 +28,7 @@ export class ConfigError extends Error {
28
28
  export function buildConfig(input) {
29
29
  const token = input.token?.trim();
30
30
  if (!token) {
31
- throw new ConfigError("No Snare token. Set SNARE_API_TOKEN to a token from https://snare.dev/settings/api-tokens.");
31
+ throw new ConfigError("No Snare token. Set SNARE_API_TOKEN to a token from https://getsnare.tech/settings/api-tokens.");
32
32
  }
33
33
  if (!token.startsWith("snr_")) {
34
34
  // Caught here rather than at the first 401, because "that token is not
@@ -1,5 +1,16 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import type { McpConfig } from "./config.js";
3
+ /**
4
+ * What this server calls itself over the protocol.
5
+ *
6
+ * A LITERAL, AND A TEST THAT IT MATCHES `package.json`. Reading the manifest at
7
+ * runtime would need a path that is right from `src/` and from `dist/src/` and
8
+ * from whatever a bundler does to it, which is three ways to ship a server that
9
+ * cannot start. So the number is written twice and `server.test.ts` fails if the
10
+ * two ever disagree — the drift is caught where it is cheap rather than in a
11
+ * client's handshake, which is the only place it would otherwise show.
12
+ */
13
+ export declare const SERVER_VERSION = "0.1.1";
3
14
  /** What the token turned out to be, learned once at startup. */
4
15
  export interface Identity {
5
16
  scopes: string[];
@@ -5,6 +5,17 @@ import { PROMPTS } from "./prompts.js";
5
5
  import { missingScopes, resolveTools } from "./registry.js";
6
6
  import { TOOLSET_SUMMARY, TOOLSETS } from "./toolsets.js";
7
7
  import { ALL_TOOLS } from "./tools/index.js";
8
+ /**
9
+ * What this server calls itself over the protocol.
10
+ *
11
+ * A LITERAL, AND A TEST THAT IT MATCHES `package.json`. Reading the manifest at
12
+ * runtime would need a path that is right from `src/` and from `dist/src/` and
13
+ * from whatever a bundler does to it, which is three ways to ship a server that
14
+ * cannot start. So the number is written twice and `server.test.ts` fails if the
15
+ * two ever disagree — the drift is caught where it is cheap rather than in a
16
+ * client's handshake, which is the only place it would otherwise show.
17
+ */
18
+ export const SERVER_VERSION = "0.1.1";
8
19
  /**
9
20
  * Why the server could not be built.
10
21
  *
@@ -58,7 +69,7 @@ export async function createSnareMcpServer(config, fetchImpl) {
58
69
  }
59
70
  const tools = resolveTools(ALL_TOOLS, config.toolsets, identity.scopes);
60
71
  const missing = missingScopes(ALL_TOOLS, config.toolsets, identity.scopes);
61
- const server = new McpServer({ name: "snare", version: "0.1.0" }, { instructions: instructionsFor(identity, config, tools.length, missing) });
72
+ const server = new McpServer({ name: "snare", version: SERVER_VERSION }, { instructions: instructionsFor(identity, config, tools.length, missing) });
62
73
  for (const def of tools) {
63
74
  server.registerTool(def.name, {
64
75
  title: def.title,
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@getsnare/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Model Context Protocol server for Snare. Read and act on issues, events, traces and fix runs from any MCP client, and run a Snare on your own machine.",
5
- "homepage": "https://snare.dev",
5
+ "homepage": "https://getsnare.tech",
6
6
  "license": "MIT",
7
7
  "keywords": [
8
8
  "snare",