smithery-mcp-deployment
БесплатноБез исполняемых скриптовНе проверенBest practices for creating, optimizing, and deploying MCP servers to Smithery. Use this skill when: (1) Creating new MCP servers for Smithery deployment (2)…
Об этом скилле
Smithery MCP Deployment Best Practices
Documentation Resources
Before implementing MCP features or troubleshooting issues, consult the official MCP specification:
Use the context7 tool to look up current MCP documentation:
- Primary resource:
https://context7.com/websites/modelcontextprotocol_io_specification - This provides the authoritative MCP specification for tools, prompts, resources, and protocol details
Critical: Schema Format (Most Common Issue)
The #1 cause of deployment failures is incorrect schema format. Smithery expects plain objects with Zod properties, NOT z.object() wrappers.
// WRONG - Results in "0/0 tools"
inputSchema: z.object({
param: z.string()
}).strict()
// CORRECT - Tools will be detected
inputSchema: {
param: z.string()
}
This applies to:
inputSchemain toolsoutputSchemain toolsargsSchemain prompts
Quality Scoring (90/100 Optimal)
| Feature | Points | How to Achieve |
|---|---|---|
| Tools with descriptions | 25 | Detailed 2-4 sentence descriptions |
| Tool annotations | 20 | Add inside config object (not 4th param) |
| Optional config | 15 | All fields optional or with defaults |
| Workflow prompts | 15 | Create 3-5 workflow prompts |
| Icon | 10 | Add icon.svg to repository root |
| Documentation | 5 | Comprehensive README |
Note: "Optional Config" (15pts) and "Config Schema" (10pts) are mutually exclusive. Optional is better UX and higher points.
Tool Registration Template
server.registerTool(
'tool_name',
{
title: 'Action-Oriented Title',
description: 'Clear 2-4 sentence description. Start with action verb. ' +
'Explain behavior (async/blocking). Mention related tools.',
inputSchema: {
param: z.string()
.describe('Specific description with examples (e.g., foo, bar)')
},
outputSchema: {
result: z.string()
},
annotations: { // Inside config object!
readOnlyHint: true, // Only reads data?
destructiveHint: false, // Deletes/destroys data?
idempotentHint: true, // Same input = same result?
openWorldHint: false // Deterministic results?
}
},
async (args) => {
// Args passed directly (not request.params.arguments)
return {
content: [{
type: 'text',
text: JSON.stringify(result, null, 2)
}]
};
}
);
Workflow Prompt Template
server.registerPrompt(
'workflow-name',
{
title: 'Workflow Title',
description: 'End-to-end workflow description',
argsSchema: { // Plain object, not z.object()!
// IMPORTANT: Only z.string() types supported
param: z.string().describe('Parameter description').optional()
}
},
async (args) => ({
messages: [{
role: 'user',
content: {
type: 'text',
text: `Multi-step workflow instructions...`
}
}]
})
);
Configuration Setup
src/types.ts:
export const configSchema = z.object({
apiToken: z.string().optional()
.describe("Token (or use API_TOKEN env var)"),
format: z.enum(["json", "markdown"]).default("markdown")
});
export type Config = z.infer<typeof configSchema>;
src/index.ts:
export { configSchema }; // Must export!
export default function createServer(config?: Config) {
const server = new McpServer({ name: 'your-server', version: '1.0.0' });
return server;
}
smithery.yaml (TypeScript runtime):
runtime: "typescript"
# Do NOT include configSchema - auto-detected from TypeScript export
Project Structure
your-mcp-server/
├── icon.svg <- REQUIRED for 10 points!
├── package.json
├── smithery.yaml
├── tsconfig.json
├── src/
│ ├── index.ts <- Export createServer & configSchema
│ ├── types.ts <- Define configSchema
│ ├── tools/ <- Tool implementations
│ ├── prompts/ <- Workflow prompts
│ └── resources/ <- Documentation resources
Testing Before Deployment
# 1. Lint TypeScript
npx tsc --noEmit
# 2. Build with Smithery
npm run build
# Look for: "Config schema: N fields (M required)"
# 3. Test with MCP Inspector
npx @modelcontextprotocol/inspector dist/index.js
# 4. Verify in Inspector:
# - tools/list shows all tools with annotations
# - prompts/list shows all prompts
# - Try calling each tool
Common Issues Quick Reference
| Symptom | Cause | Fix |
|---|---|---|
| "0/0 tools" | Using z.object() |
Use plain objects for schemas |
| "9/16 parameters" | .optional()/.default() on schema |
Remove modifiers, handle in handler |
| No annotations | Wrong placement | Put inside config object, not 4th param |
| Score stuck at 43 | Schema + annotations | Fix both issues |
| Icon not showing | Wrong location | Place icon.svg in repo root |
TS error: request.params |
Old handler patt |
Установить smithery-mcp-deployment в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл smithery-mcp-deployment?
Best practices for creating, optimizing, and deploying MCP servers to Smithery. Use this skill when: (1) Creating new MCP servers for Smithery deployment (2) Optimizing quality scores (achieving 90/100) (3) Troubleshooting deployment issues (0/0 tools, missing annotations, low scores) (4) Migrating existing MCP servers to Smithery format (5) Understanding Smithery's schema format requirements (6) Adding workflow prompts, tool annotations, or documentation resources (7) Configuring smithery.yaml and package.json for deployment
Как установить скилл smithery-mcp-deployment?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл smithery-mcp-deployment запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic