feat: Implement Docker deployment with configurable SSE/STDIO modes and add get_current_time tool.
This commit is contained in:
33
README.md
33
README.md
@@ -44,12 +44,42 @@ CALDAV_PASSWORD=YourPassword
|
||||
## Usage
|
||||
|
||||
### Running Manually
|
||||
|
||||
#### Standard I/O (Default)
|
||||
You can run the server directly using `uv`. It communicates via standard input/output (stdio), so running it directly in a terminal will just wait for input.
|
||||
|
||||
```bash
|
||||
uv run src/server.py
|
||||
```
|
||||
|
||||
#### HTTP (SSE)
|
||||
To run the server over HTTP (Server-Sent Events) - useful for testing with Postman/Inspector or remote access:
|
||||
|
||||
```bash
|
||||
uv run uvicorn src.server:mcp.sse_app --host 0.0.0.0 --port 8000
|
||||
```
|
||||
**Endpoint:** `http://localhost:8000/sse`
|
||||
|
||||
### Docker Deployment
|
||||
|
||||
You can run the server using Docker and Docker Compose. Environment variables are loaded from the `.env` file.
|
||||
|
||||
**Build and Run (SSE Mode by default):**
|
||||
```bash
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
**Switching Modes:**
|
||||
The container supports two modes via the `MCP_MODE` environment variable:
|
||||
- `SSE` (default): Runs the HTTP server on port 8000.
|
||||
- `STDIO`: Runs the script via standard I/O.
|
||||
|
||||
To run in STDIO mode (e.g., for piping):
|
||||
```bash
|
||||
docker compose run -e MCP_MODE=STDIO -T caldev_mcp
|
||||
```
|
||||
|
||||
|
||||
### Configuring an MCP Client
|
||||
|
||||
To use this with an MCP client (like Claude Desktop or another MCP-compatible app), add the following configuration to your client's settings (e.g., `claude_desktop_config.json`):
|
||||
@@ -73,6 +103,9 @@ To use this with an MCP client (like Claude Desktop or another MCP-compatible ap
|
||||
|
||||
## Available Tools
|
||||
|
||||
- **`get_current_time()`**
|
||||
- Returns the current local machine time in ISO format.
|
||||
|
||||
- **`list_calendars()`**
|
||||
- Returns a list of all calendars the user has access to.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user