Multi-Feature MCP Server
Provides comprehensive functionality including weather data, system utilities, Azure cloud management, and AI-powered image generation and editing. Features interactive parameter selection through MCP elicitation for enhanced user experience.
README
MCP Multi-Feature Server
This project is a Model Context Protocol (MCP) server implemented using Node.js and TypeScript, following the official MCP TypeScript SDK.
It provides multiple capabilities including weather data, system utilities, Azure integration, and AI-powered image generation and editing.
Features
- Current Weather: Get the current weather for any city
- Weather Forecast: Get a 3-day weather forecast for any city
- City Search: Find cities by name
- CLI Commands: Execute safe, whitelisted CLI commands
- Directory Listing: List files and directories
- System Info: Get basic system information
- Azure Integration: Manage Azure subscriptions and resource groups with MCP elicitation
- Azure Storage: Manage Azure Storage blobs and containers
- Image Generation: Generate images using AI models (gpt-image-1, flux.1-kontext-pro)
- Image Editing: Edit existing images with AI-powered modifications and enhancements
Getting Started
Prerequisites
- Node.js v18.x or higher
Install dependencies
npm install
Configure Environment
- Copy the sample environment file:
cp .env.sample .env
- Edit
.envfile to configure your image API endpoints:
GENERATE_IMAGE_API_URL=http://127.0.0.1:8000/v1/images/generations
EDIT_IMAGE_API_URL=http://127.0.0.1:8000/v1/images/edits
Build the project
npx tsc
Run the server (development)
npx ts-node src/server.ts
Run the server (compiled)
npm run start
Project Structure
src/server.ts: Main MCP server implementationpackage.json: Project configuration and dependenciestsconfig.json: TypeScript configuration.env: Environment configuration (create from .env.sample).env.sample: Environment configuration template.gitignore: Git ignore rules
Sample Prompts
You can use these prompts with an MCP-compatible client or extension:
-
Get current weather
currentWeather: city = SeattleWhat is the current weather in Paris?weather in Phoenix
-
Get weather forecast
forecast: city = New Yorkweather forecast for Seattle3-day forecast for London
-
Search for a city
searchCity: query = WashingtonFind cities named "Springfield"
-
Execute CLI commands
executeCommand: command = "git status"executeCommand: command = "ls -la"executeCommand: command = "npm --version"
-
List directory contents
listDirectory: path = "."listDirectory: path = "src"
-
Get system information
getSystemInfo
-
Azure subscription management
listAzureSubscriptionsgetCurrentAzureSubscription
-
Azure resource groups (with MCP elicitation)
listAzureResourceGroups(uses VS Code command palette for subscription selection)
-
Image generation
generateImages: prompt = "A futuristic cityscape at sunset"generateImages: prompt = "A cute robot", model = "flux.1-kontext-pro", size = "512x512", quality = "hd"generateImages: prompt = "Mountain landscape", model = "gpt-image-1", n = 2
-
Image editing
editImages: prompt = "Add a rainbow in the sky", image = "<base64-data>"editImages: prompt = "Change the car color to red", image = "<base64-data>", model = "gpt-image-1"editImages: prompt = "Remove the background", image = "<base64-data>", quality = "hd"
Configuration
Environment Variables
Create a .env file in the project root (copy from .env.sample):
# Image Generation API Configuration
GENERATE_IMAGE_API_URL=http://127.0.0.1:8000/v1/images/generations
# Image Editing API Configuration
EDIT_IMAGE_API_URL=http://127.0.0.1:8000/v1/images/edits
Note: You can configure separate endpoints for generation and editing to work with different services.
Image Generation API Requirements
The image generation tools require running API servers with the following endpoints:
POST /v1/images/generations- Generate images from text prompts (configured viaGENERATE_IMAGE_API_URL)POST /v1/images/edits- Edit images with AI modifications (configured viaEDIT_IMAGE_API_URL)
Supported Models:
gpt-image-1(Azure OpenAI DALL-E) - Default modelflux.1-kontext-pro(Flux model) - High-quality artistic generation
Model-Specific Features:
- gpt-image-1: Quality options (standard, hd), supports both generation and editing
- flux.1-kontext-pro: Standard quality only, optimized for creative content
Supported Sizes: 1024x1024 (default), 512x512, 256x256, and other standard dimensions Quality Options:
- gpt-image-1:
standard,hd - flux.1-kontext-pro:
standard
MCP Elicitation Features ⭐
This server demonstrates proper implementation of the MCP Elicitation specification with VS Code integration:
listAzureResourceGroups Tool
- Interactive Selection: When called without a
subscriptionIdparameter, triggers the VS Code MCP extension's command palette - Native Integration: Uses the official MCP elicitation protocol (
elicitation/createJSON-RPC request) - Rich UI: Shows subscription names with "(ACTIVE)" indicator in the selection dropdown
- Enum Schema: Provides structured choices with display names for better UX
How it works:
- Tool is called without
subscriptionIdparameter - Server sends
elicitation/createrequest to client - VS Code MCP extension shows command palette with subscription options
- User selects subscription from dropdown
- Tool continues with selected subscription ID
This showcases the proper way to implement interactive, user-driven parameter selection in MCP servers.
References
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。