Update README.md

This commit is contained in:
Jeremiah Lowin 2024-12-02 09:28:13 -05:00 committed by GitHub
commit d6e5cefe3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,6 +98,8 @@ pip install fastmcp
Let's create a simple MCP server that exposes a calculator tool and some data:
```python
# server.py
from fastmcp import FastMCP
@ -119,14 +121,12 @@ def get_greeting(name: str) -> str:
return f"Hello, {name}!"
```
To use this server, you have two options:
1. Install it in [Claude Desktop](https://claude.ai/download):
You can install this server in [Claude Desktop](https://claude.ai/download) and interact with it right away by running:
```bash
fastmcp install server.py
```
2. Test it with the MCP Inspector:
Alternatively, you can test it with the MCP Inspector:
```bash
fastmcp dev server.py
```