Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/mcp/cli/claude.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Claude app integration utilities."""

import json
import os
import sys
from pathlib import Path

Expand All @@ -17,6 +18,10 @@ def get_claude_config_path() -> Path | None:
path = Path(Path.home(), "AppData", "Roaming", "Claude")
elif sys.platform == "darwin":
path = Path(Path.home(), "Library", "Application Support", "Claude")
elif sys.platform.startswith("linux"):
path = Path(
os.environ.get("XDG_CONFIG_HOME", Path.home() / ".config"), "Claude"
)
else:
return None

Expand Down
6 changes: 4 additions & 2 deletions src/mcp/client/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@


@asynccontextmanager
async def websocket_client(url: str) -> AsyncGenerator[
async def websocket_client(
url: str,
) -> AsyncGenerator[
tuple[
MemoryObjectReceiveStream[types.JSONRPCMessage | Exception],
MemoryObjectSendStream[types.JSONRPCMessage],
Expand Down Expand Up @@ -59,7 +61,7 @@ async def ws_reader():

async def ws_writer():
"""
Reads JSON-RPC messages from write_stream_reader and
Reads JSON-RPC messages from write_stream_reader and
sends them to the server.
"""
async with write_stream_reader:
Expand Down