@mafdet/mcp 0.1.2 → 0.1.4

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
@@ -8,6 +8,19 @@ It does **not** run model inference — you keep calling Mafdet AI models throug
8
8
  each tool's normal OpenAI-compatible endpoint. This server only exposes
9
9
  read-only account and documentation helpers.
10
10
 
11
+ ## What Mafdet AI is
12
+
13
+ Mafdet AI is an OpenAI-compatible AI gateway: one API key and one base URL reach
14
+ models from several providers, billed by usage. Any tool or SDK that speaks the
15
+ OpenAI API works by pointing its base URL and key at Mafdet AI.
16
+
17
+ - Base URL: `https://api.mafdet.ai/v1`
18
+ - Endpoints: `/chat/completions`, `/embeddings`, `/audio/speech`
19
+ - Providers: Google (Gemini), Kimi (Moonshot), Qwen, DeepSeek
20
+ - 30 models as of August 2026. The catalogue changes, so the authoritative list
21
+ with current prices is [`models.json`](https://docs.mafdet.ai/models.json)
22
+ - Docs: <https://docs.mafdet.ai>
23
+
11
24
  ## Tools
12
25
 
13
26
  | Tool | Needs a key | What it does |
package/dist/client.d.ts CHANGED
@@ -12,4 +12,3 @@ interface GetJsonOptions {
12
12
  }
13
13
  export declare function getJson(options: GetJsonOptions): Promise<unknown>;
14
14
  export {};
15
- //# sourceMappingURL=client.d.ts.map
package/dist/config.d.ts CHANGED
@@ -4,4 +4,3 @@ export interface McpConfig {
4
4
  docsUrl: string;
5
5
  }
6
6
  export declare function loadConfig(env?: NodeJS.ProcessEnv): McpConfig;
7
- //# sourceMappingURL=config.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
  export declare function buildServer(config?: import("./config.js").McpConfig): McpServer;
4
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import { getBalance, getSubscription, getUsageSummary, listModels, searchDocsToo
11
11
  // it); everything diagnostic goes to stderr via logError. The five tools are
12
12
  // read-only; account tools need MAFDET_API_KEY, the two public tools do not.
13
13
  export function buildServer(config = loadConfig()) {
14
- const server = new McpServer({ name: "mafdet-mcp", version: "0.1.2" });
14
+ const server = new McpServer({ name: "mafdet-mcp", version: "0.1.3" });
15
15
  server.registerTool("list_models", {
16
16
  title: "List Mafdet AI models",
17
17
  description: "List the models available on Mafdet AI with provider, tier, and per-1M-token pricing. No API key required.",
package/dist/logger.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  export declare function redact(message: string): string;
2
2
  export declare function logError(message: string): void;
3
- //# sourceMappingURL=logger.d.ts.map
@@ -10,4 +10,3 @@ export declare function searchDocs(input: {
10
10
  docsBaseForUrl?: string;
11
11
  }): Promise<DocHit[]>;
12
12
  export declare function resetDocsCache(): void;
13
- //# sourceMappingURL=search-docs.d.ts.map
package/dist/tools.d.ts CHANGED
@@ -21,4 +21,3 @@ export declare function searchDocsTool(config: McpConfig, args: {
21
21
  query: string;
22
22
  limit?: number;
23
23
  }): Promise<ToolResult>;
24
- //# sourceMappingURL=tools.d.ts.map
package/dist/tools.js CHANGED
@@ -53,6 +53,14 @@ export async function listModels(config, args = {}) {
53
53
  display_name: m.displayName,
54
54
  provider: m.provider,
55
55
  tier: m.accessTier,
56
+ // GEMMOD-003: endpoint + content modalities (additive; defaults when absent).
57
+ api_surface: m.apiSurface ?? "CHAT_COMPLETIONS",
58
+ input_modalities: Array.isArray(m.inputModalities)
59
+ ? m.inputModalities
60
+ : ["TEXT"],
61
+ output_modalities: Array.isArray(m.outputModalities)
62
+ ? m.outputModalities
63
+ : ["TEXT"],
56
64
  input_per_1m_micro_usd: String(m.inputPricePer1mMicroUsd ?? "0"),
57
65
  output_per_1m_micro_usd: String(m.outputPricePer1mMicroUsd ?? "0"),
58
66
  context_length: m.contextLength,
@@ -64,6 +72,7 @@ export async function listModels(config, args = {}) {
64
72
  }
65
73
  const lines = models.map((m) => `- ${m.model_id} (${m.provider}, ${m.tier})` +
66
74
  `${m.trial ? " [trial]" : ""}${m.deprecated ? " [deprecated]" : ""}` +
75
+ `${m.output_modalities.includes("IMAGE") ? " [image-out]" : ""}` +
67
76
  ` — in ${money(m.input_per_1m_micro_usd)}/1M, out ${money(m.output_per_1m_micro_usd)}/1M, ctx ${m.context_length}`);
68
77
  return ok(`Mafdet AI models (${models.length}):\n${lines.join("\n")}`);
69
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mafdet/mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Mafdet AI MCP server — read-only account tools (models, balance, usage, subscription, docs) for Claude Code, Cursor, Codex, OpenCode, and Claude Desktop.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,eAAe,GACvB,cAAc,GACd,WAAW,GACX,cAAc,GACd,aAAa,GACb,SAAS,GACT,cAAc,CAAC;AAEnB,qBAAa,iBAAkB,SAAQ,KAAK;aAExB,IAAI,EAAE,eAAe;gBAArB,IAAI,EAAE,eAAe,EACrC,OAAO,EAAE,MAAM;CAKlB;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IAEpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAkDvE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AA4BD,wBAAgB,UAAU,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,SAAS,CAO1E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAgBpE,wBAAgB,WAAW,CAAC,MAAM,kCAAe,GAAG,SAAS,CAmE5D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAOA,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAI9C;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE9C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-docs.d.ts","sourceRoot":"","sources":["../src/search-docs.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAuCD,wBAAsB,UAAU,CAAC,KAAK,EAAE;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA0BpB;AAGD,wBAAgB,cAAc,IAAI,IAAI,CAErC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAW7C,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,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