go-sdk/docs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
rishabh fbd36cb787
docs/server: fix logging defaults and the SetLoggingLevel method name (#1251)
The Logging section of docs/server.md says "For stateful sessions" twice
in a row with opposite meanings, so one of the two sentences has to be
wrong. The default level of "info" is set in only one place in the SDK,
`StreamableHTTPHandler.ephemeralConnectOpts` in mcp/streamable.go, which
handles stateless requests; a session created through `Server.Connect`
starts with an empty `ServerSessionState.LogLevel`, and
`ServerSession.Log` returns early while the level is empty, which is
exactly what the first sentence already says. The second sentence now
reads "For stateless sessions". The same section also tells readers to
call `SetLevel`, but there is no such exported method: the client-side
call is `ClientSession.SetLoggingLevel`, and `setLevel` is only the
unexported server handler, so the pkg.go.dev link on the page points at
an anchor that does not exist. For context, the stateless default
arrived in #411 and the paragraph describing it was written later in
#497, which is where the duplicated "stateful" came from.

Checked with `go doc ./mcp ClientSession` (only `SetLoggingLevel` is
exported) and `grep -rn 'LogLevel = "info"' mcp/` (a single hit,
mcp/streamable.go:516); docs/server.md was regenerated with `go generate
./internal/docs`, and `go build ./... && go test ./...` pass.

---------

Signed-off-by: Rishabh <rishabhsaiv@gmail.com>
Co-authored-by: Guglielmo Colombo <guglielmoc@google.com>
2026-09-15 11:44:03 +00:00
..
images Add documentation backed by mkdocs (#883) 2026-04-09 14:25:43 +02:00
client.md docs/client: fix the SEP-1034 and SEP-1330 links (#1252) 2026-09-14 17:20:25 +00:00
CNAME Add documentation backed by mkdocs (#883) 2026-04-09 14:25:43 +02:00
contributing.md Add documentation backed by mkdocs (#883) 2026-04-09 14:25:43 +02:00
mcpgodebug.md refactor: remove legacy MCPGODEBUG compatibility for new protocol release (#1237) 2026-09-04 10:08:52 +02:00
protocol.md oauthex: oauth discovery checks (#1220) 2026-09-02 21:07:19 +02:00
quick_start.md docs: quick start go get leaves the module unbuildable (#1148) 2026-08-06 16:27:46 +02:00
README.md Add documentation backed by mkdocs (#883) 2026-04-09 14:25:43 +02:00
rough_edges.md fix: do not omitempty ReadOnlyHint in ToolAnnotations (#908) 2026-05-25 15:52:15 +02:00
server.md docs/server: fix logging defaults and the SetLoggingLevel method name (#1251) 2026-09-15 11:44:03 +00:00
troubleshooting.md mcp: update return meta in DiscoverResult (SEP-2575) (#1097) 2026-07-16 16:10:12 +02:00

Overview

The SDK consists of several importable packages:

These docs mirror the official MCP spec. Use the index below to learn how the SDK implements a particular aspect of the protocol.

Base Protocol

  1. Lifecycle (Clients, Servers, and Sessions).
  2. Transports
    1. Stdio transport
    2. Streamable transport
    3. Custom transports
  3. Authorization
  4. Security
  5. Utilities
    1. Cancellation
    2. Ping
    3. Progress

Client Features

  1. Roots
  2. Sampling
  3. Elicitation

Server Features

  1. Prompts
  2. Resources
  3. Tools
  4. Utilities
    1. Completion
    2. Logging
    3. Pagination

TroubleShooting

See troubleshooting.md for a troubleshooting guide.

Backwards compatibility

See mcpgodebug.md for a list of backwards incompatible behavior changes and description how they can be temporarily undone.

Rough edges

See rough_edges.md for a list of rough edges or API oversights that can't be addressed due to our compatibility promise. We'll revisit these if/when we move to a v2 of the SDK.