Skip to content

Commit 62e0ef7

Browse files
committed
launch go mcps; run fly mcp server remotely
1 parent eab9211 commit 62e0ef7

File tree

3 files changed

+38
-20
lines changed

3 files changed

+38
-20
lines changed

mcp/examples.html.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,16 @@ fly mcp launch "npx -y @modelcontextprotocol/server-filesystem /data/" \
5959
--claude --server volume --volume data:/data:initial_size=1GB
6060
```
6161

62+
You can do the same thing with the [go mcp-filesystem-server](https://github.com/mark3labs/mcp-filesystem-server?tab=readme-ov-file#mcp-filesystem-server):
63+
64+
```sh
65+
fly mcp launch "go run github.com/mark3labs/mcp-filesystem-server@latest /data/" \
66+
--claude --server volume --volume data:/data:initial_size=1GB
67+
```
68+
6269
## GitHub
6370

64-
If you have the Github CLI installed, you can launch the [GitHub MCP Server](https://github.com/github/github-mcp-server?tab=readme-ov-file#github-mcp-server):
71+
If you have the [Github CLI](https://cli.github.com/) installed, you can launch the [GitHub MCP Server](https://github.com/github/github-mcp-server?tab=readme-ov-file#github-mcp-server):
6572

6673
```sh
6774
flyctl mcp launch --image ghcr.io/github/github-mcp-server \

mcp/flyctl-server.html.md

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ order: 6
99
![Scotty talking to a computer](/blog/mcp-provisioning/assets/Hello.webp)
1010
</s>
1111

12+
## Adding fly mcp server to your LLM
13+
14+
```
15+
fly mcp server --claude
16+
```
17+
18+
You can also specify `--cursor`, `--neovim`, `--vscode`, `--windsurf`, or `--zed`. Or specify a configuration file path directly using `--config`.
19+
1220
`flyctl` provides an MCP server that you can use to provision your application. At the present time, most of the following commands and their subcommands are supported:
1321

1422
* [apps](https://fly.io/docs/flyctl/apps/)
@@ -19,6 +27,8 @@ order: 6
1927
* [status](https://fly.io/docs/flyctl/status/)
2028
* [volumes](https://fly.io/docs/flyctl/volumes/)
2129

30+
## Running with the MCP inspector
31+
2232
You can explore the `flyctl mcp server` using the MCP inspector:
2333

2434
<div class="important">
@@ -31,20 +41,21 @@ fly mcp server -i
3141

3242
Navigate to http://127.0.0.1:6274 ; click Connect; then List Tools; then a tool like `fly-platform-status`, `fly-orgs-list`, `fly-apps-list`, or `fly-machines-list`; then fill out the form (if any) and click Run tool.
3343

34-
To see the same MCP server using an [MCP client](https://modelcontextprotocol.io/clients), a configuration like the following is used:
35-
36-
```json
37-
{
38-
"mcpServers": {
39-
"filesystem": {
40-
"command": "/Users/rubys/.fly/bin/flyctl",
41-
"args": [
42-
"mcp",
43-
"server"
44-
]
45-
}
46-
}
47-
}
48-
```
44+
## Running on a separate machine
45+
46+
<div class="warning icon">
47+
<b>Running this server remotely can give others access to run commands on your behalf. Read the following carefully before proceeding.</b>
48+
</div>
49+
50+
Both `--sse` and `-stream` options are supported.
51+
52+
The default bind address is `127.0.0.1` which will only allow requests from the same machine. to override specify `--bind-addr`.
53+
54+
Authentication tokens come from (in priority order):
55+
56+
* `bearer-token` from the `Authentication` header on the request
57+
* `--access-token` flag on the `fly mcp server` command
58+
* `FLY_ACCESS_TOKEN` environment variable
59+
60+
See [Access Tokens](https://fly.io/docs/security/tokens/) for information on how to obtain a token.
4961

50-
Adjust the flyctl path, restart your LLM (for example, Claude) and try out the tools.

mcp/launch.html.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ toc: false
55
order: 1
66
---
77

8-
Launching an `npx`, `uvx`, or docker image stdio MCP server into a Fly machine and configuring a MCP client to connect to it is a one-step process. The `fly mcp launch` command will create a new Fly machine, install the MCP server, and configure the MCP client to connect to it.
8+
Launching an `npx`, `uvx`, `go run` or docker image stdio MCP server into a Fly machine and configuring a MCP client to connect to it is a one-step process. The `fly mcp launch` command will create a new Fly machine, install the MCP server, and configure the MCP client to connect to it.
99

1010
```sh
1111
fly mcp launch "uvx mcp-server-time" --claude --server time
@@ -31,7 +31,7 @@ You can use the [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspe
3131
As the MCP inspector is a Node.js application, you need to [Download and install Node.js](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) first. MacOS users can use [`brew install node`](https://formulae.brew.sh/formula/node).
3232
</div>
3333

34-
```
34+
```sh
3535
fly mcp inspect --claude --server time
3636
```
3737

@@ -41,7 +41,7 @@ This command is simply a convenience, all it does is run the inspector set up to
4141

4242
When you no longer need the MCP, you can destroy it:
4343

44-
```
44+
```sh
4545
fly mcp destroy --claude --server time
4646
```
4747

0 commit comments

Comments
 (0)