You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MCP supports providing completion suggestions for prompt arguments and resource template parameters. With the context parameter, servers can provide completions based on previously resolved values:
Copy file name to clipboardExpand all lines: examples/clients/simple-chatbot/README.MD
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,11 +25,12 @@ This example demonstrates how to integrate the Model Context Protocol (MCP) into
25
25
```plaintext
26
26
LLM_API_KEY=your_api_key_here
27
27
```
28
+
28
29
**Note:** The current implementation is configured to use the Groq API endpoint (`https://api.groq.com/openai/v1/chat/completions`) with the `llama-3.2-90b-vision-preview` model. If you plan to use a different LLM provider, you'll need to modify the `LLMClient` class in `main.py` to use the appropriate endpoint URL and model parameters.
29
30
30
31
3.**Configure servers:**
31
32
32
-
The `servers_config.json` follows the same structure as Claude Desktop, allowing for easy integration of multiple servers.
33
+
The `servers_config.json` follows the same structure as Claude Desktop, allowing for easy integration of multiple servers.
33
34
Here's an example:
34
35
35
36
```json
@@ -46,9 +47,11 @@ This example demonstrates how to integrate the Model Context Protocol (MCP) into
46
47
}
47
48
}
48
49
```
50
+
49
51
Environment variables are supported as well. Pass them as you would with the Claude Desktop App.
50
52
51
53
Example:
54
+
52
55
```json
53
56
{
54
57
"mcpServers": {
@@ -72,7 +75,7 @@ This example demonstrates how to integrate the Model Context Protocol (MCP) into
72
75
```
73
76
74
77
2.**Interact with the assistant:**
75
-
78
+
76
79
The assistant will automatically detect available tools and can respond to queries based on the tools provided by the configured servers.
77
80
78
81
3.**Exit the session:**
@@ -86,6 +89,7 @@ This example demonstrates how to integrate the Model Context Protocol (MCP) into
86
89
-**Server Integration**: Supports any MCP-compatible server, tested with various server implementations including Uvicorn and Node.js.
87
90
88
91
### Class Structure
92
+
89
93
-**Configuration**: Manages environment variables and server configurations
90
94
-**Server**: Handles MCP server initialization, tool discovery, and execution
91
95
-**Tool**: Represents individual tools with their properties and formatting
@@ -107,5 +111,3 @@ This example demonstrates how to integrate the Model Context Protocol (MCP) into
107
111
- If it's a direct response → return to user
108
112
- Tool results are sent back to LLM for interpretation
The server will not start without these environment variables properly set.
34
34
35
-
36
35
## Running the Server
37
36
38
37
```bash
@@ -49,23 +48,26 @@ The server will start on `http://localhost:8000`.
49
48
This server supports multiple transport protocols that can run on the same port:
50
49
51
50
#### SSE (Server-Sent Events) - Default
51
+
52
52
```bash
53
53
uv run mcp-simple-auth
54
54
# or explicitly:
55
55
uv run mcp-simple-auth --transport sse
56
56
```
57
57
58
58
SSE transport provides endpoint:
59
+
59
60
-`/sse`
60
61
61
62
#### Streamable HTTP
63
+
62
64
```bash
63
65
uv run mcp-simple-auth --transport streamable-http
64
66
```
65
67
66
68
Streamable HTTP transport provides endpoint:
67
-
-`/mcp`
68
69
70
+
-`/mcp`
69
71
70
72
This ensures backward compatibility without needing multiple server instances. When using SSE transport (`--transport sse`), only the `/sse` endpoint is available.
71
73
@@ -79,13 +81,13 @@ The only tool in this simple example. Returns the authenticated user's GitHub pr
79
81
80
82
**Returns**: GitHub user profile data including username, email, bio, etc.
81
83
82
-
83
84
## Troubleshooting
84
85
85
86
If the server fails to start, check:
87
+
86
88
1. Environment variables `MCP_GITHUB_GITHUB_CLIENT_ID` and `MCP_GITHUB_GITHUB_CLIENT_SECRET` are set
87
89
2. The GitHub OAuth app callback URL matches `http://localhost:8000/github/callback`
88
90
3. No other service is using port 8000
89
91
4. The transport specified is valid (`sse` or `streamable-http`)
90
92
91
-
You can use [Inspector](https://github.com/modelcontextprotocol/inspector) to test Auth
93
+
You can use [Inspector](https://github.com/modelcontextprotocol/inspector) to test Auth
Copy file name to clipboardExpand all lines: examples/servers/simple-streamablehttp-stateless/README.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,6 @@ A stateless MCP server example demonstrating the StreamableHttp transport withou
10
10
- Task lifecycle scoped to individual requests
11
11
- Suitable for deployment in multi-node environments
12
12
13
-
14
13
## Usage
15
14
16
15
Start the server:
@@ -35,7 +34,6 @@ The server exposes a tool named "start-notification-stream" that accepts three a
35
34
-`count`: Number of notifications to send (e.g., 5)
36
35
-`caller`: Identifier string for the caller
37
36
38
-
39
37
## Client
40
38
41
-
You can connect to this server using an HTTP client. For now, only the TypeScript SDK has streamable HTTP client examples, or you can use [Inspector](https://github.com/modelcontextprotocol/inspector) for testing.
39
+
You can connect to this server using an HTTP client. For now, only the TypeScript SDK has streamable HTTP client examples, or you can use [Inspector](https://github.com/modelcontextprotocol/inspector) for testing.
0 commit comments