blob: 6c932159e0d7434ce338698a61cdfe5d5c7de9b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Hello World MCP Server
A simple MCP server that demonstrates the basic functionality of the Model Context Protocol (MCP).
## Features
This server provides:
1. A static resource with a welcome message
2. A simple "hello" tool that returns a greeting message
3. A greeting prompt template
## Installation
```bash
# Clone the repository
git clone https://github.com/your-username/dawids-mcp-servers.git
cd dawids-mcp-servers/servers/hello_world
# Create a virtual environment and install dependencies
uv venv
uv pip install -e .
```
## Usage
### Running the Server
You can run the server with either stdio or remote transport:
```bash
# Run with stdio transport (default)
python -m mcp_server_hello_world
# Run with remote transport on a specific host and port
python -m mcp_server_hello_world --transport remote --host 0.0.0.0 --port 8080
```
### Using with Claude Desktop
To install the server in Claude Desktop:
```bash
mcp install /path/to/servers/hello_world
```
### Development Mode
For development and testing:
```bash
mcp dev /path/to/servers/hello_world
```
## API Reference
### Resources
- `hello://welcome` - Returns a welcome message
### Tools
- `hello` - Takes a `name` parameter and returns a personalized greeting
### Prompts
- `greeting` - Takes a `name` parameter and returns a greeting prompt template
## Development
### Running Tests
```bash
cd /path/to/servers/hello_world
uv run pytest
```
## License
MIT
|