Skip to content

Commit fcdbba8

Browse files
committed
feat: add support for mkdocs
1 parent f36591b commit fcdbba8

22 files changed

+1083
-43
lines changed

.github/workflows/publish-docs.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Docs to GitHub Pages
1+
name: Publish Docs
22

33
on:
44
release:
@@ -10,16 +10,23 @@ permissions: read-all
1010
jobs:
1111
deploy:
1212
permissions:
13-
contents: write
13+
contents: write
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: Check out code
17-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18-
- name: Deploy to GitHub Pages
19-
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
16+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
- name: Configure Git Credentials
18+
run: |
19+
git config user.name github-actions[bot]
20+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
21+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2022
with:
21-
github_token: ${{ secrets.GITHUB_TOKEN }}
22-
publish_dir: ./docs
23-
publish_branch: gh-pages
24-
enable_jekyll: true
25-
cname: go.sdk.modelcontextprotocol.io
23+
python-version: 3.x
24+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
25+
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
26+
with:
27+
key: mkdocs-material-${{ env.cache_id }}
28+
path: .cache
29+
restore-keys: |
30+
mkdocs-material-
31+
- run: pip install mkdocs-material
32+
- run: mkdocs gh-deploy --force

CONTRIBUTING.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- Autogenerated by weave; DO NOT EDIT -->
12
# Contributing to the Go MCP SDK
23

34
Thank you for your interest in contributing! The Go SDK needs active
@@ -6,11 +7,28 @@ new and emerging use-cases. We welcome all forms of contribution, from filing
67
and reviewing issues, to contributing fixes, to proposing and implementing new
78
features.
89

