How smithery-ai/sdk works
Project type and purpose
• This is a multi-language SDK project (“Smithery SDK”) that provides both TypeScript and Python libraries to build, deploy, and interact with Model Context Protocol (MCP) servers.
• The TypeScript side is split into two NPM packages:
• “@smithery/registry” — a generated client library for discovering and calling MCP servers via an OpenAPI registry.
• “@smithery/sdk” — a toolkit to build and deploy MCP servers (includes client integrations, server runtimes, and shared utilities).
• The Python side is a PyPI package (“smithery”) offering a CLI, decorators, server support (FastMCP), plus a “scaffold” subproject for a hello_world MCP server template.
File structure
• Top-level:
• .github/workflows: CI/CD pipelines for publishing Python & TypeScript packages and generating SDKs from the OpenAPI spec.
• openapi/registry.yaml: the OpenAPI specification driving client codegen.
• python/: contains the Python SDK. Under python/src: smithery core modules (cli, server, utils). Under python/scaffold: a sample server template.
• typescript/registry/: generated TS client code, docs, examples, and tests for the registry package.
• typescript/sdk/: the TS SDK implementation—client integrators (OpenAI, Anthropic), transport layer, server abstractions (stateful, stateless), shared config & patches.
• Patterns:
• Code generation from OpenAPI → registry client.
• CLI layers call into core libraries.
• Separate runtime modules (client vs. server) under the SDK.
README for additional insights
• The README confirms the split: “Registry” (TypeScript client) and “SDK” (TypeScript & Python toolkits).
• Points to usage documentation in subdirectories.
• Purpose: simplify MCP development & deployment, and registry discovery.