Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ This process is similar to the [Go proposal
process](https://github.com/golang/proposal), but is necessarily lighter weight
to accommodate the greater rate of change expected for the SDK.

### Design discussion

For open ended design discussion (anything that doesn't fall into the issue
categories above), use [GitHub
Discussions](https://github.com/modelcontextprotocol/go-sdk/discussions).
Ideally, each discussion should be focused on one aspect of the design. For
example: Tool Binding and Session APIs would be two separate discussions.
When discussions reach a consensus, they should be promoted into proposals.

## Contributing code

The project uses GitHub pull requests (PRs) to review changes.
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<!-- Autogenerated by weave; DO NOT EDIT -->
# MCP Go SDK

<!-- TODO: update pkgsite links here to point to the modelcontextprotocol
module, once it exists. -->

[![PkgGoDev](https://pkg.go.dev/badge/golang.org/x/tools)](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/modelcontextprotocol/go-sdk)](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk)

This repository contains an unreleased implementation of the official Go
software development kit (SDK) for the Model Context Protocol (MCP).
Expand All @@ -15,6 +12,18 @@ proposals, but don't use it in real projects. See the issue tracker for known
issues and missing features. We aim to release a stable version of the SDK in
August, 2025.

## Design

The design doc for this SDK is at [design.md](./design/design.md), which was
initially reviewed at
[modelcontextprotocol/discussions/364](https://github.com/orgs/modelcontextprotocol/discussions/364).

Further design discussion should occur in
[issues](https://github.com/modelcontextprotocol/go-sdk/issues) (for concrete
proposals) or
[discussions](https://github.com/modelcontextprotocol/go-sdk/discussions) for
open-ended discussion. See CONTRIBUTING.md for details.

## Package documentation

The SDK consists of two importable packages:
Expand Down Expand Up @@ -71,7 +80,7 @@ func main() {
log.Fatal("tool failed")
}
for _, c := range res.Content {
log.Print(c.Text)
log.Print(c.(*mcp.TextContent).Text)
}
}
```
Expand All @@ -95,7 +104,7 @@ type HiParams struct {

func SayHi(ctx context.Context, cc *mcp.ServerSession, params *mcp.CallToolParamsFor[HiParams]) (*mcp.CallToolResultFor[any], error) {
return &mcp.CallToolResultFor[any]{
Content: []*mcp.ContentBlock{mcp.NewTextContent("Hi " + params.Name)},
Content: []mcp.Content{&mcp.TextContent{Text: "Hi " + params.Name}},
}, nil
}

Expand All @@ -112,15 +121,6 @@ func main() {

The `examples/` directory contains more example clients and servers.

## Design

The design doc for this SDK is at [design.md](./design/design.md), which was
initially reviewed at
[modelcontextprotocol/discussions/364](https://github.com/orgs/modelcontextprotocol/discussions/364).

Further design discussion should occur in GitHub issues. See CONTRIBUTING.md
for details.

## Acknowledgements

Several existing Go MCP SDKs inspired the development and design of this
Expand Down
26 changes: 13 additions & 13 deletions internal/readme/README.src.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# MCP Go SDK

<!-- TODO: update pkgsite links here to point to the modelcontextprotocol
module, once it exists. -->

[![PkgGoDev](https://pkg.go.dev/badge/golang.org/x/tools)](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/modelcontextprotocol/go-sdk)](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk)

This repository contains an unreleased implementation of the official Go
software development kit (SDK) for the Model Context Protocol (MCP).
Expand All @@ -14,6 +11,18 @@ proposals, but don't use it in real projects. See the issue tracker for known
issues and missing features. We aim to release a stable version of the SDK in
August, 2025.

## Design

The design doc for this SDK is at [design.md](./design/design.md), which was
initially reviewed at
[modelcontextprotocol/discussions/364](https://github.com/orgs/modelcontextprotocol/discussions/364).

Further design discussion should occur in
[issues](https://github.com/modelcontextprotocol/go-sdk/issues) (for concrete
proposals) or
[discussions](https://github.com/modelcontextprotocol/go-sdk/discussions) for
open-ended discussion. See CONTRIBUTING.md for details.

## Package documentation

The SDK consists of two importable packages:
Expand Down Expand Up @@ -41,15 +50,6 @@ with its client over stdin/stdout:

The `examples/` directory contains more example clients and servers.

## Design

The design doc for this SDK is at [design.md](./design/design.md), which was
initially reviewed at
[modelcontextprotocol/discussions/364](https://github.com/orgs/modelcontextprotocol/discussions/364).

Further design discussion should occur in GitHub issues. See CONTRIBUTING.md
for details.

## Acknowledgements

Several existing Go MCP SDKs inspired the development and design of this
Expand Down
Loading