Spaces:
Running
Running
Jeremiah Lowin commited on
Update fastmcp cloud server requirements (#1497)
Browse files
docs/deployment/fastmcp-cloud.mdx
CHANGED
|
@@ -10,20 +10,51 @@ tag: NEW
|
|
| 10 |
|
| 11 |
FastMCP Cloud is a young product and we welcome your feedback. Please join our [Discord](https://discord.com/invite/aGsSC3yDF4) to share your thoughts and ideas, and you can expect to see new features and improvements every week.
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
<Tip>
|
| 14 |
FastMCP Cloud is completely free while in beta!
|
| 15 |
</Tip>
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
## Getting Started
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
### Step 1: Create a Project
|
| 22 |
|
| 23 |
-
Visit [fastmcp.cloud](https://fastmcp.cloud) and sign in with your GitHub account.
|
|
|
|
| 24 |
<img src="/assets/images/fastmcp_cloud/quickstart.png" alt="FastMCP Cloud Quickstart Screen" />
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
| 27 |
|
| 28 |
The configuration screen lets you specify:
|
| 29 |
- **Name**: The name of your project. This will be used to generate a unique URL for your server.
|
|
@@ -32,31 +63,27 @@ The configuration screen lets you specify:
|
|
| 32 |
|
| 33 |
Note that FastMCP Cloud will automatically detect yours server's Python dependencies from either a `requirements.txt` or `pyproject.toml` file.
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
### Step 3: Deploy
|
| 38 |
|
| 39 |
-
Once you
|
| 40 |
-
1.
|
| 41 |
2. Build your FastMCP server
|
| 42 |
3. Deploy it to a unique URL
|
| 43 |
4. Make it immediately available for connections
|
| 44 |
|
| 45 |
<img src="/assets/images/fastmcp_cloud/deployment.png" alt="FastMCP Cloud Deployment Screen" />
|
| 46 |
|
|
|
|
| 47 |
|
| 48 |
-
## Connect to Your Server
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
```
|
| 53 |
https://your-project-name.fastmcp.app/mcp
|
| 54 |
```
|
| 55 |
|
| 56 |
-
You should be able to connect to it as soon as you see the deployment succeed!
|
| 57 |
|
| 58 |
<img src="/assets/images/fastmcp_cloud/connect.png" alt="FastMCP Cloud Connection Screen" />
|
| 59 |
|
| 60 |
-
## Testing Changes
|
| 61 |
-
|
| 62 |
-
Any time you open a PR to your connected repo, FastMCP Cloud will create a new server for that branch and deploy it on a unique URL. This allows you to test your changes before merging to production. Each merge to main will trigger a new deployment of the "production" version of your server.
|
|
|
|
| 10 |
|
| 11 |
FastMCP Cloud is a young product and we welcome your feedback. Please join our [Discord](https://discord.com/invite/aGsSC3yDF4) to share your thoughts and ideas, and you can expect to see new features and improvements every week.
|
| 12 |
|
| 13 |
+
|
| 14 |
+
<Note>
|
| 15 |
+
FastMCP Cloud supports both **FastMCP 2.0** servers and also **FastMCP 1.0** servers that were created with the official MCP Python SDK.
|
| 16 |
+
</Note>
|
| 17 |
+
|
| 18 |
<Tip>
|
| 19 |
FastMCP Cloud is completely free while in beta!
|
| 20 |
</Tip>
|
| 21 |
|
| 22 |
+
## Prerequisites
|
| 23 |
+
|
| 24 |
+
To use FastMCP Cloud, you'll need a [GitHub](https://github.com) account. In addition, you'll need a GitHub repo that contains a FastMCP server instance. If you don't want to create one yet, you can proceed to [step 1](#step-1-create-a-project) and use the FastMCP Cloud quickstart repo.
|
| 25 |
+
|
| 26 |
+
Your repo can be public or private, but must include at least a Python file that contains a FastMCP server instance.
|
| 27 |
+
<Tip>
|
| 28 |
+
To ensure your file is compatible with FastMCP Cloud, you can run `fastmcp inspect <file.py:server_object>` to see what FastMCP Cloud will see when it runs your server.
|
| 29 |
+
</Tip>
|
| 30 |
+
|
| 31 |
+
If you have a `requirements.txt` or `pyproject.toml` in the repo, FastMCP Cloud will automatically detect your server's dependencies and install them for you. Note that your file *can* have an `if __name__ == "__main__"` block, but it will be ignored by FastMCP Cloud.
|
| 32 |
+
|
| 33 |
+
For example, a minimal server file might look like:
|
| 34 |
+
|
| 35 |
+
```python
|
| 36 |
+
from fastmcp import FastMCP
|
| 37 |
+
|
| 38 |
+
mcp = FastMCP("MyServer")
|
| 39 |
+
|
| 40 |
+
@mcp.tool
|
| 41 |
+
def hello(name: str) -> str:
|
| 42 |
+
return f"Hello, {name}!"
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
## Getting Started
|
| 46 |
|
| 47 |
+
There are just three steps to deploying a server to FastMCP Cloud:
|
| 48 |
|
| 49 |
### Step 1: Create a Project
|
| 50 |
|
| 51 |
+
Visit [fastmcp.cloud](https://fastmcp.cloud) and sign in with your GitHub account. Then, create a project. Each project corresponds to a GitHub repo, and you can create one from either your own repo or using the FastMCP Cloud quickstart repo.
|
| 52 |
+
|
| 53 |
<img src="/assets/images/fastmcp_cloud/quickstart.png" alt="FastMCP Cloud Quickstart Screen" />
|
| 54 |
|
| 55 |
+
Next, you'll be prompted to configure your project.
|
| 56 |
+
|
| 57 |
+
<img src="/assets/images/fastmcp_cloud/create_project.png" alt="FastMCP Cloud Configuration Screen" />
|
| 58 |
|
| 59 |
The configuration screen lets you specify:
|
| 60 |
- **Name**: The name of your project. This will be used to generate a unique URL for your server.
|
|
|
|
| 63 |
|
| 64 |
Note that FastMCP Cloud will automatically detect yours server's Python dependencies from either a `requirements.txt` or `pyproject.toml` file.
|
| 65 |
|
| 66 |
+
### Step 2: Deploy Your Server
|
|
|
|
|
|
|
| 67 |
|
| 68 |
+
Once you configure your project, FastMCP Cloud will:
|
| 69 |
+
1. Clone the repository
|
| 70 |
2. Build your FastMCP server
|
| 71 |
3. Deploy it to a unique URL
|
| 72 |
4. Make it immediately available for connections
|
| 73 |
|
| 74 |
<img src="/assets/images/fastmcp_cloud/deployment.png" alt="FastMCP Cloud Deployment Screen" />
|
| 75 |
|
| 76 |
+
FastMCP Cloud will monitor your repo and redeploy your server whenever you push a change to the `main` branch. In addition, FastMCP Cloud will build and deploy servers for every PR your open, hosting them on unique URLs, so you can test changes before updating your production server.
|
| 77 |
|
| 78 |
+
### Step 3: Connect to Your Server
|
| 79 |
|
| 80 |
+
Once your server is deployed, it will be accessible at a URL like:
|
| 81 |
|
| 82 |
```
|
| 83 |
https://your-project-name.fastmcp.app/mcp
|
| 84 |
```
|
| 85 |
|
| 86 |
+
You should be able to connect to it as soon as you see the deployment succeed! FastMCP Cloud provides instant connection options for popular LLM clients:
|
| 87 |
|
| 88 |
<img src="/assets/images/fastmcp_cloud/connect.png" alt="FastMCP Cloud Connection Screen" />
|
| 89 |
|
|
|
|
|
|
|
|
|