ReMe/integrations/claude_code/reme/hooks/mcp_bridge.py
jinliyl 80b85dcfd8
chore(deps): upgrade dependencies and bump ReMe to 0.4.2.2 (#692)
* chore(deps): upgrade dependencies and bump ReMe to 0.4.2.2

* test(mcp): disable camelCase compatibility in CI

* fix(mcp): normalize implicit job input schemas

---------

Co-authored-by: huangsen <huangsen.huang@alibaba-inc.com>
2026-10-28 16:36:17 +08:00

23 lines
814 B
Python

#!/usr/bin/env python3
"""Host-managed stdio connection to the user's independently running ReMe service."""
from auto_memory import load_config
def main() -> None:
"""Resolve persistent settings on connection; leave MCP transport handling to FastMCP."""
config = load_config()
try:
from fastmcp.server import create_proxy
from fastmcp.server.providers.proxy import ProxyClient
except ImportError as exc:
raise SystemExit(
"ReMe MCP requires fastmcp>=4.1.4,<5 in the host's python3 environment (included in reme-ai).",
) from exc
upstream = ProxyClient(config["mcp_url"], timeout=config["request_timeout"])
proxy = create_proxy(upstream, name="ReMe")
proxy.run(transport="stdio", show_banner=False)
if __name__ == "__main__":
main()