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.

Jun 25, 20269 min readIntermediate

Steps

1

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.

Example
ASTRAIL_SDK_BUNDLE_URL=https://astrail.dev/api/servers/SERVER_ID/sdk \
ASTRAIL_SDK_OUT_DIR=./generated-sdk \
npm run sdk:pull
2

Verify 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.

Example
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.json
3

Run 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.

Example
cd generated-sdk/typescript
npm install
ASTRAIL_MCP_ENDPOINT=https://astrail.dev/api/mcp/SERVER_ID npm test
4

Prepare package metadata

Set package name, version, repository, license, and generated-code notice. Keep publish tokens out of generated source and CI logs.

5

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

REFERENCE.md, MCP.md, endpoint-catalog.json, and manifest.json exist.
Package tests run against the intended MCP endpoint.
Generated examples avoid production credentials.
Update automation opens a diff for review before publishing.

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.