You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/mcp_agent/data/templates/README_init.md
+46-11Lines changed: 46 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,9 @@ Welcome! This project was generated by `mcp-agent init`. It’s a minimal, reada
15
15
16
16
## Quick start
17
17
18
-
1. Add API keys to `mcp_agent.secrets.yaml` (or set env vars):
18
+
1. Add your OpenAI API key to `mcp_agent.secrets.yaml` (or set `OPENAI_API_KEY`env var).
19
19
20
-
-`OPENAI_API_KEY` (recommended)
21
-
-`ANTHROPIC_API_KEY` (optional)
20
+
NOTE: You can use another supported provider (e.g. Anthropic) instead, just be sure to set its API key in the `mcp_agent.secrets.yaml` (or set its env var) and import/use the relevant `AugmentedLLM` in `main.py`.
22
21
23
22
2. Review `mcp_agent.config.yaml`:
24
23
@@ -30,6 +29,7 @@ Welcome! This project was generated by `mcp-agent init`. It’s a minimal, reada
30
29
3. Run locally:
31
30
32
31
```bash
32
+
uv pip install -r requirements.txt
33
33
uv run main.py
34
34
```
35
35
@@ -38,23 +38,58 @@ You’ll see two summaries printed:
38
38
- A summary of `README.md` from your current directory.
39
39
- A summary of the intro page at modelcontextprotocol.io.
40
40
41
-
4. Deploy a remote MCP server:
42
-
43
-
### Run as an MCP server
41
+
4. Run locally as an MCP server:
44
42
45
43
- In `main.py`, UNCOMMENT the server lines that call `create_mcp_server_for_app(agent_app)` and `run_sse_async()`.
46
44
- Start the server: `uv run main.py`
45
+
- Once you see the server started, e.g.
46
+
```bash
47
+
Uvicorn running on http://127.0.0.1:8000
48
+
```
49
+
you can connect to it with your preferred MCP Client. For example, you can use [MCP Inspector](https://github.com/modelcontextprotocol/inspector) to explore and test the server:
When you're ready to deploy, ensure the required API keys are set in `mcp_agent.secrets.yaml` and then run:
58
+
59
+
```bash
60
+
uv run mcp-agent login
61
+
```
62
+
63
+
to authenticate to mcp-agent cloud. You will be redirected to the login page, create an mcp-agent cloud account through Google or Github.
47
64
48
-
When you're ready to deploy, simply run:
65
+
Set up your mcp-agent cloud API Key and copy & paste it into your terminal
49
66
50
67
```bash
51
-
mcp-agent deploy "hello_world"
68
+
INFO: Directing to MCP Agent Cloud API login...
69
+
Please enter your API key 🔑:
52
70
```
53
71
54
-
- This wraps your app as a hosted MCP SSE server.
55
-
- Anything decorated with `@app.tool` (or `@app.async_tool`) runs as a Temporal workflow in the cloud.
72
+
In your terminal, deploy the MCP app:
73
+
74
+
```bash
75
+
uv run mcp-agent deploy hello_world
76
+
```
77
+
78
+
You will then be prompted to specify the type of secret to save your OpenAI API key as. Select (1) deployment secret so that it is available to the deployed server.
79
+
80
+
The `deploy` command will bundle the app files and deploy them, wrapping your app as a hosted MCP SSE server with a URL of the form:
81
+
`https://<server_id>.deployments.mcp-agent.com`.
82
+
83
+
Anything decorated with `@app.tool` (or `@app.async_tool`) runs as a Temporal workflow in the cloud.
84
+
85
+
Since the mcp-agent app is exposed as an MCP server, it can be used in any MCP client just
86
+
like any other MCP server. For example, you can inspect and test the server using MCP Inspector:
0 commit comments