smithery-mcp-deployment

67
0
Source

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

Install

mkdir -p .claude/skills/smithery-mcp-deployment && curl -L -o skill.zip "https://mcp.directory/api/skills/download/414" && unzip -o skill.zip -d .claude/skills/smithery-mcp-deployment && rm skill.zip

Installs to .claude/skills/smithery-mcp-deployment

About this skill

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:

  • inputSchema in tools
  • outputSchema in tools
  • argsSchema in prompts

Quality Scoring (90/100 Optimal)

FeaturePointsHow to Achieve
Tools with descriptions25Detailed 2-4 sentence descriptions
Tool annotations20Add inside config object (not 4th param)
Optional config15All fields optional or with defaults
Workflow prompts15Create 3-5 workflow prompts
Icon10Add icon.svg to repository root
Documentation5Comprehensive 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

SymptomCauseFix
"0/0 tools"Using z.object()Use plain objects for schemas
"9/16 parameters".optional()/.default() on schemaRemove modifiers, handle in handler
No annotationsWrong placementPut inside config object, not 4th param
Score stuck at 43Schema + annotationsFix both issues
Icon not showingWrong locationPlace icon.svg in repo root
TS error: request.paramsOld handler patternUse async (args) => not async (request) =>
TS error: prompt argsSchemaNon-string typesUse only z.string().optional()
Deployment failsconfigSchema in yamlRemove from yaml for TypeScript runtime

Detailed Documentation

For comprehensive guides, see:

Path to 90/100 Checklist

  1. Use plain object schemas (not z.object())
  2. Remove .optional()/.default() from schemas (handle in handler)
  3. Add comprehensive tool descriptions (2-4 sentences)
  4. Include annotations in all tools (inside config object)
  5. Create 3-5 workflow prompts (use z.string().optional() for args)
  6. Add icon.svg to repository root
  7. Make all config optional or with defaults
  8. Export configSchema from index.ts
  9. Remove configSchema from smithery.yaml (for TypeScript)
  10. Lint with npx tsc --noEmit before building
  11. Test locally with MCP Inspector

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

270785

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

203415

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

196279

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

208231

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

167197

rust-coding-skill

UtakataKyosui

Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.

164173

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.