Follow Discord
Sweep 24 Nov 2026 · 22:58Z Build v2.1.332 549 read Stable v2.1.325 Latest v2.1.331 Next v2.1.332 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · mcp

Build an MCP client changeddocs/draft/develop/build-client

Nearest release: v2.1.332, published under an hour after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 24 Nov 2026 21:48 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 24 Nov 2026 22:07 UTC.

Upstream edited
Recorded here
Lines+19added
Lines−17removed
From line 14 where the diff opens
First seen 26 Aug 2026 this site's first read of the page
Recorded edits11to this page, all time

The whole hunk

from line 14, old and new numbered
/
lines
from line 14
1414>
1515> Before starting, ensure your system meets these requirements:
1616>
17> * Mac or Windows computer
17> * macOS, Windows, or Linux computer
1818> * Latest Python version installed
1919> * Latest version of `uv` installed
2020> * You must use the Python MCP SDK 2.0.0 or higher
from line 257
257257> ```python theme={null}
258258> async def main() -> None:
259259> if len(sys.argv) < 2:
260> print("Usage: python client.py <path_to_server_script>")
260> print("Usage: uv run client.py <path_to_server_script>")
261261> sys.exit(1)
262262>
263263> async with Client(stdio_client(server_params(sys.argv[1]))) as client:
from line 339
339339>
340340> > [!NOTE]
341341> >
342> > If you're continuing [the weather tutorial from the server quickstart](https://github.com/modelcontextprotocol/quickstart-resources/tree/main/weather-server-python), your command might look something like this: `python client.py .../quickstart-resources/weather-server-python/weather.py`
342> > If you're continuing [the weather tutorial from the server quickstart](https://github.com/modelcontextprotocol/quickstart-resources/tree/main/weather-server-python), your command might look something like this: `uv run client.py .../quickstart-resources/weather-server-python/weather.py`
343343>
344344> The client will:
345345>
from line 422
422422>
423423> If you see:
424424>
425> * `FileNotFoundError`: Check your server path
426> * `Connection refused`: Ensure the server is running and the path is correct
425> * `FileNotFoundError`: Ensure the command (`python`, `node`) is available
426> * `Connection closed`: Check your server path, and run the server command directly to see whether it starts
427427> * `Tool execution failed`: Verify the tool's required environment variables are set
428428> * `Timeout error`: Consider raising `read_timeout_seconds` on the `Client`
429429 
from line 435
435435>
436436> Before starting, ensure your system meets these requirements:
437437>
438> * Mac or Windows computer
438> * macOS, Windows, or Linux computer
439439> * Node.js 20 or higher installed
440440> * Latest version of `npm` installed
441441> * Anthropic API key (Claude)
from line 887
887887> If you see:
888888>
889889> * `Error: Cannot find module`: Check your build folder and ensure TypeScript compilation succeeded
890> * `Connection refused`: Ensure the server is running and the path is correct
890> * `Connection closed`: Check your server path, and run the server command directly to see whether it starts
891891> * `Tool execution failed`: Verify the tool's required environment variables are set
892892> * `ANTHROPIC_API_KEY is not set`: Check your .env file and environment variables
893893> * `TypeError`: Ensure you're using the correct types for tool arguments
from line 1088
10881088>
10891089> Before starting, ensure your system meets these requirements:
10901090>
1091> * JDK 11 or higher
1091> * JDK 17 or higher
10921092> * Anthropic API key (Claude)
10931093>
10941094> ## Setting up your environment
from line 1139
11391139> application
11401140> }
11411141>
1142> version = "0.1.0"
1143>
11421144> repositories {
11431145> mavenCentral()
11441146> }
from line 1515
15131515>
15141516> ```bash theme={null}
15151517> # Relative path
1516> java -jar build/libs/client.jar ./server/build/libs/server.jar
1518> java -jar build/libs/kotlin-mcp-client-0.1.0-all.jar ./server/build/libs/server.jar
15171519>
15181520> # Absolute path
1519> java -jar build/libs/client.jar /Users/username/projects/mcp-server/build/libs/server.jar
1521> java -jar build/libs/kotlin-mcp-client-0.1.0-all.jar /Users/username/projects/mcp-server/build/libs/server.jar
15201522>
15211523> # Windows path (either format works)
1522> java -jar build/libs/client.jar C:/projects/mcp-server/build/libs/server.jar
1523> java -jar build/libs/client.jar C:\\projects\\mcp-server\\build\\libs\\server.jar
1524> java -jar build/libs/kotlin-mcp-client-0.1.0-all.jar C:/projects/mcp-server/build/libs/server.jar
1525> java -jar build/libs/kotlin-mcp-client-0.1.0-all.jar C:\\projects\\mcp-server\\build\\libs\\server.jar
15241526> ```
15251527>
15261528> ### Build Issues
15271529>
15281530> * Use `./gradlew build` or `./gradlew shadowJar` (not `./gradlew jar`) to create the shadow JAR with all dependencies
1529> * If you get JDK version errors, ensure your installed JDK version matches or exceeds the `jvmToolchain` setting in `build.gradle.kts`
1531> * If you get JDK version errors, ensure your installed JDK is version 17 or higher
15301532>
15311533> ### Response Timing
15321534>
from line 1544
15421544>
15431545> If you see:
15441546>
1545> * `Connection refused`: Ensure the server is running and the path is correct
1547> * `Connection closed`: Check your server path, and run the server command directly to see whether it starts
15461548> * `Tool execution failed`: Verify the tool's required environment variables are set
15471549> * `[Stopped after 10 tool-use turns]`: Claude was still requesting tools when `MAX_TOOL_TURNS` ran out, so raise the cap or narrow the query
15481550> * `ANTHROPIC_API_KEY is not set`: Check your environment variables
from line 1752
17501752>
17511753> Before starting, ensure your system meets these requirements:
17521754>
1753> * Mac or Windows computer
1755> * macOS, Windows, or Linux computer
17541756> * Ruby 3.2.0 or higher installed (required by the [Anthropic SDK](https://github.com/anthropics/anthropic-sdk-ruby))
17551757> * Anthropic API key (Claude)
17561758>
from line 2169
21672169>
21682170> If you see:
21692171>
2170> * `Errno::ENOENT`: Check your server path and ensure the command (`ruby`, `python3`, `node`) is available
2171> * `Connection refused`: Ensure the server is running and the path is correct
2172> * `Failed to spawn server process`: Ensure the command (`ruby`, `python3`, `node`) is available
2173> * `Server process has exited` or `Failed to write to server process`: Check your server path, and run the server command directly to see whether it starts
21722174> * `Tool execution failed`: Verify the tool's required environment variables are set
21732175> * `Anthropic::Errors::AuthenticationError`: Check your `.env` file has a valid `ANTHROPIC_API_KEY`
21742176> * `[Stopped after 10 tool-use turns]`: Claude kept asking for tools, so the client stopped at `MAX_TOOL_TURNS` and returned the text collected so far
Feedback