mcp-google-map 0.4.0 → 0.5.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/cli.d.ts CHANGED
@@ -1,5 +1,69 @@
1
1
  #!/usr/bin/env node
2
- declare function startServer(port?: number, apiKey?: string, host?: string): Promise<void>;
2
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
+ import { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
4
+ import { ToolAnnotations } from '@modelcontextprotocol/sdk/types.js';
5
+ import { z } from 'zod';
6
+
7
+ interface ToolConfig {
8
+ name: string;
9
+ description: string;
10
+ schema: Record<string, z.ZodTypeAny>;
11
+ annotations?: ToolAnnotations;
12
+ action: (params: any) => Promise<any>;
13
+ }
14
+ declare class BaseMcpServer {
15
+ protected readonly server: McpServer;
16
+ private sessions;
17
+ private httpServer;
18
+ private serverName;
19
+ private tools;
20
+ constructor(name: string, tools: ToolConfig[]);
21
+ private createMcpServer;
22
+ connect(transport: Transport): Promise<void>;
23
+ startHttpServer(port: number, host?: string): Promise<void>;
24
+ startStdio(): Promise<void>;
25
+ stopHttpServer(): Promise<void>;
26
+ }
27
+
28
+ type RuntimeConfigSource = "flag" | "environment" | "default";
29
+ interface ResolvedRuntimeConfig {
30
+ apiKey: string | undefined;
31
+ apiKeySource: "flag" | "environment" | "none";
32
+ host: string;
33
+ hostSource: RuntimeConfigSource;
34
+ port: number | undefined;
35
+ portRaw: string | undefined;
36
+ portSource: RuntimeConfigSource;
37
+ enabledToolsRaw: string | undefined;
38
+ enabledToolsSource: RuntimeConfigSource;
39
+ autoUpdateDisabled: boolean;
40
+ envFile: string | undefined;
41
+ }
42
+
43
+ type SnippetClient = "generic" | "claude" | "cursor" | "pi";
44
+ type SnippetTransport = "stdio" | "http";
45
+ type SnippetLauncher = "npx" | "node" | "bin";
46
+ interface SnippetOptions {
47
+ client?: SnippetClient;
48
+ transport?: SnippetTransport;
49
+ launcher?: SnippetLauncher;
50
+ commandPath?: string;
51
+ host?: string;
52
+ port?: number;
53
+ envKey?: string;
54
+ serverName?: string;
55
+ }
56
+
57
+ declare function extractEnvFileOption(argv: readonly string[]): string | undefined;
58
+ interface ServerStartupOutcome {
59
+ started: number;
60
+ failed: number;
61
+ servers: BaseMcpServer[];
62
+ }
63
+ declare function startServer(port?: number, apiKey?: string, host?: string): Promise<ServerStartupOutcome>;
64
+ type ShutdownExitHook = (code: number) => void;
65
+ declare function createShutdownHandler(servers: readonly BaseMcpServer[], exitHook?: ShutdownExitHook): (signal: string) => Promise<void>;
66
+ declare function installShutdownHandlers(servers: readonly BaseMcpServer[]): void;
3
67
  declare const EXEC_TOOLS: readonly ["geocode", "reverse-geocode", "search-nearby", "search-places", "place-details", "directions", "distance-matrix", "elevation", "timezone", "weather", "explore-area", "plan-route", "compare-places", "air-quality", "static-map", "batch-geocode-tool", "search-along-route", "local-rank-tracker"];
4
68
  interface ExecOutput {
5
69
  write(chunk: string): unknown;
@@ -23,6 +87,67 @@ type DoctorReport = {
23
87
  type DoctorToolRunner = (toolName: string, params: any, apiKey: string) => Promise<unknown>;
24
88
  declare function execTool(toolName: string, params: any, apiKey: string): Promise<any>;
25
89
  declare function runExecCommand(toolName: string, params: any, apiKey: string, runner?: ExecToolRunner, streams?: ExecStreams): Promise<number>;
26
- declare function runDoctor(packageVersion: string, apiKey: string | undefined, live?: boolean, runner?: DoctorToolRunner): Promise<DoctorReport>;
90
+ type DoctorProbeId = "geocoding" | "places-new" | "routes";
91
+ interface DoctorLiveProbe {
92
+ readonly id: DoctorProbeId;
93
+ readonly name: string;
94
+ readonly tool: string;
95
+ readonly params: Record<string, unknown>;
96
+ }
97
+ declare const DOCTOR_PROBES: readonly DoctorLiveProbe[];
98
+ interface DoctorProbesParseResult {
99
+ probes: DoctorProbeId[] | undefined;
100
+ error?: string;
101
+ }
102
+ declare function parseDoctorProbes(raw: string | undefined): DoctorProbesParseResult;
103
+ interface DoctorOptions {
104
+ probes?: readonly DoctorProbeId[];
105
+ nodeVersion?: string;
106
+ config?: ResolvedRuntimeConfig;
107
+ allToolNames?: readonly string[];
108
+ }
109
+ declare function runDoctor(packageVersion: string, apiKey: string | undefined, live?: boolean, runner?: DoctorToolRunner, options?: DoctorOptions): Promise<DoctorReport>;
110
+ interface SetupCheck {
111
+ name: string;
112
+ status: "pass" | "fail" | "skip";
113
+ detail: string;
114
+ }
115
+ interface SetupReport {
116
+ success: boolean;
117
+ created: boolean;
118
+ checks: SetupCheck[];
119
+ }
120
+ interface SetupFs {
121
+ existsSync(path: string): boolean;
122
+ readFileSync(path: string, encoding: "utf-8"): string;
123
+ writeFileSync(path: string, data: string, encoding: "utf-8"): void;
124
+ }
125
+ interface SetupDeps {
126
+ nodeVersion?: string;
127
+ config?: ResolvedRuntimeConfig;
128
+ fs?: SetupFs;
129
+ }
130
+ interface SetupOptions {
131
+ packageDir: string;
132
+ targetDir: string;
133
+ writeEnv: boolean;
134
+ }
135
+ declare function runSetup(options: SetupOptions, deps?: SetupDeps): Promise<SetupReport>;
136
+ declare function runSnippetCommand(options: SnippetOptions, streams?: ExecStreams): number;
137
+ declare function runEnableDisableCliCommand(name: string, enable: boolean, options?: {
138
+ home?: string;
139
+ streams?: ExecStreams;
140
+ }): number;
141
+ declare function runInstallUninstallCommand(operation: "install" | "uninstall", options: {
142
+ home?: string;
143
+ apiKey?: string;
144
+ resourcesRoot: string;
145
+ streams?: ExecStreams;
146
+ }): number;
147
+ declare function runShowCommand(options: {
148
+ home?: string;
149
+ resourcesRoot: string;
150
+ streams?: ExecStreams;
151
+ }): number;
27
152
 
28
- export { type DoctorCheck, type DoctorReport, EXEC_TOOLS, execTool, runDoctor, runExecCommand, startServer };
153
+ export { DOCTOR_PROBES, type DoctorCheck, type DoctorLiveProbe, type DoctorOptions, type DoctorProbeId, type DoctorProbesParseResult, type DoctorReport, EXEC_TOOLS, type ServerStartupOutcome, type SetupCheck, type SetupDeps, type SetupFs, type SetupOptions, type SetupReport, type ShutdownExitHook, createShutdownHandler, execTool, extractEnvFileOption, installShutdownHandlers, parseDoctorProbes, runDoctor, runEnableDisableCliCommand, runExecCommand, runInstallUninstallCommand, runSetup, runShowCommand, runSnippetCommand, startServer };