fix: update doc links to custom domain and add project documents (#1589)
This commit is contained in:
parent
137cf7c9c8
commit
16b0fb80e4
6 changed files with 16 additions and 17 deletions
|
|
@ -4,7 +4,7 @@
|
|||
>
|
||||
> We anticipate a stable v2 release in Q1 2026. Until then, **v1.x remains the recommended version** for production use. v1.x will continue to receive bug fixes and security updates for at least 6 months after v2 ships to give people time to upgrade.
|
||||
>
|
||||
> For v1 documentation, see the [V1 API docs](https://modelcontextprotocol.github.io/typescript-sdk/). For v2 API docs, see [`/v2/`](https://modelcontextprotocol.github.io/typescript-sdk/v2/).
|
||||
> For v1 documentation, see the [V1 API docs](https://ts.sdk.modelcontextprotocol.io/). For v2 API docs, see [`/v2/`](https://ts.sdk.modelcontextprotocol.io/v2/).
|
||||
|
||||
  
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ Next steps:
|
|||
- [docs/client.md](docs/client.md) – building MCP clients: connecting, tools, resources, prompts, server-initiated requests, and error handling
|
||||
- [docs/faq.md](docs/faq.md) – frequently asked questions and troubleshooting
|
||||
- External references:
|
||||
- [SDK API documentation](https://modelcontextprotocol.github.io/typescript-sdk/)
|
||||
- [SDK API documentation](https://ts.sdk.modelcontextprotocol.io/)
|
||||
- [Model Context Protocol documentation](https://modelcontextprotocol.io)
|
||||
- [MCP Specification](https://spec.modelcontextprotocol.io)
|
||||
- [Example Servers](https://github.com/modelcontextprotocol/servers)
|
||||
|
|
@ -149,7 +149,7 @@ The `docs:multi` script checks out both the `v1.x` and `main` branches via git w
|
|||
|
||||
## v1 (legacy) documentation and fixes
|
||||
|
||||
If you are using the **v1** generation of the SDK, the **v1 API documentation** is available at [`https://modelcontextprotocol.github.io/typescript-sdk/`](https://modelcontextprotocol.github.io/typescript-sdk/). The v1 source code and any v1-specific fixes live on the long-lived [`v1.x` branch](https://github.com/modelcontextprotocol/typescript-sdk/tree/v1.x). V2 API docs are at [`/v2/`](https://modelcontextprotocol.github.io/typescript-sdk/v2/).
|
||||
If you are using the **v1** generation of the SDK, the **v1 API documentation** is available at [`https://ts.sdk.modelcontextprotocol.io/`](https://ts.sdk.modelcontextprotocol.io/). The v1 source code and any v1-specific fixes live on the long-lived [`v1.x` branch](https://github.com/modelcontextprotocol/typescript-sdk/tree/v1.x). V2 API docs are at [`/v2/`](https://ts.sdk.modelcontextprotocol.io/v2/).
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
|
|||
|
|
@ -82,4 +82,4 @@ wanting to switch to `v2` and using SSE should migrate to Streamable HTTP.
|
|||
|
||||
### Where do v1 documentation and v1-specific fixes live?
|
||||
|
||||
The v1 API documentation is available at [`https://modelcontextprotocol.github.io/typescript-sdk/`](https://modelcontextprotocol.github.io/typescript-sdk/). The v1 source code and any v1-specific fixes live on the long-lived [`v1.x` branch](https://github.com/modelcontextprotocol/typescript-sdk/tree/v1.x). V2 API docs are at [`/v2/`](https://modelcontextprotocol.github.io/typescript-sdk/v2/).
|
||||
The v1 API documentation is available at [`https://ts.sdk.modelcontextprotocol.io/`](https://ts.sdk.modelcontextprotocol.io/). The v1 source code and any v1-specific fixes live on the long-lived [`v1.x` branch](https://github.com/modelcontextprotocol/typescript-sdk/tree/v1.x). V2 API docs are at [`/v2/`](https://ts.sdk.modelcontextprotocol.io/v2/).
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
document.addEventListener("DOMContentLoaded", function () {
|
||||
var banner = document.createElement("div");
|
||||
banner.innerHTML =
|
||||
"This documents a <strong>pre-release</strong> version of the SDK. Expect breaking changes. For the stable SDK, see the <a href='/typescript-sdk/'>V1 docs</a>.";
|
||||
"This documents a <strong>pre-release</strong> version of the SDK. Expect breaking changes. For the stable SDK, see the <a href='/'>V1 docs</a>.";
|
||||
banner.style.cssText =
|
||||
"background:#fff3cd;color:#856404;border-bottom:1px solid #ffc107;padding:8px 16px;text-align:center;font-size:14px;";
|
||||
banner.querySelector("a").style.cssText = "color:#856404;text-decoration:underline;";
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ pnpm tsx src/simpleStreamableHttp.ts
|
|||
| Streamable HTTP server (stateless) | No session tracking; good for simple API-style servers. | [`src/simpleStatelessStreamableHttp.ts`](src/simpleStatelessStreamableHttp.ts) |
|
||||
| JSON response mode (no SSE) | Streamable HTTP with JSON-only responses and limited notifications. | [`src/jsonResponseStreamableHttp.ts`](src/jsonResponseStreamableHttp.ts) |
|
||||
| Server notifications over Streamable HTTP | Demonstrates server-initiated notifications via GET+SSE. | [`src/standaloneSseWithGetStreamableHttp.ts`](src/standaloneSseWithGetStreamableHttp.ts) |
|
||||
| Deprecated HTTP+SSE server (legacy) | Legacy HTTP+SSE transport for backwards-compatibility testing. | [`src/simpleSseServer.ts`](src/simpleSseServer.ts) |
|
||||
| Backwards-compatible server (Streamable HTTP + SSE) | One server that supports both Streamable HTTP and legacy SSE clients. | [`src/sseAndStreamableHttpCompatibleServer.ts`](src/sseAndStreamableHttpCompatibleServer.ts) |
|
||||
| Output schema server | Demonstrates tool output validation with structured output schemas. | [`src/mcpServerOutputSchema.ts`](src/mcpServerOutputSchema.ts) |
|
||||
| Form elicitation server | Collects **non-sensitive** user input via schema-driven forms. | [`src/elicitationFormExample.ts`](src/elicitationFormExample.ts) |
|
||||
| URL elicitation server | Secure browser-based flows for **sensitive** input (API keys, OAuth, payments). | [`src/elicitationUrlExample.ts`](src/elicitationUrlExample.ts) |
|
||||
| Sampling + tasks server | Demonstrates sampling and experimental task-based execution. | [`src/toolWithSampleServer.ts`](src/toolWithSampleServer.ts) |
|
||||
|
|
@ -161,12 +160,10 @@ For scenarios where local in-memory state must be maintained on specific nodes,
|
|||
|
||||
## Backwards compatibility (Streamable HTTP ↔ legacy SSE)
|
||||
|
||||
Start one of the servers:
|
||||
Start the server:
|
||||
|
||||
```bash
|
||||
pnpm --filter @modelcontextprotocol/examples-server exec tsx src/simpleSseServer.ts
|
||||
pnpm --filter @modelcontextprotocol/examples-server exec tsx src/simpleStreamableHttp.ts
|
||||
pnpm --filter @modelcontextprotocol/examples-server exec tsx src/sseAndStreamableHttpCompatibleServer.ts
|
||||
```
|
||||
|
||||
Then run the backwards-compatible client:
|
||||
|
|
|
|||
|
|
@ -5,9 +5,6 @@
|
|||
# V1 docs (from the v1.x branch) are placed at the root.
|
||||
# V2 docs (from main) are placed under /v2/.
|
||||
#
|
||||
# This script can be run from any branch — it fetches both v1.x and main
|
||||
# via git worktrees.
|
||||
#
|
||||
# Usage:
|
||||
# scripts/generate-multidoc.sh [output-dir]
|
||||
#
|
||||
|
|
@ -76,7 +73,7 @@ cat > typedoc.json << 'TYPEDOC_EOF'
|
|||
"docs/faq.md"
|
||||
],
|
||||
"navigationLinks": {
|
||||
"V2 Docs": "/typescript-sdk/v2/"
|
||||
"V2 Docs": "/v2/"
|
||||
},
|
||||
"headings": {
|
||||
"readme": false
|
||||
|
|
|
|||
|
|
@ -32,10 +32,15 @@ export default {
|
|||
exclude: ['**/*.examples.ts']
|
||||
},
|
||||
highlightLanguages: [...OptionDefaults.highlightLanguages, 'powershell'],
|
||||
projectDocuments: ['docs/documents.md'],
|
||||
hostedBaseUrl: 'https://modelcontextprotocol.github.io/typescript-sdk/v2/',
|
||||
projectDocuments: [
|
||||
'docs/documents.md',
|
||||
'packages/middleware/README.md',
|
||||
'examples/server/README.md',
|
||||
'examples/client/README.md',
|
||||
],
|
||||
hostedBaseUrl: 'https://ts.sdk.modelcontextprotocol.io/v2/',
|
||||
navigationLinks: {
|
||||
'V1 Docs': '/typescript-sdk/'
|
||||
'V1 Docs': '/'
|
||||
},
|
||||
navigation: {
|
||||
compactFolders: true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue