Skip to content

Commit 002f823

Browse files
Merge branch 'main' into justin/call-tool-iserror
2 parents 7631cdb + 02c5021 commit 002f823

File tree

10 files changed

+1295
-105
lines changed

10 files changed

+1295
-105
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
publish:
3030
runs-on: ubuntu-latest
3131
if: github.event_name == 'release'
32+
environment: release
3233
needs: build
3334

3435
permissions:

src/cli.ts

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,17 @@ import { StdioServerTransport } from "./server/stdio.js";
1717
import { ListResourcesResultSchema } from "./types.js";
1818

1919
async function runClient(url_or_command: string, args: string[]) {
20-
const client = new Client({
21-
name: "mcp-typescript test client",
22-
version: "0.1.0",
23-
});
20+
const client = new Client(
21+
{
22+
name: "mcp-typescript test client",
23+
version: "0.1.0",
24+
},
25+
{
26+
capabilities: {
27+
sampling: {},
28+
},
29+
},
30+
);
2431

2532
let clientTransport;
2633

@@ -63,10 +70,15 @@ async function runServer(port: number | null) {
6370
console.log("Got new SSE connection");
6471

6572
const transport = new SSEServerTransport("/message", res);
66-
const server = new Server({
67-
name: "mcp-typescript test server",
68-
version: "0.1.0",
69-
});
73+
const server = new Server(
74+
{
75+
name: "mcp-typescript test server",
76+
version: "0.1.0",
77+
},
78+
{
79+
capabilities: {},
80+
},
81+
);
7082

7183
servers.push(server);
7284

@@ -97,10 +109,20 @@ async function runServer(port: number | null) {
97109
console.log(`Server running on http://localhost:${port}/sse`);
98110
});
99111
} else {
100-
const server = new Server({
101-
name: "mcp-typescript test server",
102-
version: "0.1.0",
103-
});
112+
const server = new Server(
113+
{
114+
name: "mcp-typescript test server",
115+
version: "0.1.0",
116+
},
117+
{
118+
capabilities: {
119+
prompts: {},
120+
resources: {},
121+
tools: {},
122+
logging: {},
123+
},
124+
},
125+
);
104126

105127
const transport = new StdioServerTransport();
106128
await server.connect(transport);

0 commit comments

Comments
 (0)