MCP Example

A Model Control Protocol (MCP) server built with FastMCP v2.0, featuring Dockerization, tests, and CI/CD automation.
  • python

0

GitHub Stars

python

Language

4 months ago

First Indexed

3 weeks ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "nykznykz-mcp_example": {
      "command": "uv",
      "args": [
        "run",
        "python",
        "-m",
        "mcp_server.main"
      ],
      "env": {
        "LOG_LEVEL": "INFO",
        "PYTHONPATH": "/path/to/project/src"
      }
    }
  }
}

You run an MCP server built with FastMCP v2.0 to expose programmable capabilities through a lightweight, scriptable interface. Start it locally for development or run it in containers to enable scalable, repeatable deployments. You can access built-in utilities and extend the server with your own tooling as needed.

How to use

You connect to the MCP server from an MCP client and invoke the available tools to perform actions or obtain results. Start the server locally and use the client to send requests to the local runtime. The server understands a standard set of tools, which you can call with the client to evaluate expressions, generate messages, or perform routine tasks. When the server is running, you interact with it by issuing tool calls through the MCP protocol and observing structured responses.

How to install

Prerequisites are installed on your machine before you begin.

Install Python 3.10 or newer and the uv dependency manager.

Optionally, install Docker to run the server in a container.

# Step 1: Clone the project
# Use your preferred URL here
# git clone <repository-url>
# cd mcp_example

# Step 2: Install dependencies using uv
uv sync

# Step 3: Start the server locally
uv run python -m mcp_server.main

Docker usage

If you prefer containerized deployment, you can build and run a Docker image that contains the MCP server and its runtime environment.

# Build the Docker image
docker build -t mcp-server .

# Run the container and expose the default port
docker run -p 8000:8000 mcp-server

# Alternative: use docker-compose if you have a compose setup
docker-compose up

Available tools

calculate

Evaluates mathematical expressions safely.

greet

Generates friendly greeting messages.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational