@mushi-mushi/mcp 0.21.0 → 0.22.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/dist/server.d.ts CHANGED
@@ -57,12 +57,25 @@ interface MushiServerConfig {
57
57
  * Explicit values are honoured as given — tests use small ones.
58
58
  */
59
59
  timeoutMs?: number;
60
+ /** Server instructions override — createSetupModeServer uses it. Defaults to MUSHI_SERVER_INSTRUCTIONS. */
61
+ instructions?: string;
62
+ }
63
+ declare function createMushiServer(config: MushiServerConfig): McpServer;
64
+ /** Tools that work before an API key exists: they read only the public docs. */
65
+ declare const SETUP_MODE_TOOLS: readonly ["search_mushi_docs", "get_mushi_doc", "diagnose_setup"];
66
+ interface SetupModeServerConfig {
67
+ version: string;
68
+ /** Why there is no key, as printed to stderr (sources checked, config path). */
69
+ missingKeyReport: string;
70
+ fetch?: typeof fetch;
71
+ timeoutMs?: number;
60
72
  }
61
73
  /**
62
- * Build an MCP server instance pre-wired with every Mushi tool, resource,
63
- * and prompt. Does NOT call `server.connect()` — the caller binds whatever
64
- * transport they need (stdio for the CLI, InMemoryTransport for tests).
74
+ * The server stdio runs when no API key is configured. It used to exit 1, so
75
+ * a registry or directory installer (Smithery, Glama) saw a dead server and
76
+ * an agent saw nothing at all. Setup mode lists the docs tools plus a
77
+ * diagnose_setup that explains how to connect, and makes no API call.
65
78
  */
66
- declare function createMushiServer(config: MushiServerConfig): McpServer;
79
+ declare function createSetupModeServer(config: SetupModeServerConfig): McpServer;
67
80
 
68
- export { MushiApiError, type MushiServerConfig, createMushiServer, resolveTimeoutMsFromEnv };
81
+ export { MushiApiError, type MushiServerConfig, SETUP_MODE_TOOLS, type SetupModeServerConfig, createMushiServer, createSetupModeServer, resolveTimeoutMsFromEnv };