Skip to content

Commit

Permalink
Merge pull request #100 from TheFloatingString/main
Browse files Browse the repository at this point in the history
Add missing imports in `README.md` example
  • Loading branch information
jspahrsummers authored Jan 2, 2025
2 parents 3164da6 + 2ef54d3 commit f7a47cd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ npm install @modelcontextprotocol/sdk
```typescript
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
import {
ListResourcesRequestSchema,
ReadResourceRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";

const transport = new StdioClientTransport({
command: "path/to/server",
Expand Down Expand Up @@ -61,6 +65,10 @@ const resourceContent = await client.request(
```typescript
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
ListResourcesRequestSchema,
ReadResourceRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";

const server = new Server({
name: "example-server",
Expand Down

0 comments on commit f7a47cd

Please sign in to comment.