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-server
from themcp-weather-server:latest
image. It's used to get weather information.time-server_2
: This server runs a Docker container from themcp/time
image. 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
Authenticator App MCP Server
A secure MCP server for AI agents to interact with the Authenticator App for 2FA codes and passwords.
MCP Server Creator
A meta-server for dynamically generating MCP server configurations and Python code.
Windows API
An MCP server for interacting with the native Windows API, enabling control over system functions and resources.
CLI MCP Server
A secure MCP server for executing controlled command-line operations with comprehensive security features.
SCAST
Analyzes source code to generate UML and flow diagrams with AI-powered explanations.
Hyper MCP
A fast, secure, and extensible MCP server using WebAssembly plugins.
MCP Proxy Server
A proxy server for aggregating and serving multiple MCP resource servers through a single endpoint.
Google Jules MCP
Automate Google Jules, the AI coding assistant, for tasks like code reviews, repository management, and AI-powered development workflows.
MCP Server with Ollama Integration
An MCP server that integrates with Ollama to provide tools for file operations, calculations, and text processing. Requires a running Ollama instance.
Feishu MCP Server
An MCP server with built-in Feishu OAuth authentication, deployable on Cloudflare Workers.