Skip to content

Commit c39f498

Browse files
Update README.md and docs/faq.md to link full quickstart guides
Now that the server and client quickstart tutorials have been imported, update the README and FAQ to funnel newcomers to them. The README "Quick Start" section is replaced with a "Getting Started" section that shows an inline code snippet, links the two quickstart tutorials, and demotes the advanced examples to a secondary mention. The "Documentation" section is flattened into a single list with updated URLs. The FAQ answer for "Where can I find runnable server examples?" now points to `server-quickstart.md` first. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d4d8c64 commit c39f498

2 files changed

Lines changed: 35 additions & 41 deletions

File tree

README.md

Lines changed: 34 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- [Overview](#overview)
1515
- [Packages](#packages)
1616
- [Installation](#installation)
17-
- [Quick Start (runnable examples)](#quick-start-runnable-examples)
17+
- [Getting Started](#getting-started)
1818
- [Documentation](#documentation)
1919
- [Contributing](#contributing)
2020
- [License](#license)
@@ -82,59 +82,53 @@ npm install @modelcontextprotocol/express express
8282
npm install @modelcontextprotocol/hono hono
8383
```
8484

85-
## Quick Start (runnable examples)
85+
## Getting Started
8686

87-
The runnable examples live under `examples/` and are kept in sync with the docs.
87+
Here is what an MCP server looks like. This minimal example exposes a single `greet` tool over stdio:
8888

89-
1. **Install dependencies** (from repo root):
89+
```typescript
90+
import { McpServer, StdioServerTransport } from '@modelcontextprotocol/server';
91+
import * as z from 'zod/v4';
9092

91-
```bash
92-
pnpm install
93-
```
94-
95-
2. **Run a Streamable HTTP example server**:
96-
97-
```bash
98-
pnpm --filter @modelcontextprotocol/examples-server exec tsx src/simpleStreamableHttp.ts
99-
```
93+
const server = new McpServer({ name: 'greeting-server', version: '1.0.0' });
10094

101-
Alternatively, from within the example package:
95+
server.registerTool(
96+
'greet',
97+
{
98+
description: 'Greet someone by name',
99+
inputSchema: z.object({ name: z.string() }),
100+
},
101+
async ({ name }) => ({
102+
content: [{ type: 'text', text: `Hello, ${name}!` }],
103+
}),
104+
);
102105

103-
```bash
104-
cd examples/server
105-
pnpm tsx src/simpleStreamableHttp.ts
106-
```
107-
108-
3. **Run the interactive client in another terminal**:
106+
async function main() {
107+
const transport = new StdioServerTransport();
108+
await server.connect(transport);
109+
}
109110

110-
```bash
111-
pnpm --filter @modelcontextprotocol/examples-client exec tsx src/simpleStreamableHttp.ts
111+
main();
112112
```
113113

114-
Alternatively, from within the example package:
114+
Ready to build something real? Follow the step-by-step quickstart tutorials:
115115

116-
```bash
117-
cd examples/client
118-
pnpm tsx src/simpleStreamableHttp.ts
119-
```
116+
- [Build a weather server](docs/server-quickstart.md) — server quickstart
117+
- [Build an LLM-powered chatbot](docs/client-quickstart.md) — client quickstart
120118

121-
Next steps:
119+
The complete code for each tutorial is in [`examples/server-quickstart/`](https://github.com/modelcontextprotocol/typescript-sdk/tree/main/examples/server-quickstart/) and [`examples/client-quickstart/`](https://github.com/modelcontextprotocol/typescript-sdk/tree/main/examples/client-quickstart/). For more advanced runnable examples, see:
122120

123-
- Server examples index: [`examples/server/README.md`](examples/server/README.md)
124-
- Client examples index: [`examples/client/README.md`](examples/client/README.md)
125-
- Guided walkthroughs: [`docs/server.md`](docs/server.md) and [`docs/client.md`](docs/client.md)
121+
- [`examples/server/README.md`](examples/server/README.md) — server examples index
122+
- [`examples/client/README.md`](examples/client/README.md) — client examples index
126123

127124
## Documentation
128125

129-
- Local SDK docs:
130-
- [docs/server.md](docs/server.md) – building MCP servers: transports, tools, resources, prompts, server-initiated requests, and deployment
131-
- [docs/client.md](docs/client.md) – building MCP clients: connecting, tools, resources, prompts, server-initiated requests, and error handling
132-
- [docs/faq.md](docs/faq.md) – frequently asked questions and troubleshooting
133-
- External references:
134-
- [SDK API documentation](https://modelcontextprotocol.github.io/typescript-sdk/)
135-
- [Model Context Protocol documentation](https://modelcontextprotocol.io)
136-
- [MCP Specification](https://spec.modelcontextprotocol.io)
137-
- [Example Servers](https://github.com/modelcontextprotocol/servers)
126+
- [Server Guide](docs/server.md) — building MCP servers: transports, tools, resources, prompts, server-initiated requests, and deployment
127+
- [Client Guide](docs/client.md) — building MCP clients: connecting, tools, resources, prompts, server-initiated requests, and error handling
128+
- [FAQ](docs/faq.md) — frequently asked questions and troubleshooting
129+
- [API docs](https://modelcontextprotocol.github.io/typescript-sdk/)
130+
- [MCP documentation](https://modelcontextprotocol.io/docs)
131+
- [MCP specification](https://modelcontextprotocol.io/specification/latest)
138132

139133
## v1 (legacy) documentation and fixes
140134

docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ For production use, you can either:
6767

6868
### Where can I find runnable server examples?
6969

70-
The SDK ships several runnable server examples under `examples/server/src`. Start from the server examples index in [`examples/server/README.md`](../examples/server/README.md) and the entry-point quick start in the root [`README.md`](../README.md).
70+
The [server quickstart](./server-quickstart.md) walks you through building a weather server from scratch. Its complete source lives in [`examples/server-quickstart/`](https://github.com/modelcontextprotocol/typescript-sdk/tree/main/examples/server-quickstart/). For more advanced examples (OAuth, streaming, sessions, etc.), see the server examples index in [`examples/server/README.md`](../examples/server/README.md).
7171

7272
### Why did we remove `server` auth exports?
7373

0 commit comments

Comments
 (0)