- MCP Server Extension
MCP Server Extension
A basic MCP server for tool exposure using FastMCP and VS code extension distribution
Content
MCP Server Extension
Simple VS Code extension that automatically starts an MCP server for GitHub Copilot tool discovery.
Features
- Auto-starts MCP server when extension loads
- Three built-in tools for GitHub Copilot
- No configuration required
Available Tools
- add_numbers - Add two numbers together
- get_weather - Get weather forecast (simulated)
- list_files - List files in a directory
Installation
Option 1: Download Pre-built Extension
- Download the latest
.vsixfile from the releases or directly from this repository - Open VS Code
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) to open the Command Palette - Type "Extensions: Install from VSIX..." and select it
- Browse and select the downloaded
.vsixfile - Restart VS Code if prompted
Option 2: Build from Source
- Clone this repository:
git clone https://github.com/ranjanbinwani/mcp-server-extension.git cd mcp-server-extension - Install VS Code Extension Manager (if not already installed):
npm install -g vsce - Package the extension:
vsce package - Install the generated
.vsixfile using the steps from Option 1
Usage
- Install the extension - The extension automatically configures itself when VS Code loads
- Restart VS Code after installation to ensure proper configuration
- Open GitHub Copilot Chat
- Ask questions like:
- "Add 15 and 27"
- "What's the weather forecast for New York for 3 days?"
- "List files in the current directory"
GitHub Copilot will automatically discover and use the tools through the MCP protocol.
How It Works
The extension automatically:
- Installs the required Python dependencies (
fastmcp) - Configures the MCP server for GitHub Copilot discovery
- Sets up the proper MCP configuration files
- Makes the tools available through the stdio protocol
Troubleshooting
If GitHub Copilot doesn't discover the tools:
- Restart VS Code completely
- Check Python installation - Ensure Python 3.x is available in your PATH
- Manual configuration - The extension creates configuration files at:
%USERPROFILE%\.vscode\mcp_servers.json%USERPROFILE%\AppData\Roaming\Claude\claude_desktop_config.json
- Test the server independently:
The server should start and wait for stdio input.python mcp_server.py
Requirements
- Python 3.x (in PATH)
- VS Code 1.80.0+
- GitHub Copilot extension
- For building: Node.js and npm
Development & Building
Making Changes to the Extension
- Modify the code - Edit
extension.js,mcp_server.py, or other files as needed - Test your changes:
- Press
F5in VS Code to open an Extension Development Host window - Test the extension functionality in the new window
- Press
- Update version numbers:
- Increment the
versionfield inpackage.json - Update
server_versioninmcp_server.pyif you modified the server
- Increment the
- Build the extension:
This creates a newvsce package.vsixfile with your changes - Install and test the new
.vsixfile using the installation steps above
Adding New Tools
Edit mcp_server.py to add your own tools:
@server.tool()
def my_custom_tool(param: str) -> str:
"""Description of what your tool does."""
return f"Processed: {param}"
After adding tools:
- Save the file
- Test the Python server independently:
python mcp_server.py - Rebuild the extension:
vsce package - Reinstall the updated
.vsixfile - Restart VS Code to reload the MCP configuration
Publishing Changes
- Update the repository:
git add . git commit -m "Description of your changes" git push origin main - Include the .vsix file in your commits so users can download the latest version
- Create a release (optional) for major updates:
- Go to your GitHub repository
- Click "Releases" → "Create a new release"
- Upload the
.vsixfile as a release asset
License
MIT
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
CursorThe AI Code Editor
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
Tavily Mcp