@hasna/mcps 0.0.15 → 0.0.17
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 +41 -0
- package/bin/index.js +842 -118
- package/bin/mcp.js +657 -67
- package/dist/index.d.ts +3 -2
- package/dist/index.js +678 -71
- package/dist/lib/credentials.d.ts +18 -0
- package/dist/lib/registry.d.ts +4 -2
- package/dist/mcp/index.js +657 -67
- package/dist/types.d.ts +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CredentialReference, CredentialReferenceMap, McpServerEntry } from "../types.js";
|
|
2
|
+
export declare class CredentialReferenceError extends Error {
|
|
3
|
+
constructor(message: string);
|
|
4
|
+
}
|
|
5
|
+
export declare const REDACTED_CREDENTIAL_VALUE = "<redacted>";
|
|
6
|
+
export declare function isSecretLikeEnvKey(key: string): boolean;
|
|
7
|
+
export declare function isSecretLikeValue(value: string): boolean;
|
|
8
|
+
export declare function normalizeCredentialRef(ref: CredentialReference): CredentialReference;
|
|
9
|
+
export declare function normalizeCredentialRefs(refs: CredentialReferenceMap | undefined): CredentialReferenceMap;
|
|
10
|
+
export declare function parseCredentialRefs(value: unknown): CredentialReferenceMap;
|
|
11
|
+
export declare function normalizeLiteralEnv(env: Record<string, string> | undefined): Record<string, string>;
|
|
12
|
+
export declare function redactEnv(env: Record<string, string>): Record<string, string>;
|
|
13
|
+
export declare function redactServerCredentials<T extends {
|
|
14
|
+
env: Record<string, string>;
|
|
15
|
+
credentialRefs?: CredentialReferenceMap;
|
|
16
|
+
}>(server: T): T;
|
|
17
|
+
export declare function resolveServerEnv(server: McpServerEntry): Record<string, string>;
|
|
18
|
+
export declare function credentialRefPlaceholders(refs: CredentialReferenceMap | undefined): Record<string, string>;
|
package/dist/lib/registry.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import type { McpServerEntry, AddServerOptions } from "../types.js";
|
|
1
|
+
import type { CredentialReference, McpServerEntry, AddServerOptions } from "../types.js";
|
|
2
2
|
export declare function addServer(opts: AddServerOptions): McpServerEntry;
|
|
3
3
|
export declare function removeServer(id: string): void;
|
|
4
4
|
export declare function listServers(): McpServerEntry[];
|
|
5
5
|
export declare function getServer(id: string): McpServerEntry | null;
|
|
6
|
-
export declare function updateServer(id: string, updates: Partial<Pick<McpServerEntry, "name" | "description" | "command" | "args" | "env" | "transport" | "url" | "enabled">>): McpServerEntry;
|
|
6
|
+
export declare function updateServer(id: string, updates: Partial<Pick<McpServerEntry, "name" | "description" | "command" | "args" | "env" | "credentialRefs" | "transport" | "url" | "enabled">>): McpServerEntry;
|
|
7
7
|
export declare function enableServer(id: string): McpServerEntry;
|
|
8
8
|
export declare function disableServer(id: string): McpServerEntry;
|
|
9
9
|
export declare function setServerEnv(id: string, key: string, value: string): void;
|
|
10
10
|
export declare function unsetServerEnv(id: string, key: string): void;
|
|
11
|
+
export declare function setServerCredentialRef(id: string, key: string, ref: CredentialReference): void;
|
|
12
|
+
export declare function unsetServerCredentialRef(id: string, key: string): void;
|
|
11
13
|
export declare function cacheTools(serverId: string, tools: Array<{
|
|
12
14
|
name: string;
|
|
13
15
|
description: string;
|