Skip to content

Commit 4b84450

Browse files
committed
docs: add pdf-server screenshot to READMEs
1 parent ed89586 commit 4b84450

2 files changed

Lines changed: 19 additions & 13 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ Or edit your `package.json` manually:
6767
| [**Scenario Modeler**](examples/scenario-modeler-server) | [**Budget Allocator**](examples/budget-allocator-server) | [**Customer Segmentation**](examples/customer-segmentation-server) |
6868
| [![System Monitor](examples/system-monitor-server/grid-cell.png "Real-time OS metrics")](examples/system-monitor-server) | [![Transcript](examples/transcript-server/grid-cell.png "Live speech transcription")](examples/transcript-server) | [![Video Resource](examples/video-resource-server/grid-cell.png "Binary video via MCP resources")](examples/video-resource-server) |
6969
| [**System Monitor**](examples/system-monitor-server) | [**Transcript**](examples/transcript-server) | [**Video Resource**](examples/video-resource-server) |
70+
| [![PDF Server](examples/pdf-server/grid-cell.png "Interactive PDF viewer with chunked loading")](examples/pdf-server) | | |
71+
| [**PDF Server**](examples/pdf-server) | | |
7072

7173
### Starter Templates
7274

examples/pdf-server/README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# PDF Server
22

3+
![Screenshot](screenshot.png)
4+
35
A didactic MCP server example demonstrating key MCP Apps SDK patterns.
46

57
## What This Example Demonstrates
@@ -9,6 +11,7 @@ A didactic MCP server example demonstrating key MCP Apps SDK patterns.
911
On some host platforms, tool calls have size limits, so large PDFs cannot be sent in a single response. This example shows a possible workaround:
1012

1113
**Server side** (`pdf-loader.ts`):
14+
1215
```typescript
1316
// Returns chunks with pagination metadata
1417
async function loadPdfBytesChunk(entry, offset, byteCount) {
@@ -23,6 +26,7 @@ async function loadPdfBytesChunk(entry, offset, byteCount) {
2326
```
2427

2528
**Client side** (`mcp-app.ts`):
29+
2630
```typescript
2731
// Load in chunks with progress
2832
while (hasMore) {
@@ -99,11 +103,11 @@ bun examples/pdf-server/server.ts --stdio ./papers/
99103

100104
## Tools
101105

102-
| Tool | Visibility | Purpose |
103-
|------|------------|---------|
104-
| `list_pdfs` | Model | List indexed PDFs |
105-
| `display_pdf` | Model + UI | Display interactive viewer in chat |
106-
| `read_pdf_bytes` | App only | Chunked binary loading |
106+
| Tool | Visibility | Purpose |
107+
| ---------------- | ---------- | ---------------------------------- |
108+
| `list_pdfs` | Model | List indexed PDFs |
109+
| `display_pdf` | Model + UI | Display interactive viewer in chat |
110+
| `read_pdf_bytes` | App only | Chunked binary loading |
107111

108112
## Architecture
109113

@@ -118,14 +122,14 @@ server.ts # MCP server (233 lines)
118122

119123
## Key Patterns Shown
120124

121-
| Pattern | Implementation |
122-
|---------|---------------|
123-
| App-only tools | `_meta: { ui: { visibility: ["app"] } }` |
124-
| Chunked responses | `hasMore` + `offset` pagination |
125-
| Model context | `app.updateModelContext()` |
126-
| Display modes | `app.requestDisplayMode()` |
127-
| External links | `app.openLink()` |
128-
| Size negotiation | `app.sendSizeChanged()` |
125+
| Pattern | Implementation |
126+
| ----------------- | ---------------------------------------- |
127+
| App-only tools | `_meta: { ui: { visibility: ["app"] } }` |
128+
| Chunked responses | `hasMore` + `offset` pagination |
129+
| Model context | `app.updateModelContext()` |
130+
| Display modes | `app.requestDisplayMode()` |
131+
| External links | `app.openLink()` |
132+
| Size negotiation | `app.sendSizeChanged()` |
129133

130134
## Dependencies
131135

0 commit comments

Comments
 (0)