Embedded Speakeasy MCP setup guides for Go consumers.
go get github.com/speakeasy-api/mcp-setup-docs/go@v0.1.0(Use a go/vX.Y.Z git tag; the subdirectory module resolves as @vX.Y.Z.)
package main
import (
"fmt"
guides "github.com/speakeasy-api/mcp-setup-docs/go"
)
func main() {
g, ok := guides.Lookup("intercom")
fmt.Println(ok, g.Title, g.Summary)
ref, err := guides.ParseServerRef("intercom/eu")
if err != nil {
panic(err)
}
_, remote, ok := guides.LookupServer(ref)
fmt.Println(ok, remote.URL)
fmt.Println(guides.ByURL("https://mcp.box.com"))
// Pulse / registry name → guide (no default remote invented)
fmt.Println(guides.Resolve("io.github.github/github-mcp-server"))
}Guide.External and Guide.Speakeasy ship with the template key
{{ gram.oauth.callback_url }} in place. Serve the renderers, not the raw
fields. Pass your own value on every call:
vars := guides.Vars{OAuthCallbackURL: "https://app.example.com/oauth/callback"}
g, _ := guides.Lookup("intercom")
os.Stdout.Write(g.RenderExternal(vars))- The renderers never change the embedded content, so a server may render per
request with a different value each time. Treat the result as read-only:
an empty
Varsreturns a slice aliasing the raw field. - The callback URL is a property of your deployment, not of the guide, so there is nothing to look up first. Content that never references the key comes back unchanged.
- An empty
Varsfield leaves its key in place, so a missing value degrades to the unrendered content instead of a blank. - Only
ExternalandSpeakeasyhave a renderer. No template key reachesMetaor an asset — the generator fails if one ever does. {{ gram.oauth.callback_url }}is the only supported key. Add a field toVarsto support another; existing callers keep compiling.
- Canonical:
ServerRef{Guide, Remote}text formslug/remote-id(e.g.box/hosted,intercom/eu,salesforce/sobject-reads-sandbox). - Secondary:
Resolve/ByURLmay return 0..N matches (alias, provenance name, endpoint URL). They never invent a default remote. - Vendor-hosted single-endpoint guides use remote id
hosted. Customer-provisioned / templated endpoints keep a meaning-bearing id (today:snowflake/cortex-agent-mcp). Remote ids are append-only after the first tag; seepublished_server_refs.txt.
mise run generate-go # sync guides → go/generated + regenerate index
mise run check-go # regenerate, fail on drift, go testPublishable files only: meta.yaml, external.md, speakeasy.md, and
declared assets. The authoring-only research.md file is never embedded.
See GO-MODULE.md (validate → regen PR → human merge → go/vX.Y.Z).
First tag is manual: git tag -a go/v0.1.0 -m "…" && git push origin go/v0.1.0.
Version tags: go/vX.Y.Z (consumers install @vX.Y.Z).