9-
As described in the [design document](./design/design.md), it is important for
10+
As described in the [design document](https://github.com/modelcontextprotocol/go-sdk/blob/main/design/design.md), it is important for
1011
the MCP SDK to remain idiomatic, future-proof, and extensible. The process
1112
described here is intended to ensure that the SDK evolves safely and
1213
transparently, while adhering to these goals.
1314

15+
1. [Development setup](#development-setup)
16+
1. [Conformance tests](#conformance-tests)
17+
1. [Filing issues](#filing-issues)
18+
1. [Bugs](#bugs)
19+
1. [Proposals](#proposals)
20+
1. [Design discussion](#design-discussion)
21+
1. [Contributing code](#contributing-code)
22+
1. [Adding and updating dependencies](#adding-and-updating-dependencies)
23+
1. [Updating the README](#updating-the-readme)
24+
1. [Timeouts](#timeouts)
25+
1. [Code of conduct](#code-of-conduct)
26+
1. [Governance](#governance)
27+
1. [Working Group meetings](#working-group-meetings)
28+
1. [Discord](#discord)
29+
1. [Antitrust considerations](#antitrust-considerations)
30+
31+
1432
## Development setup
1533

1634
This module can be built and tested using the standard Go toolchain. Run `go

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
go.sdk.modelcontextprotocol.io

docs/README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
<!-- Autogenerated by weave; DO NOT EDIT -->
2-
# Features
2+
# Overview
3+
4+
The SDK consists of several importable packages:
5+
6+
- The
7+
[`github.com/modelcontextprotocol/go-sdk/mcp`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp)
8+
package defines the primary APIs for constructing and using MCP clients and
9+
servers.
10+
- The
11+
[`github.com/modelcontextprotocol/go-sdk/jsonrpc`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/jsonrpc) package is for users implementing
12+
their own transports.
13+
- The
14+
[`github.com/modelcontextprotocol/go-sdk/auth`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth)
15+
package provides some primitives for supporting OAuth.
16+
- The
17+
[`github.com/modelcontextprotocol/go-sdk/oauthex`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/oauthex)
18+
package provides extensions to the OAuth protocol, such as ProtectedResourceMetadata.
19+
320

421
These docs mirror the [official MCP spec](https://modelcontextprotocol.io/specification/2025-06-18).
522
Use the index below to learn how the SDK implements a particular aspect of the

docs/contributing.md

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
<!-- Autogenerated by weave; DO NOT EDIT -->
2+
# Contributing to the Go MCP SDK
3+
4+
Thank you for your interest in contributing! The Go SDK needs active
5+
contributions to keep up with changes in the MCP spec, fix bugs, and accommodate
6+
new and emerging use-cases. We welcome all forms of contribution, from filing
7+
and reviewing issues, to contributing fixes, to proposing and implementing new
8+
features.
9+
10+
As described in the [design document](https://github.com/modelcontextprotocol/go-sdk/blob/main/design/design.md), it is important for
11+
the MCP SDK to remain idiomatic, future-proof, and extensible. The process
12+
described here is intended to ensure that the SDK evolves safely and
13+
transparently, while adhering to these goals.
14+
15+
1. [Development setup](#development-setup)
16+
1. [Conformance tests](#conformance-tests)
17+
1. [Filing issues](#filing-issues)
18+
1. [Bugs](#bugs)
19+
1. [Proposals](#proposals)
20+
1. [Design discussion](#design-discussion)
21+
1. [Contributing code](#contributing-code)
22+
1. [Adding and updating dependencies](#adding-and-updating-dependencies)
23+
1. [Updating the README](#updating-the-readme)
24+
1. [Timeouts](#timeouts)
25+
1. [Code of conduct](#code-of-conduct)
26+
1. [Governance](#governance)
27+
1. [Working Group meetings](#working-group-meetings)
28+
1. [Discord](#discord)
29+
1. [Antitrust considerations](#antitrust-considerations)
30+
31+
32+
## Development setup
33+
34+
This module can be built and tested using the standard Go toolchain. Run `go
35+
test ./...` to run all its tests.
36+
37+
To test changes to this module against another module that uses the SDK, we
38+
recommend using a [`go.work` file](https://go.dev/doc/tutorial/workspaces) to
39+
define a multi-module workspace. For example, if your directory contains a
40+
`project` directory containing your project, and a `go-sdk` directory
41+
containing the SDK, run:
42+
43+
```sh
44+
go work init ./project ./go-sdk
45+
```
46+
47+
### Conformance tests
48+
49+
The SDK includes a script to run the official MCP conformance tests against the
50+
SDK's conformance server:
51+
52+
```sh
53+
./scripts/conformance.sh
54+
```
55+
56+
By default, results are cleaned up after the script runs. To save results to a
57+
specific directory:
58+
59+
```sh
60+
./scripts/conformance.sh --result_dir ./conformance-results
61+
```
62+
63+
To run against a local checkout of the
64+
[conformance repo](https://github.com/modelcontextprotocol/conformance) instead
65+
of the latest npm release:
66+
67+
```sh
68+
./scripts/conformance.sh --conformance_repo ~/src/conformance
69+
```
70+
71+
Note: you must run `npm install` in the conformance repo first.
72+
73+
Run `./scripts/conformance.sh --help` for more options.
74+
75+
## Filing issues
76+
77+
This project uses the [GitHub issue
78+
tracker](https://github.com/modelcontextprotocol/go-sdk/issues) for issues. The
79+
process for filing bugs and proposals is described below.
80+
81+
TODO(rfindley): describe a process for asking general questions in the public
82+
MCP discord server.
83+
84+
### Bugs
85+
86+
Please [report
87+
bugs](https://github.com/modelcontextprotocol/go-sdk/issues/new). If the SDK is
88+
not working as you expected, it is likely due to a bug or inadequate
89+
documentation, and reporting an issue will help us address this shortcoming.
90+
91+
When reporting a bug, make sure to answer these five questions:
92+
93+
1. What did you do?
94+
2. What did you see?
95+
3. What did you expect to see?
96+
4. What version of the Go MCP SDK are you using?
97+
5. What version of Go are you using (`go version`)?
98+
99+
### Proposals
100+
101+
A proposal is an issue that proposes a new API for the SDK, or a change to the
102+
signature or behavior of an existing API. Proposals should be labeled with the
103+
'proposal' label, and require an explicit approval from a maintainer before
104+
being accepted (indicated by the 'proposal-accepted' label). Proposals must
105+
remain open for at least a week to allow discussion before being accepted or
106+
declined by a maintainer.
107+
108+
Proposals that are straightforward and uncontroversial may be approved based on
109+
discussion on the issue tracker or in a GitHub Discussion. However, proposals
110+
that are deemed to be sufficiently unclear or complicated may be deferred to a
111+
regular Working Group meeting (see 'Governance' below).
112+
113+
This process is similar to the [Go proposal
114+
process](https://github.com/golang/proposal), but is necessarily lighter weight
115+
to accommodate the greater rate of change expected for the SDK.
116+
117+
### Design discussion
118+
119+
For open ended design discussion (anything that doesn't fall into the issue
120+
categories above), use [GitHub
121+
Discussions](https://github.com/modelcontextprotocol/go-sdk/discussions).
122+
Ideally, each discussion should be focused on one aspect of the design. For
123+
example: Tool Binding and Session APIs would be two separate discussions.
124+
When discussions reach a consensus, they should be promoted into proposals.
125+
126+
## Contributing code
127+
128+
The project uses GitHub pull requests (PRs) to review changes.
129+
130+
Any significant change should be associated with a GitHub issue. Issues that
131+
are deemed to be good opportunities for contribution are be labeled ['Help
132+
Wanted'](https://github.com/modelcontextprotocol/go-sdk/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22help%20wanted%22).
133+
If you want to work on such an issue, please first comment on the issue to say
134+
that you're interested in contributing. For issues _not_ labeled 'Help Wanted',
135+
it is recommended that you ask (and wait for confirmation) on the issue before
136+
contributing, to avoid duplication of effort or wasted work. For nontrivial
137+
changes that _don't_ relate to an existing issue, please file an issue first.
138+
139+
Changes should be high quality and well tested, and should generally follow the
140+
[Google Go style guide](https://google.github.io/styleguide/go/). Commit
141+
messages should follow the [format used by the Go
142+
project](https://go.dev/wiki/CommitMessage).
143+
144+
Unless otherwise noted, the Go source files are distributed under the license
145+
found in the LICENSE file. New contributions are licensed under Apache 2.0. All
146+
Go files in the SDK should have a copyright header following the format below:
147+
148+
```go
149+
// Copyright 2025 The Go MCP SDK Authors. All rights reserved.
150+
// Use of this source code is governed by the license
151+
// that can be found in the LICENSE file.
152+
```
153+
154+
### Adding and updating dependencies
155+
156+
In general, the SDK tries to use as few dependencies as possible. Each new
157+
dependency is a potential source for bugs, churn, and conflicts for our users.
158+
Therefore, we require a [proposal](#proposals) for any new module dependency,
159+
including upgrading an existing module to a new major version. New dependencies
160+
should be evaluated for their stability and security, and should be
161+
well-established in the Go ecosystem.
162+
163+
In general, dependencies should be for internal use by the SDK implementation,
164+
or for testing. Do not include types from dependencies in the SDK API.
165+
166+
On the other hand, updating existing dependencies can be done at any time
167+
without a proposal, as long as their major version does not change. Prefer to
168+
update dependencies immediately following a release of the SDK, to allow as
169+
much time as possible to find issues with the new version.
170+
171+
After any change to dependencies, run govulncheck to check them for
172+
vulnerabilities.
173+
174+
```
175+
go run golang.org/x/vuln/cmd/govulncheck@latest
176+
```
177+
178+
### Updating the README
179+
180+
The top-level `README.md` file is generated from `internal/readme/README.src.md`
181+
and should not be edited directly. To update the README:
182+
183+
1. Make your changes to `internal/readme/README.src.md`
184+
2. Run `go generate ./internal/readme` from the repository root to regenerate `README.md`
185+
3. Commit both files together
186+
187+
The CI system will automatically check that the README is up-to-date by running
188+
`go generate ./internal/readme` and verifying no changes result. If you see a CI failure about the
189+
README being out of sync, follow the steps above to regenerate it.
190+
191+
## Timeouts
192+
193+
If a contributor hasn't responded to issue questions or PR comments in two weeks,
194+
the issue or PR may be closed. It can be reopened when the contributor can resume
195+
work.
196+
197+
## Code of conduct
198+
199+
This project follows the [Go Community Code of Conduct](https://go.dev/conduct).
200+
If you encounter a conduct-related issue, please mail conduct@golang.org.
201+
202+
## Governance
203+
204+
Initially, the Go SDK repository will be administered by the Go team and
205+
Anthropic, and they will be the approvers (the set of people able to merge PRs
206+
to the SDK), also referred to as the 'Working Group'. The policies here are
207+
also intended to satisfy necessary constraints of the Go team's participation
208+
in the project. This may change in the future: see 'Ongoing Evaluation' below.
209+
210+
### Working Group meetings
211+
212+
On a regular basis, the Working Group will host a virtual meeting to discuss
213+
outstanding proposals and other changes to the SDK. These meetings and their
214+
agendas will be announced in advance, and open to all. The meetings will be
215+
recorded, and recordings and meeting notes will be made available afterward.
216+
(TODO: decide on a mechanism for tracking these meetings--likely a GitHub
217+
issue.)
218+
219+
This process is similar to the [Go Tools
220+
call](https://go.dev/wiki/golang-tools), though it is expected that meetings
221+
will at least initially occur on a more frequent basis.
222+
223+
### Discord
224+
225+
Discord (either the public or private Anthropic discord servers) should only be
226+
used for logistical coordination or answering questions. For transparency and
227+
durability, design discussion and decisions should occur in GitHub issues,
228+
GitHub discussions, or public steering meetings.
229+
230+
### Antitrust considerations
231+
232+
The goal of this repository is to provide a robust and complete Go
233+
implementation of the model context protocol, in an open and transparent
234+
manner, without bias toward specific integration paths or providers. To that
235+
end, the model context protocol organization's [antitrust
236+
policy](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/ANTITRUST.md)
237+
applies to all participation in this project.

docs/images/logo-dark.svg

Lines changed: 12 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)