Skip to content

Commit 21eb3fa

Browse files
APIbaseclaude
andcommitted
Fix Smithery optional config and update skill docs
- Change config-schema required from ["apiKey"] to [] for Optional config 15pt - Remove Aviasales/CoinGecko from server description (not yet connected) - Update smithery.yaml with additionalProperties: false - Actualize SKILL.md with quality score breakdown and key files reference Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 67c4749 commit 21eb3fa

File tree

3 files changed

+37
-10
lines changed

3 files changed

+37
-10
lines changed

.claude/skills/smithery/SKILL.md

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,26 @@ Manages the APIbase listing on Smithery.ai — the main MCP server catalog.
2222
| Listing URL | `https://smithery.ai/servers/apibase-pro/api-hub` |
2323
| Gateway URL | `api-hub--apibase-pro.run.tools` |
2424

25+
## Quality Score
26+
27+
Target: 100/100. Score components:
28+
29+
| Category | Max | What earns points |
30+
|----------|-----|-------------------|
31+
| **Tool Quality** | 35 | Tool descriptions, parameter `.describe()`, `annotations`, `title` on all tools |
32+
| **Server Capabilities** | 10 | Prompts (3 registered), Resources (via MCP scan) |
33+
| **Server Metadata** | 30 | Description, Homepage, Icon, Display name |
34+
| **Configuration UX** | 25 | Optional config (`required: []`), Config schema |
35+
36+
Key files for quality score:
37+
- `src/schemas/*.schema.ts``.describe()` on every Zod field → Parameter descriptions
38+
- `src/mcp/tool-adapter.ts``title` + `annotations` on every TOOL_DEFINITIONS entry → Tool names + Annotations
39+
- `src/mcp/prompt-adapter.ts` — 3 workflow prompts → Server Capabilities / Prompts
40+
- `src/mcp/server.ts``SERVER_INFO` (title, description, websiteUrl, icons) + `SERVER_OPTIONS` (instructions, capabilities with prompts) → Server Metadata
41+
- `static/icon.png` — served via nginx at `/icon.png` → Icon
42+
- `smithery.yaml` — config schema with `required: []` → Configuration UX / Optional config
43+
- Smithery Settings UI — Display name, Description (markdown), Homepage, Server Icon upload
44+
2545
## Authentication
2646

2747
Smithery API key required for CLI publish. Stored in `.env`:
@@ -38,29 +58,33 @@ Our server accepts API key via two methods:
3858
- `Authorization: Bearer <key>` (standard, direct connections)
3959
- `apiKey: <key>` header (Smithery gateway forwards this way)
4060

41-
Config schema for Smithery:
61+
Config schema for Smithery (API key is OPTIONAL — auto-registration supported):
4262
```json
4363
{
4464
"type": "object",
4565
"properties": {
4666
"apiKey": {
4767
"type": "string",
48-
"description": "APIbase API key (format: ak_live_...)"
68+
"description": "APIbase API key (ak_live_...). Leave empty for auto-registration."
4969
}
5070
},
51-
"required": ["apiKey"]
71+
"required": []
5272
}
5373
```
5474

75+
IMPORTANT: `required` MUST be `[]` (empty). This is what gives the "Optional config" 15pt in the quality score. APIbase supports auto-registration, so API key is truly optional.
76+
5577
## Publish / Update Workflow
5678

5779
### When to republish
5880

5981
Republish to Smithery after ANY of these changes:
6082
- New provider adapter added (new tools)
6183
- Tools removed or renamed
62-
- Tool schemas changed
84+
- Tool schemas changed (including `.describe()` additions)
6385
- Server version bumped
86+
- Prompts added or changed
87+
- Server metadata updated
6488

6589
### How to republish (CLI)
6690

@@ -72,7 +96,7 @@ source .env
7296
SMITHERY_API_KEY="$SMITHERY_API_KEY" npx @smithery/cli mcp publish \
7397
"https://apibase.pro/mcp" \
7498
-n "apibase-pro/api-hub" \
75-
--config-schema '{"type":"object","properties":{"apiKey":{"type":"string","description":"APIbase API key"}},"required":["apiKey"]}'
99+
--config-schema '{"type":"object","properties":{"apiKey":{"type":"string","description":"APIbase API key (ak_live_...). Leave empty for auto-registration."}},"required":[]}'
76100
```
77101

78102
### How to republish (Web UI fallback)
@@ -90,10 +114,10 @@ SMITHERY_API_KEY="$SMITHERY_API_KEY" npx @smithery/cli mcp publish \
90114
2. Verify MCP endpoint responds: `curl -s -X POST https://apibase.pro/mcp ...`
91115
3. Count current tools from MCP response
92116
4. Check `.env` for `SMITHERY_API_KEY`
93-
5. If key exists: run CLI publish command
117+
5. If key exists: run CLI publish command (with `"required":[]`)
94118
6. If key missing: instruct user to create at smithery.ai/account/api-keys or use web UI
95119
7. Verify publish succeeded
96-
8. Report: tools count, publish status, listing URL
120+
8. Report: tools count, prompts count, publish status, listing URL
97121

98122
### /smithery status
99123

@@ -128,4 +152,6 @@ This key was auto-registered when first connecting to Smithery. Keep it stable
128152
| Smithery scan fails 401 | Check `apiKey` header support in `src/mcp/server.ts` `extractApiKey()` |
129153
| Tool count mismatch | Some tools may lack schemas — check `tool-adapter.ts` registration warnings |
130154
| Publish auth fails | Regenerate API key at smithery.ai/account/api-keys, update `.env` |
131-
| "Method not found" warnings | Expected — we don't serve MCP resources or prompts, only tools |
155+
| "Method not found" warnings | Expected for resources — we serve tools + prompts but not MCP resources |
156+
| Quality score < 100 | Check: all schemas have `.describe()`, all tools have `title` + `annotations`, publish with `required:[]` |
157+
| Optional config 0pt | Ensure publish uses `"required":[]` not `"required":["apiKey"]` |

smithery.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ startCommand:
66
apiKey:
77
type: string
88
title: API Key
9-
description: "APIbase API key (ak_live_...). Leave empty for auto-registration."
9+
description: "APIbase API key (ak_live_...). Leave empty for auto-registration — a new key will be generated automatically."
1010
required: []
11+
additionalProperties: false
1112
deploymentUrl: https://apibase.pro/mcp

src/mcp/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const SERVER_INFO = {
2828
version: '1.0.0',
2929
title: 'APIbase — The API Hub for AI Agents',
3030
description:
31-
'Unified MCP gateway to 56+ tools: flights (Amadeus, Sabre, Aviasales), crypto (CoinGecko), prediction markets (Polymarket), weather, and more. Pay-per-call via x402 micropayments.',
31+
'Unified MCP gateway to 56+ tools: flights (Amadeus, Sabre), prediction markets (Polymarket), weather, and more. New providers added regularly. Pay-per-call via x402 micropayments.',
3232
websiteUrl: 'https://apibase.pro',
3333
icons: [
3434
{

0 commit comments

Comments
 (0)