Skip to content

Commit c806e1e

Browse files
authored
Merge pull request #67 from koic/remove_chebang_from_example_files
Remove shebang from example files
2 parents b28a477 + 100d1a1 commit c806e1e

File tree

7 files changed

+11
-17
lines changed

7 files changed

+11
-17
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The server supports sending notifications to clients when lists of tools, prompt
5555

5656
The server provides three notification methods:
5757
- `notify_tools_list_changed()` - Send a notification when the tools list changes
58-
- `notify_prompts_list_changed()` - Send a notification when the prompts list changes
58+
- `notify_prompts_list_changed()` - Send a notification when the prompts list changes
5959
- `notify_resources_list_changed()` - Send a notification when the resources list changes
6060

6161
#### Notification Format
@@ -119,7 +119,6 @@ end
119119
If you want to build a local command-line application, you can use the stdio transport:
120120

121121
```ruby
122-
#!/usr/bin/env ruby
123122
require "mcp"
124123
require "mcp/server/transports/stdio_transport"
125124

@@ -157,7 +156,7 @@ transport.open
157156
You can run this script and then type in requests to the server at the command line.
158157

159158
```bash
160-
$ ./examples/stdio_server.rb
159+
$ ruby examples/stdio_server.rb
161160
{"jsonrpc":"2.0","id":"1","method":"ping"}
162161
{"jsonrpc":"2.0","id":"2","method":"tools/list"}
163162
```

examples/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A simple server that communicates over standard input/output. This is useful for
99

1010
**Usage:**
1111
```bash
12-
ruby examples/stdio_server.rb
12+
$ ruby examples/stdio_server.rb
1313
{"jsonrpc":"2.0","id":0,"method":"tools/list"}
1414
```
1515

@@ -25,11 +25,11 @@ A standalone HTTP server built with Rack that implements the MCP Streamable HTTP
2525

2626
**Usage:**
2727
```bash
28-
ruby examples/http_server.rb
28+
$ ruby examples/http_server.rb
2929
```
3030

3131
The server will start on `http://localhost:9292` and provide:
32-
- **Tools**:
32+
- **Tools**:
3333
- `ExampleTool` - adds two numbers
3434
- `echo` - echoes back messages
3535
- **Prompts**: `ExamplePrompt` - echoes back arguments as a prompt
@@ -41,12 +41,12 @@ A client that demonstrates how to interact with the HTTP server using all MCP pr
4141
**Usage:**
4242
1. Start the HTTP server in one terminal:
4343
```bash
44-
ruby examples/http_server.rb
44+
$ ruby examples/http_server.rb
4545
```
4646

4747
2. Run the client example in another terminal:
4848
```bash
49-
ruby examples/http_client.rb
49+
$ ruby examples/http_client.rb
5050
```
5151

5252
The client will demonstrate:
@@ -71,7 +71,7 @@ A specialized HTTP server designed to test and demonstrate Server-Sent Events (S
7171

7272
**Usage:**
7373
```bash
74-
ruby examples/streamable_http_server.rb
74+
$ ruby examples/streamable_http_server.rb
7575
```
7676

7777
The server will start on `http://localhost:9393` and provide detailed instructions for testing SSE functionality.
@@ -88,12 +88,12 @@ An interactive client that connects to the SSE stream and provides a menu-driven
8888
**Usage:**
8989
1. Start the SSE test server in one terminal:
9090
```bash
91-
ruby examples/streamable_http_server.rb
91+
$ ruby examples/streamable_http_server.rb
9292
```
9393

9494
2. Run the SSE test client in another terminal:
9595
```bash
96-
ruby examples/streamable_http_client.rb
96+
$ ruby examples/streamable_http_client.rb
9797
```
9898

9999
The client will:
@@ -133,7 +133,7 @@ curl -X POST http://localhost:9393 \
133133

134134
The HTTP server implements the MCP Streamable HTTP transport protocol:
135135

136-
1. **Initialize Session**:
136+
1. **Initialize Session**:
137137
- Client sends POST request with `initialize` method
138138
- Server responds with session ID in `Mcp-Session-Id` header
139139

examples/http_client.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env ruby
21
# frozen_string_literal: true
32

43
require "net/http"

examples/http_server.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env ruby
21
# frozen_string_literal: true
32

43
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))

examples/stdio_server.rb

100755100644
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env ruby
21
# frozen_string_literal: true
32

43
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))

examples/streamable_http_client.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env ruby
21
# frozen_string_literal: true
32

43
require "net/http"

examples/streamable_http_server.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env ruby
21
# frozen_string_literal: true
32

43
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))

0 commit comments

Comments
 (0)