Skip to content

Commit

Permalink
feat: add automated pings
Browse files Browse the repository at this point in the history
  • Loading branch information
punkpeye committed Dec 31, 2024
1 parent 9efce66 commit 69b5593
Show file tree
Hide file tree
Showing 4 changed files with 3,124 additions and 1,481 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ A TypeScript framework for building [MCP](https://modelcontextprotocol.io/) serv
- [SSE](#sse)
- [Progress notifications](#progress)
- [Typed server events](#typed-server-events)
- Automated SSE pings
- Roots
- CLI for [testing](#test-with-mcp-cli) and [debugging](#inspect-with-mcp-inspector)

Expand Down Expand Up @@ -462,6 +463,10 @@ You can listen to events emitted by the session using the `on` method:
session.on("rootsChanged", (event) => {
console.log("Roots changed:", event.roots);
});

session.on("error", (event) => {
console.error("Error:", event.error);
});
```

## Running Your Server
Expand Down
Loading

0 comments on commit 69b5593

Please sign in to comment.