Skip to content

Commit e95f4ca

Browse files
committed
feat: implement mcp server
1 parent d96d870 commit e95f4ca

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

.vscode/mcp.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"servers": {
3+
"burger-mcp": {
4+
"type": "stdio",
5+
"command": "npm",
6+
"args": [
7+
"run",
8+
"start:local",
9+
"--workspace=burger-mcp"
10+
]
11+
}
12+
}
13+
}

packages/burger-mcp/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
This is the Burger MCP server, exposing the Burger API as a Model Context Protocol (MCP) server. The MCP server allows LLMs to interact with the burger ordering process through MCP tools.
1515

1616
This server supports the following transport types:
17-
- **SSE**
1817
- **Streamable HTTP**
19-
- **Stdio** (currently only supported when starting the server locally with `npm start`)
18+
- **SSE** (legacy protocol, for backward compatibility)
19+
- **Stdio** (currently only supported when starting the server locally with `npm start:local`)
2020

2121
The remote server is deployed with [Azure Container Apps](https://learn.microsoft.com/azure/container-apps/overview).
2222

@@ -46,12 +46,12 @@ First, you need to start the Burger API and Burger MCP server locally.
4646
npx -y @modelcontextprotocol/inspector
4747
```
4848
2. Ctrl+click to load the MCP Inspector web app from the URL displayed by the app (e.g. http://127.0.0.1:6274)
49-
3. In the MCP Inspector, set the transport type to **SSE** and
50-
3. Put `http://localhost:3000/sse` in the URL field and click on the **Connect** button.
49+
3. In the MCP Inspector, set the transport type to **Streamable HTTP** and
50+
3. Put `http://localhost:3000/mcp` in the URL field and click on the **Connect** button.
5151
4. In the **Tools** tab, select **List Tools**. Click on a tool and select **Run Tool**.
5252

5353
> [!NOTE]
54-
> This application also provides a streamable HTTP endpoint if you use `/mcp` instead of `/sse` in the URL field.
54+
> This application also provides an SSE endpoint if you use `/sse` instead of `/mcp` in the URL field.
5555

5656
## Development
5757

@@ -71,7 +71,7 @@ If you prefer to run the project locally, follow [these instructions](../../READ
7171
You can run the following command to run the application server:
7272

7373
```bash
74-
npm start:server
74+
npm start
7575
```
7676

7777
Alternatively, you can also use Docker to run the application:
@@ -81,4 +81,4 @@ npm run docker:build
8181
npm run docker:run
8282
```
8383

84-
This will start the application in a Docker container. The MCP server is then available at `http://localhost:3000/sse` or `http://localhost:3000/mcp` for the SSE and streamable HTTP endpoints, respectively.
84+
This will start the application in a Docker container. The MCP server is then available at `http://localhost:3000/mcp` or `http://localhost:3000/sse` for the streamable HTTP and SSE endpoints, respectively.

packages/burger-mcp/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"type": "module",
77
"exports": "./lib/local.js",
88
"scripts": {
9-
"start": "tsx src/local.ts",
10-
"start:server": "tsx src/server.ts",
11-
"dev": "tsx watch src/local.ts",
12-
"dev:server": "tsx watch src/server.ts",
9+
"start": "tsx src/server.ts",
10+
"start:local": "tsx src/local.ts",
11+
"dev": "tsx watch src/server.ts",
12+
"dev:local": "tsx watch src/local.ts",
1313
"build": "tsc",
1414
"clean": "rimraf lib",
1515
"docker:build": "docker build -t burger-mcp .",

0 commit comments

Comments
 (0)