Skip to content

Commit fdb7ea2

Browse files
committed
Merge remote-tracking branch 'upstream/dev'
# Conflicts: # pyproject.toml # src/mcpo/main.py # uv.lock
2 parents 3dc7d24 + 39b4867 commit fdb7ea2

10 files changed

Lines changed: 1188 additions & 408 deletions

File tree

.dockerignore

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
########################
2+
# Version-control
3+
########################
4+
.git
5+
.gitignore
6+
.gitattributes
7+
8+
########################
9+
# Docker artefacts
10+
########################
11+
.dockerignore
12+
Dockerfile
13+
docker-compose.yml
14+
.docker/
15+
16+
########################
17+
# Python byte-code / Caches
18+
########################
19+
**/__pycache__/
20+
**/*.py[cod]
21+
*.so # compiled C extensions
22+
.pytest_cache/
23+
.mypy_cache/
24+
.nox/
25+
.tox/
26+
27+
########################
28+
# Virtual-envs & deps
29+
########################
30+
.venv/
31+
venv/
32+
env/
33+
*.egg-info/
34+
*.dist-info/
35+
build/
36+
dist/
37+
pip-wheel-metadata/
38+
39+
########################
40+
# Testing & coverage
41+
########################
42+
.coverage
43+
htmlcov/
44+
nosetests.xml
45+
coverage.xml
46+
47+
########################
48+
# Docs & generated reports
49+
########################
50+
docs/_build/
51+
52+
########################
53+
# IDE / Editor artefacts
54+
########################
55+
.idea/
56+
.vscode/
57+
.ropeproject/
58+
**/*.swp # Vim swap files
59+
60+
########################
61+
# Ops / secrets (keep these out of images!)
62+
########################
63+
*.env
64+
.env*
65+
*.pem
66+
*.key
67+
config.json
68+
########################
69+
# OS junk
70+
########################
71+
.DS_Store
72+
Thumbs.db

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ All notable changes to this project will be documented in this file.
1212
The format is based on Keep a Changelog,
1313
and this project adheres to Semantic Versioning.
1414

15+
## [0.0.17] - 2025-07-22
16+
17+
### Added
18+
19+
- 🔄 **Hot Reload Support for Configuration Files**: Added `--hot-reload` flag to watch your config file for changes and dynamically reload MCP servers without restarting the application—enabling seamless development workflows and runtime configuration updates.
20+
- 🤫 **HTTP Request Filtering for Cleaner Logs**: Added configurable log filtering to reduce noise from frequent HTTP requests, making debugging and monitoring much clearer in production environments.
21+
22+
### Changed
23+
24+
- ⬆️ **Updated MCP Package to v1.12.1**: Upgraded MCP dependency to resolve compatibility issues with Pydantic and improve overall stability and performance.
25+
- 🔧 **Normalized Streamable HTTP Configuration**: Streamlined configuration syntax for streamable-http servers to align with MCP standards while maintaining backward compatibility.
26+
1527
## [0.0.16] - 2025-07-02
1628

1729
### Added

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ mcpo --port 8000 --api-key "top-secret" --server-type "sse" -- http://127.0.0.1:
4949
You can also provide headers for the SSE connection:
5050

5151
```bash
52-
mcpo --port 8000 --api-key "top-secret" --server-type "sse" --headers '{"Authorization": "Bearer token", "X-Custom-Header": "value"}' -- http://127.0.0.1:8001/sse
52+
mcpo --port 8000 --api-key "top-secret" --server-type "sse" --header '{"Authorization": "Bearer token", "X-Custom-Header": "value"}' -- http://127.0.0.1:8001/sse
5353
```
5454

5555
To use a Streamable HTTP-compatible MCP server, specify the server type and endpoint:
5656

5757
```bash
58-
mcpo --port 8000 --api-key "top-secret" --server-type "streamable_http" -- http://127.0.0.1:8002/mcp
58+
mcpo --port 8000 --api-key "top-secret" --server-type "streamable-http" -- http://127.0.0.1:8002/mcp
5959
```
6060

6161
You can also run mcpo via Docker with no installation:
@@ -76,14 +76,22 @@ That’s it. Your MCP tool is now available at http://localhost:8000 with a gene
7676

7777
### 🔄 Using a Config File
7878

79-
You can serve multiple MCP tools via a single config file that follows the [Claude Desktop](https://modelcontextprotocol.io/quickstart/user) format:
79+
You can serve multiple MCP tools via a single config file that follows the [Claude Desktop](https://modelcontextprotocol.io/quickstart/user) format.
80+
81+
Enable hot-reload mode with `--hot-reload` to automatically watch your config file for changes and reload servers without downtime:
8082

8183
Start via:
8284

8385
```bash
8486
mcpo --config /path/to/config.json
8587
```
8688

89+
Or with hot-reload enabled:
90+
91+
```bash
92+
mcpo --config /path/to/config.json --hot-reload
93+
```
94+
8795
Example config.json:
8896

8997
```json
@@ -106,7 +114,7 @@ Example config.json:
106114
}
107115
},
108116
"mcp_streamable_http": {
109-
"type": "streamable_http",
117+
"type": "streamable-http",
110118
"url": "http://127.0.0.1:8002/mcp"
111119
} // Streamable HTTP MCP Server
112120
}
@@ -194,4 +202,4 @@ Not sure where to start? Feel free to open an issue or ask a question—we’re
194202
195203
---
196204
197-
✨ Let's build the future of interoperable AI tooling together!
205+
✨ Let's build the future of interoperable AI tooling together!

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ requires-python = ">=3.11"
1010
dependencies = [
1111
"click>=8.1.8",
1212
"fastapi>=0.115.12",
13-
"mcp>=1.8.0",
14-
"mcp[cli]>=1.8.0",
13+
"mcp>=1.12.1",
14+
"mcp[cli]>=1.12.1",
1515
"passlib[bcrypt]>=1.7.4",
1616
"pydantic>=2.11.1",
1717
"pyjwt[crypto]>=2.10.1",
1818
"python-dotenv>=1.1.0",
1919
"typer>=0.15.2",
2020
"uvicorn>=0.34.0",
21+
"watchdog>=4.0.0",
2122
]
2223

2324
[project.scripts]
@@ -30,6 +31,5 @@ build-backend = "hatchling.build"
3031
[dependency-groups]
3132
dev = [
3233
"pytest>=8.3.5",
33-
"pytest-asyncio>=1.1.0",
34-
"trio>=0.30.0",
34+
"pytest-asyncio>=0.23.0",
3535
]

src/mcpo/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ def main(
6666
headers: Annotated[
6767
Optional[str], typer.Option("--header", "-H", help="Headers in JSON format")
6868
] = None,
69+
hot_reload: Annotated[
70+
Optional[bool], typer.Option("--hot-reload", help="Enable hot reload for config file changes")
71+
] = False,
6972
):
7073
server_command = None
7174
if not config_path:
@@ -137,6 +140,7 @@ def main(
137140
ssl_keyfile=ssl_keyfile,
138141
path_prefix=path_prefix,
139142
headers=headers,
143+
hot_reload=hot_reload,
140144
)
141145
)
142146

0 commit comments

Comments
 (0)