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"})
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Tableau MCP
A suite of tools for developers to build AI applications that integrate with Tableau.
Stock Ticker MCP Server
A demo MCP server that provides rude responses to stock queries.
Phone
Control your Android phone using ADB commands. Requires ADB tools and an Android device with USB debugging enabled.
Laravel Loop
An MCP server for Laravel applications to connect with AI assistants using the MCP protocol.
Kestra Python MCP Server
A Python implementation of a Model Context Protocol server for interacting with Kestra.
Script Generator Server
A simple note storage system with tools for adding notes and generating scripts from them.
Code Scalpel
Code Scalpel is an MCP server that upgrades your AI coding agent with surgical, graph-based tools for precise analysis, atomic refactoring, and 99% lower token costs.
Cisco NSO MCP Server
An MCP server for Cisco NSO that exposes its data and operations as MCP primitives.
MATLAB
Execute MATLAB scripts and functions via MCP clients. Requires a local MATLAB installation.
Streamable HTTP Server Example
An example MCP server demonstrating streamable HTTP responses using Node.js.