@mafdet/mcp 1.4.40 → 1.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/index.js +1 -1
- package/dist/tools.js +10 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ export function buildServer(config = loadConfig()) {
|
|
|
15
15
|
const server = new McpServer({ name: "mafdet-mcp", version });
|
|
16
16
|
server.registerTool("list_models", {
|
|
17
17
|
title: "List Mafdet AI models",
|
|
18
|
-
description: "List the models available on Mafdet AI with provider, tier, and
|
|
18
|
+
description: "List the models available on Mafdet AI with provider, tier, and pricing by modality and unit (tokens, images, seconds). No API key required.",
|
|
19
19
|
inputSchema: {
|
|
20
20
|
provider: z.string().min(1).max(40).optional(),
|
|
21
21
|
tier: z.string().min(1).max(40).optional(),
|
package/dist/tools.js
CHANGED
|
@@ -50,6 +50,9 @@ export async function listModels(config, args = {}) {
|
|
|
50
50
|
.filter((m) => !tier || String(m.accessTier).toLowerCase() === tier)
|
|
51
51
|
.map((m) => ({
|
|
52
52
|
model_id: m.modelId,
|
|
53
|
+
price_dimensions: Array.isArray(m.priceDimensions)
|
|
54
|
+
? m.priceDimensions
|
|
55
|
+
: [],
|
|
53
56
|
display_name: m.displayName,
|
|
54
57
|
description: typeof m.description === "string" ? m.description : "",
|
|
55
58
|
provider: m.provider,
|
|
@@ -81,7 +84,13 @@ export async function listModels(config, args = {}) {
|
|
|
81
84
|
`${stage ? ` [${stage[1].toLowerCase()}]` : ""}` +
|
|
82
85
|
`${m.trial ? " [trial]" : ""}${m.deprecated ? " [deprecated]" : ""}` +
|
|
83
86
|
`${m.output_modalities.includes("IMAGE") ? " [image-out]" : ""}` +
|
|
84
|
-
` —
|
|
87
|
+
` — ${m.price_dimensions.length
|
|
88
|
+
? m.price_dimensions
|
|
89
|
+
.map((p) => `${p.dimension.toLowerCase().replaceAll("_", " ")}: ${money(p.sellPriceMicroUsd)}/${p.unit}`)
|
|
90
|
+
.join(", ")
|
|
91
|
+
: m.api_surface === "CHAT_COMPLETIONS"
|
|
92
|
+
? `in ${money(m.input_per_1m_micro_usd)}/1M, out ${money(m.output_per_1m_micro_usd)}/1M`
|
|
93
|
+
: "pricing unavailable; see model documentation"}, ctx ${m.context_length}` +
|
|
85
94
|
`${m.description ? ` — ${m.description.replace(/[\r\n]+/g, " ")}` : ""}`);
|
|
86
95
|
});
|
|
87
96
|
return ok(`Mafdet AI models (${models.length}):\n${lines.join("\n")}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mafdet/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
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",
|