@@ -9,7 +9,6 @@ A demonstration project showcasing Model Context Protocol (MCP) implementations
99- [ Python Scripts] ( #python-scripts )
1010- [ MCP Server Configuration] ( #mcp-server-configuration )
1111- [ Debugging] ( #debugging )
12- - [ License] ( #license )
1312
1413## Prerequisites
1514
@@ -25,15 +24,15 @@ A demonstration project showcasing Model Context Protocol (MCP) implementations
2524
26251 . Install dependencies using ` uv ` :
2726
28- ``` bash
29- uv sync
30- ```
27+ ``` bash
28+ uv sync
29+ ```
3130
32312 . Copy ` .env-sample ` to ` .env ` and configure your environment variables:
3332
34- ``` bash
35- cp .env-sample .env
36- ```
33+ ``` bash
34+ cp .env-sample .env
35+ ```
3736
38373 . Edit ` .env ` with your API credentials. Choose one of the following providers by setting ` API_HOST ` :
3938 - ` github ` - GitHub Models (requires ` GITHUB_TOKEN ` )
@@ -43,14 +42,14 @@ cp .env-sample .env
4342
4443## Python Scripts
4544
46- Run any script with: ` uv run <script_name > `
45+ Run any script with: ` uv run <script_path > `
4746
48- - ** basic_mcp_http.py** - MCP server with HTTP transport on port 8000
49- - ** basic_mcp_stdio.py** - MCP server with stdio transport for VS Code integration
50- - ** langchainv1_mcp_http .py** - LangChain agent with MCP integration
51- - ** langchainv1_mcp_github .py** - LangChain tool filtering demo with GitHub MCP (requires ` GITHUB_TOKEN ` )
52- - ** openai_agents_tool_filtering .py** - OpenAI Agents SDK tool filtering demo with Microsoft Learn MCP
53- - ** agentframework_mcp_learn .py** - Microsoft Agent Framework integration with MCP
47+ - ** servers/ basic_mcp_http.py** - MCP server with HTTP transport on port 8000
48+ - ** servers/ basic_mcp_stdio.py** - MCP server with stdio transport for VS Code integration
49+ - ** agents/langchainv1_http .py** - LangChain agent with MCP integration
50+ - ** agents/langchainv1_github .py** - LangChain tool filtering demo with GitHub MCP (requires ` GITHUB_TOKEN ` )
51+ - ** agents/agentframework_learn .py** - Microsoft Agent Framework integration with MCP
52+ - ** agents/agentframework_http .py** - Microsoft Agent Framework integration with local Expenses MCP server
5453
5554## MCP Server Configuration
5655
@@ -63,22 +62,25 @@ The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) is a deve
6362** For stdio servers:**
6463
6564``` bash
66- npx @modelcontextprotocol/inspector uv run basic_mcp_stdio.py
65+ npx @modelcontextprotocol/inspector uv run servers/ basic_mcp_stdio.py
6766```
6867
6968** For HTTP servers:**
7069
71701 . Start the HTTP server:
72- ``` bash
73- uv run basic_mcp_http.py
74- ```
71+
72+ ``` bash
73+ uv run servers/basic_mcp_http.py
74+ ```
7575
76762 . In another terminal, run the inspector:
77- ``` bash
78- npx @modelcontextprotocol/inspector http://localhost:8000/mcp
79- ```
77+
78+ ``` bash
79+ npx @modelcontextprotocol/inspector http://localhost:8000/mcp
80+ ```
8081
8182The inspector provides a web interface to:
83+
8284- View available tools, resources, and prompts
8385- Test tool invocations with custom parameters
8486- Inspect server responses and errors
@@ -92,65 +94,37 @@ The `.vscode/mcp.json` file configures MCP servers for GitHub Copilot integratio
9294
9395- ** expenses-mcp** : stdio transport server for production use
9496- ** expenses-mcp-debug** : stdio server with debugpy on port 5678
95- - ** expenses-mcp-http** : HTTP transport server at ` http://localhost:8000/mcp `
96- - ** expenses-mcp-http-debug** : stdio server with debugpy on port 5679
97+ - ** expenses-mcp-http** : HTTP transport server at ` http://localhost:8000/mcp ` . You must start this server manually with ` uv run servers/basic_mcp_http.py ` before using it.
9798
9899** Switching Servers:**
99100
100- Configure which server GitHub Copilot uses by selecting it in the Chat panel selecting the tools icon.
101+ Configure which server GitHub Copilot uses by opening the Chat panel, selecting the tools icon, and choosing the desired MCP server from the list .
101102
102- ## Debugging
103-
104- ### Debug Configurations
105-
106- The ` .vscode/launch.json ` provides four debug configurations:
107-
108- #### Launch Configurations (Start server with debugging)
109-
110- 1 . ** Launch MCP HTTP Server (Debug)**
111- - Directly starts ` basic_mcp_http.py ` with debugger attached
112- - Best for: Standalone testing and LangChain script debugging
113-
114- 2 . ** Launch MCP stdio Server (Debug)**
115- - Directly starts ` basic_mcp_stdio.py ` with debugger attached
116- - Best for: Testing stdio communication
103+ ![ Servers selection dialog] ( readme_serverselect.png )
117104
118- #### Attach Configurations (Attach to running server)
105+ ** Example input **
119106
120- 3 . ** Attach to MCP Server (stdio)** - Port 5678
121- - Attaches to server started via ` expenses-mcp-debug ` in ` mcp.json `
122- - Best for: Debugging during GitHub Copilot Chat usage
107+ Use a query like this to test the expenses MCP server:
123108
124- 4 . ** Attach to MCP Server (HTTP) ** - Port 5679
125- - Attaches to server started via ` expenses-mcp-http-debug ` in ` mcp.json `
126- - Best for: Debugging HTTP server during Copilot usage
109+ ```
110+ Log expense for 50 bucks of pizza on my amex today
111+ ```
127112
128- ### Debugging Workflow
113+ ![ Example GitHub Copilot Chat Input ] ( readme_samplequery.png )
129114
130- #### Option 1: Launch and Debug (Standalone)
115+ ## Debugging
131116
132- Use this approach for debugging with MCP Inspector or LangChain scripts :
117+ The ` .vscode/launch.json ` provides one debug configuration :
133118
134- 1 . Set breakpoints in ` basic_mcp_http.py ` or ` basic_mcp_stdio.py `
135- 2 . Press ` Cmd+Shift+D ` to open Run and Debug
136- 3 . Select "Launch MCP HTTP Server (Debug)" or "Launch MCP stdio Server (Debug)"
137- 4 . Press ` F5 ` or click the green play button
138- 5 . Connect MCP Inspector or run your LangChain script to trigger breakpoints
139- - For HTTP: ` npx @modelcontextprotocol/inspector http://localhost:8000/mcp `
140- - For stdio: ` npx @modelcontextprotocol/inspector uv run basic_mcp_stdio.py ` (start without debugger first)
119+ ** Attach to MCP Server (stdio)** : Attaches to server started via ` expenses-mcp-debug ` in ` mcp.json `
141120
142- #### Option 2: Attach to Running Server ( Copilot Integration)
121+ To debug an MCP server with GitHub Copilot Chat:
143122
144- 1 . Set breakpoints in your MCP server file
145- 1 . Start the debug server via ` mcp.json ` configuration:
146- - Select ` expenses-mcp-debug ` or ` expenses-mcp-http-debug `
123+ 1 . Set breakpoints in the MCP server code in ` servers/basic_mcp_stdio.py `
124+ 1 . Start the debug server via ` mcp.json ` configuration by selecting ` expenses-mcp-debug `
1471251 . Press ` Cmd+Shift+D ` to open Run and Debug
148- 1 . Select appropriate "Attach to MCP Server" configuration
149- 1 . Press ` F5 ` to attach
150- 1 . Select correct expense mcp server in GitHub Copilot Chat tools
126+ 1 . Select "Attach to MCP Server (stdio) " configuration
127+ 1 . Press ` F5 ` or the play button to start the debugger
128+ 1 . Select the expenses- mcp-debug server in GitHub Copilot Chat tools
1511291 . Use GitHub Copilot Chat to trigger the MCP tools
152- 1 . Debugger pauses at breakpoints
153-
154- ## License
155-
156- MIT
130+ 1 . Debugger pauses at breakpoints
0 commit comments