Skip to content

Commit 3c403d6

Browse files
committed
Refactor README structure and improve MCP server usage instructions
1 parent c308c5b commit 3c403d6

File tree

1 file changed

+26
-30
lines changed

1 file changed

+26
-30
lines changed

README.md

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ The Model Context Protocol (MCP) is an open standard that enables LLMs to connec
1616
- [Testing with MCP Inspector](#testing-with-mcp-inspector)
1717
- [Contributing](#contributing)
1818

19-
## Getting Started
2019

21-
### Environment Setup
20+
## Environment Setup
2221

2322
#### 1. GitHub Codespaces
2423

@@ -43,9 +42,9 @@ If you prefer a plain local environment, use **uv** for dependency management:
4342
uv sync
4443
```
4544

46-
### Use MCP Server with GitHub Copilot Chat
45+
## Using the Expenses MCP Server
4746

48-
### Run the MCP Server in VS Code
47+
### Run the MCP Server in VS Code with GitHub Copilot (Codespace/Local Dev Container/Local)
4948

5049
1. Open `.vscode/mcp.json` in the editor
5150
1. Click the **Start** button (▶) above the server name `expenses-mcp`
@@ -55,42 +54,44 @@ uv sync
5554
1. Ensure `expenses-mcp` is selected in the list of available tools
5655
1. Ask Copilot to invoke the tool:
5756
- "Use add_expense to record a $12 lunch today paid with visa"
58-
- "Read the expenses resource"
5957

6058
### MCP Inspector
6159

62-
The MCP Inspector is a browser-based visual testing and debugging tool for MCP servers.
60+
The MCP Inspector is a browser-based visual testing and debugging tool for MCP servers. At the moment it does not work great with non STDIO MCP Servers when working inside of a Codespace.
6361

64-
#### Launch the MCP Inspector in GitHub Codespaces
62+
#### Launch the MCP Inspector and connect to STDIO MCP Server in GitHub Codespace
6563

6664
1. Run the following command in the terminal:
6765
```bash
6866
.devcontainer/launch-inspector-codespace.sh
6967
```
70-
7168
2. Note the **Inspector Proxy Address** and **Session Token** from the terminal output
7269

7370
3. In the **Ports** view, set port **6277** to **PUBLIC** visibility
7471

7572
4. Access the Inspector UI and configure:
76-
- **Transport Type**: `SSE`
77-
- **Inspector Proxy Address**: (from terminal output)
78-
- **Proxy Session Token**: (from terminal output)
73+
- **Transport Type**: `STDIO`
7974
- **Command**: `uv`
8075
- **Arguments**: `run main.py`
76+
- Expand configuration area
77+
- **Inspector Proxy Address**: (from terminal output)
78+
- **Proxy Session Token**: (from terminal output)
8179

82-
#### Launch the MCP Inspector inside of a Dev Container
80+
#### Launch the MCP Inspector and connect to STDIO MCP Server in VS Code and Dev Container
8381

8482
1. Run the following command in the terminal:
8583
```bash
8684
HOST=0.0.0.0 DANGEROUSLY_OMIT_AUTH=true npx -y @modelcontextprotocol/inspector
8785
```
88-
2. Open `http://localhost:6274` in your browser
89-
3. The Inspector should now connect to your MCP server
86+
1. Open `http://localhost:6274` in your browser
87+
1. Access the Inspector UI and configure:
88+
- **Transport Type**: `STDIO`
89+
- **Command**: `uv`
90+
- **Arguments**: `run main.py`
9091

9192
> **Note:** `HOST=0.0.0.0` is required in devcontainer environments to bind the Inspector to all network interfaces, allowing proper communication between the UI and proxy server. `DANGEROUSLY_OMIT_AUTH=true` disables authentication - only use in trusted development environments.
9293
93-
#### Launch the inspector locally without Dev Container:**
94+
#### Launch the inspector locally:**
9495

9596
1. Run the following command in the terminal:
9697
```bash
@@ -105,9 +106,8 @@ The MCP Inspector is a browser-based visual testing and debugging tool for MCP s
105106

106107
You can attach the VS Code debugger to the running MCP server to set breakpoints and inspect code execution.
107108

108-
### Debugging stdio server with GitHub Copilot
109+
### Debugging STDIO MCP server with GitHub Copilot in Codespace/Dev Container/locally
109110

110-
To debug the stdio server (`main.py`) while using it with GitHub Copilot:
111111

112112
1. Open `.vscode/mcp.json` in the editor
113113

@@ -121,25 +121,21 @@ To debug the stdio server (`main.py`) while using it with GitHub Copilot:
121121

122122
6. Set breakpoints in `main.py` and use the server from GitHub Copilot Chat. Breakpoints will be hit when tools are invoked.
123123

124-
### Debugging HTTP server with MCP Inspector
124+
### Debugging HTTP MCP server with GitHub Copilot in Codespace/Dev Container/locally
125125

126-
To debug the HTTP server (`main_http.py`) while testing with the MCP Inspector:
126+
1. Run the HTTP MCP Server in the terminal with `uv run -- python -m debugpy --listen 0.0.0.0:5678 main_http.py`
127127

128-
1. Start the HTTP server with debugpy enabled:
129-
```bash
130-
uv run -- python -m debugpy --listen 0.0.0.0:5678 main_http.py
131-
```
128+
1. Open `.vscode/mcp.json` in the editor
129+
130+
1. Start the **expenses-mcp-debug** server (instead of expenses-mcp)
132131

133-
2. In VS Code, open the Run and Debug panel (Ctrl+Shift+D / Cmd+Shift+D)
132+
1. In VS Code, open the Run and Debug panel (Ctrl+Shift+D / Cmd+Shift+D)
134133

135-
3. Select **"Attach to MCP Server"** from the dropdown and click the play button (or press F5)
134+
1. Select **"Attach to MCP Server"** from the dropdown and click the play button (or press F5)
136135

137-
4. Open the MCP Inspector UI and configure:
138-
- **Transport Type**: `HTTP`
139-
- **URL**: `http://localhost:8000`
140-
- Click **Connect**
136+
1. In GitHub Copilot Chat, make sure **expenses-mcp-debug** is selected in the tools menu
141137

142-
5. Set breakpoints in `main_http.py` and test your tools from the Inspector UI. Breakpoints will be hit when you invoke tools.
138+
1. Set breakpoints in `main_http.py` and use the server from GitHub Copilot Chat. Breakpoints will be hit when tools are invoked.
143139

144140
---
145141

0 commit comments

Comments
 (0)