blob: cb7b16cf8f976dd13f0e40f07f0c16cae209af01 (
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
81
82
83
84
|
# 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://codeberg.org/knightdave/dawids-mcp-servers.git
cd dawids-mcp-servers
```
## Usage
### Running from repository root (recommended)
```bash
# Run with stdio transport (for MCP client integration)
uv --directory /path-to-repo/dawids-mcp-servers/servers/hello_world run mcp-hello-world --transport stdio
# Run with remote transport
uv --directory /path-to-repo/dawids-mcp-servers/servers/hello_world run mcp-hello-world --transport remote --host 0.0.0.0 --port 8080
```
Replace `/path-to-repo` with the actual path to where you cloned this repository.
### Alternative: Running from server directory
```bash
cd servers/hello_world
# Run with stdio transport
uv run mcp-hello-world --transport stdio
# Run with remote transport
uv run mcp-hello-world --transport remote --host 0.0.0.0 --port 8080
```
### Legacy methods
You can also run the server using Python module syntax:
```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
```
## 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
|