MCP Server Demonstration
A demonstration on setting up and using MCP servers within Cursor, with Docker examples.
MCP Server Demonstration
This repository demonstrates how to set up and use MCP (Model Context Protocol) servers within Cursor. MCP allows you to define custom tools that the AI assistant can use to perform actions, such as fetching data from an API or running a local script.
Configuration
The MCP servers are configured in the .cursor/mcp.json file. This file contains a JSON object that defines one or more servers.
{
"mcpServers": {
"docker-server_2": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--name",
"mcp-weather-server",
"mcp-weather-server:latest"
],
"env": {
"DEBUG": "mcp:*"
}
},
"time-server_2": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/time"
],
"env": {
"DEBUG": "mcp:*"
}
}
}
}
Servers
This project defines two MCP servers:
docker-server_2: This server runs a Docker container namedmcp-weather-serverfrom themcp-weather-server:latestimage. It's used to get weather information.time-server_2: This server runs a Docker container from themcp/timeimage. It's used to get the current time in a specific timezone.
Usage
You can interact with these servers by asking the Cursor assistant questions that would trigger the tools defined by these servers.
Getting the Time
User: what time is it in Boston?
Assistant Tool Call: mcp_time-server_2_get_current_time({timezone: "America/New_York"})
Getting the Weather
User: what's the temperature in Boston?
Assistant: I can get the temperature for you. Do you want it in Celsius or Fahrenheit?
User: F
Assistant Tool Call: mcp_docker-server_2_get_weather_2({city: "Boston", units: "fahrenheit"})
相关服务器
Scout Monitoring MCP
赞助Put performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
赞助Access financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Hound MCP
Hound is a free, open-source MCP server that gives AI coding agents a nose for supply chain security. It scans packages for vulnerabilities, checks licenses, inspects dependency trees, and detects typosquatting — with zero API keys, zero config, and zero cost.
DevBrain
Finds relevant code snippets, developer articles, and blog posts based on your queries.
Victron ModBus TCP
Server that connects to Victron Energy GX devices on local network.
Replicate Ideogram V3 Balanced
Generate images using the Ideogram V3 Balanced model on Replicate.
FastAPI with MCP
A FastAPI application demonstrating MCP integration for mathematical operations and tool registration.
Remote MCP Server (Authless)
A template for deploying a remote, auth-less MCP server on Cloudflare Workers.
jarp-mcp
Java Archive Reader Protocol MCP server - Give AI agents X-ray vision into compiled Java code by decompiling JAR/WAR/EAR files and Maven/Gradle dependencies
AIO-MCP Server
An MCP server with integrations for GitLab, Jira, Confluence, and YouTube, providing AI-powered search and development utility tools.
Flutter MCP
A real-time MCP server providing Flutter/Dart documentation and pub.dev package information to AI assistants, supporting over 50,000 packages on demand.
AvaloniaUI
Tools, resources, and guidance for building cross-platform applications with AvaloniaUI.