SDK
Publish an SDK from a generated MCP endpoint
Export a generated SDK bundle, verify its docs and tests, and prepare package publishing without disconnecting it from the hosted MCP endpoint.
Steps
Export the SDK bundle
Use the generated server as the source of truth. The SDK bundle should include reference docs, MCP setup notes, endpoint catalogs, tests, and package scaffolds.
ASTRAIL_SDK_BUNDLE_URL=https://astrail.dev/api/servers/SERVER_ID/sdk \
ASTRAIL_SDK_OUT_DIR=./generated-sdk \
npm run sdk:pullVerify the bundle contents
Before publishing, confirm the generated files exist. Missing docs or endpoint catalogs are a release blocker because future updates become hard to review.
test -f generated-sdk/docs/REFERENCE.md
test -f generated-sdk/docs/MCP.md
test -f generated-sdk/openapi/endpoint-catalog.json
test -f generated-sdk/mcp/manifest.jsonRun package tests
Each target language should have a local smoke path. Start with TypeScript or Python, then add other targets once the endpoint map is stable.
cd generated-sdk/typescript
npm install
ASTRAIL_MCP_ENDPOINT=https://astrail.dev/api/mcp/SERVER_ID npm testPrepare package metadata
Set package name, version, repository, license, and generated-code notice. Keep publish tokens out of generated source and CI logs.
Keep SDK updates reviewable
Use generated update workflows to open PRs instead of silently replacing package code. Review endpoint-map diffs, auth changes, and breaking parameter changes.
Production checks
FAQ
Does a generated SDK replace hosted MCP?
No. Hosted MCP is the runtime endpoint. The SDK is the owned package surface teams can test, customize, and publish.
When should I publish the SDK?
Publish after the endpoint map, auth policy, docs, and package tests are stable enough for customers or internal teams to rely on.