Skip to content

example: add example in progress #271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion examples/clients/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ url = "2.4"
tower = "0.5"
axum = "0.8"
reqwest = "0.12"
clap = { version = "4.0", features = ["derive"] }

[[example]]
name = "clients_sse"
Expand All @@ -51,4 +52,8 @@ path = "src/collection.rs"

[[example]]
name = "clients_oauth_client"
path = "src/auth/oauth_client.rs"
path = "src/auth/oauth_client.rs"

[[example]]
name = "clients_progress_test_client"
path = "src/progress_test_client.rs"
10 changes: 10 additions & 0 deletions examples/clients/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This directory contains Model Context Protocol (MCP) client examples implemented

## Example List


### SSE Client (`sse.rs`)

A client that communicates with an MCP server using Server-Sent Events (SSE) transport.
Expand Down Expand Up @@ -57,6 +58,15 @@ A client demonstrating how to authenticate with an MCP server using OAuth.
- Establishes an authorized connection to the MCP server using the acquired access token
- Demonstrates how to use the authorized connection to retrieve available tools and prompts

### Progress Test Client (`progress_test_client.rs`)

A client that communicates with an MCP server using progress notifications.

- Launches the `cargo run --example clients_progress_test_client -- --transport {stdio|sse|http|all}` to test the progress notifications
- Connects to the server using different transport methods
- Tests the progress notifications


## How to Run

Each example can be run using Cargo:
Expand Down
Loading
Loading