Improve all readmes (#188)
* Improve all readmes * Address some of the comments
This commit is contained in:
parent
f26c52eab4
commit
9395583c49
1 changed files with 358 additions and 23 deletions
|
|
@ -1,6 +1,40 @@
|
|||
# An LLM-Powered Chatbot MCP Client written in Go
|
||||
|
||||
See the [Build an MCP client](https://modelcontextprotocol.io/docs/develop/build-client) tutorial for more information.
|
||||
An interactive chatbot MCP client: it launches an MCP server over stdio, lists its tools, and hands them to Claude, which can call them while answering your questions.
|
||||
|
||||
This example accompanies the [Build an MCP client](https://modelcontextprotocol.io/docs/develop/build-client) tutorial.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Go 1.25+
|
||||
- An [Anthropic API key](https://console.anthropic.com/) (optional — see below)
|
||||
|
||||
## Setup
|
||||
|
||||
Put your API key in a `.env` file (or export `ANTHROPIC_API_KEY` in your shell — the `.env` file is optional):
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# then edit .env and add your key
|
||||
```
|
||||
|
||||
## Run the client
|
||||
|
||||
Pass the command that starts the server — a binary or an interpreter plus its arguments:
|
||||
|
||||
```bash
|
||||
go run main.go ../weather-server-go/weather
|
||||
```
|
||||
|
||||
(Build the server first with `go build -o weather` in its directory.) Any server command works, for example the Python server:
|
||||
|
||||
```bash
|
||||
go run main.go uv --directory ../weather-server-python run weather.py
|
||||
```
|
||||
|
||||
Type a question (for example, "What's the weather in Sacramento?") and Claude answers using the server's tools. Type `quit` to exit.
|
||||
|
||||
Without an `ANTHROPIC_API_KEY`, the client still connects, prints the server's tools, and exits — useful for verifying the MCP wiring without credentials.
|
||||
|
||||
## Structured content
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue