@hasna/shortlinks 0.1.22 → 0.1.24

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.
@@ -0,0 +1,16 @@
1
+ import type { Server } from "@modelcontextprotocol/sdk/server/index.js";
2
+ export declare const MCP_HTTP_SERVICE_NAME = "shortlinks";
3
+ export declare const DEFAULT_MCP_HTTP_PORT = 8851;
4
+ export declare function isHttpMode(argv?: string[], env?: NodeJS.ProcessEnv): boolean;
5
+ export declare function isStdioMode(argv?: string[], env?: NodeJS.ProcessEnv): boolean;
6
+ export declare function resolveMcpHttpPort(argv?: string[], env?: NodeJS.ProcessEnv): number;
7
+ export type McpHttpServerHandle = {
8
+ port: number;
9
+ host: string;
10
+ close: () => Promise<void>;
11
+ };
12
+ export declare function startMcpHttpServer(buildServer: () => Server, options?: {
13
+ port?: number;
14
+ host?: string;
15
+ serviceName?: string;
16
+ }): Promise<McpHttpServerHandle>;
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * `shortlinks-mcp` — Model Context Protocol server exposing the shortlinks core
4
+ * operations (domains, links, click stats) to AI agents.
5
+ *
6
+ * Transports:
7
+ * shortlinks-mcp stdio (default; for editor/agent clients)
8
+ * shortlinks-mcp --http Streamable HTTP on 127.0.0.1:8851 (shared service)
9
+ *
10
+ * Store mode follows HASNA_SHORTLINKS_STORE (local SQLite | postgres). In
11
+ * postgres mode it reads/writes RDS directly (Amendment A1).
12
+ */
13
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
14
+ export declare function buildServer(): Server;