Add documentation backed by mkdocs (#883)
Affects /docs - (Refined Documentation for deployment and added Some Supporting documentation) Added a github action for deployment Fixes #835 Added Support for mkdocs Example - https://dinesht04.github.io/go-sdk/ Requires Configuration of Github pages as follows:- 1. Enable Github Pages 2. Select gh-pages branch for deployment <img width="1237" height="817" alt="gh-pages" src="https://github.com/user-attachments/assets/01f0b012-d5f3-4011-9af9-7269e657ae6a" /> ## Sources # For mkdocs.yaml 1. https://github.com/modelcontextprotocol/python-sdk/blob/main/mkdocs.yml 2. https://github.com/modelcontextprotocol/java-sdk/blob/main/mkdocs.yml 3. MKDocs official documentation # For Github Action 1. https://github.com/modelcontextprotocol/python-sdk/blob/main/.github/workflows/publish-docs-manually.yml 2. https://github.com/modelcontextprotocol/java-sdk/blob/main/.github/workflows/docs.yml 3. https://github.com/james-willett/material-mkdocs-youtube-2024/blob/main/.github/workflows/ci.yml - From Youtube Tutorial
This commit is contained in:
parent
f36591bf8a
commit
1209861858
6 changed files with 624 additions and 42 deletions
|
|
@ -1,4 +1,21 @@
|
|||
# Features
|
||||
# Overview
|
||||
|
||||
The SDK consists of several importable packages:
|
||||
|
||||
- The
|
||||
[`github.com/modelcontextprotocol/go-sdk/mcp`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp)
|
||||
package defines the primary APIs for constructing and using MCP clients and
|
||||
servers.
|
||||
- The
|
||||
[`github.com/modelcontextprotocol/go-sdk/jsonrpc`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/jsonrpc) package is for users implementing
|
||||
their own transports.
|
||||
- The
|
||||
[`github.com/modelcontextprotocol/go-sdk/auth`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth)
|
||||
package provides some primitives for supporting OAuth.
|
||||
- The
|
||||
[`github.com/modelcontextprotocol/go-sdk/oauthex`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/oauthex)
|
||||
package provides extensions to the OAuth protocol, such as ProtectedResourceMetadata.
|
||||
|
||||
|
||||
These docs mirror the [official MCP spec](https://modelcontextprotocol.io/specification/2025-06-18).
|
||||
Use the index below to learn how the SDK implements a particular aspect of the
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
//go:generate weave -o ../../docs/troubleshooting.md ./troubleshooting.src.md
|
||||
//go:generate weave -o ../../docs/rough_edges.md ./rough_edges.src.md
|
||||
//go:generate weave -o ../../docs/mcpgodebug.md ./mcpgodebug.src.md
|
||||
//go:generate weave -o ../../docs/quick_start.md ./quick_start.src.md
|
||||
|
||||
// The doc package generates the documentation at /doc, via go:generate.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Backwards compatibility and MCPGODEBUG
|
||||
# Backwards compatibility and MCPGODEBUG
|
||||
|
||||
According to our compatibility promise, we can't break backward compatibility
|
||||
of the SDK API. However, sometimes we need to change the behavior of the SDK
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ to see the logical session
|
|||
> modelcontextprotocol/modelcontextprotocol#1372, or
|
||||
> modelcontextprotocol/modelcontextprotocol#1442 for potential refinements.
|
||||
|
||||
_See [examples/server/distributed](../examples/server/distributed/main.go) for
|
||||
_See [examples/server/distributed](https://github.com/modelcontextprotocol/go-sdk/blob/main/examples/server/distributed/main.go) for
|
||||
an example using stateless mode to implement a server distributed across
|
||||
multiple processes._
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ by implementing the
|
|||
[`Transport`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#Transport)
|
||||
interface: a logical bidirectional stream of JSON-RPC messages.
|
||||
|
||||
_Full example: [examples/server/custom-transport](../examples/server/custom-transport/main.go)._
|
||||
_Full example: [examples/server/custom-transport](https://github.com/modelcontextprotocol/go-sdk/blob/main//examples/server/custom-transport/main.go)._
|
||||
|
||||
### Concurrency
|
||||
|
||||
|
|
@ -368,7 +368,7 @@ of tokens and is the responsibility of the
|
|||
provided to
|
||||
[`RequireBearerToken`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerToken).
|
||||
|
||||
### Server-Side Request Forgery (SSRF)
|
||||
### Server-Side Request Forgery
|
||||
|
||||
The [mitigations](https://modelcontextprotocol.io/docs/tutorials/security/security_best_practices#mitigation-3) are as follows:
|
||||
|
||||
|
|
|
|||
27
internal/docs/quick_start.src.md
Normal file
27
internal/docs/quick_start.src.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Quick Start
|
||||
|
||||
%toc
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
go get github.com/modelcontextprotocol/go-sdk
|
||||
```
|
||||
|
||||
## Getting started
|
||||
|
||||
To get started creating an MCP server, create an `mcp.Server` instance, add
|
||||
features to it, and then run it over an `mcp.Transport`. For example, this
|
||||
server adds a single simple tool, and then connects it to clients over
|
||||
stdin/stdout:
|
||||
|
||||
%include ../readme/server/server.go -
|
||||
|
||||
To communicate with that server, create an `mcp.Client` and connect it to the
|
||||
corresponding server, by running the server command and communicating over its
|
||||
stdin/stdout:
|
||||
|
||||
%include ../readme/client/client.go -
|
||||
|
||||
The [`examples/`](https://github.com/modelcontextprotocol/go-sdk/tree/main/examples) directory contains more example clients and
|
||||
servers.
|
||||
|
|
@ -189,8 +189,8 @@ the `Tool.InputSchema` explicitly:
|
|||
|
||||
%include ../../mcp/tool_example_test.go customschemas -
|
||||
|
||||
_See [mcp/tool_example_test.go](../mcp/tool_example_test.go) for the full
|
||||
example, or [examples/server/toolschemas](examples/server/toolschemas/main.go)
|
||||
_See [mcp/tool_example_test.go](https://github.com/modelcontextprotocol/go-sdk/blob/main/mcp/tool_example_test.go) for the full
|
||||
example, or [examples/server/toolschemas](https://github.com/modelcontextprotocol/go-sdk/blob/main/examples/server/toolschemas/main.go)
|
||||
for more examples of customizing tool schemas._
|
||||
|
||||
**Stateless server deployments:** Some deployments create a new
|
||||
|
|
|
|||
Loading…
Reference in a new issue