home / mcp / mcp server example mcp server

MCP Server Example MCP Server

Deploys a Python-based MCP server with math and custom functions, deployable from GitHub and configurable via client mcp.json.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "abckiran-mcpserverexample": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/abckiran/mcpServerexample.git",
        "mcp-server"
      ]
    }
  }
}

You can deploy a lightweight MCP server that exposes mathematical operations and extensible tools for deepdive deployment scenarios. It supports quick remote deployment via UVX and a local development flow to run the server directly on your machine.

How to use

To use this MCP server, connect your MCP client to the available server endpoints to perform mathematical calculations and access custom functions. You can run the server locally during development or deploy it remotely for shared access. Your client will send requests to the MCP server and receive results for arithmetic operations and any additional tools you expose.

How to install

Prerequisites you need before installation: a JavaScript/TypeScript development environment and the UVX package manager. You will also need a networked environment if you intend to deploy remotely.

# Preferred method: install and run directly from a remote source
uvx --from git+https://github.com/abckiran/mcpServerexample.git mcp-server

If you prefer to set up locally for development, follow these steps to clone the project, install dependencies, and run the server.

git clone https://github.com/abckiran/mcpServerexample.git
cd mcpServerexample
uv sync
uv run mcp-server

Additional sections

Configuration for your MCP client is shown here. Use this in your client's mcp.json to point to the server you run locally or remotely. The identifier key (airbnb) is an example owner/namespace you provide in your client configuration.

{
  "mcpServers": {
    "airbnb": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/abckiran/mcpServerexample.git",
        "mcp-server"
      ]
    }
  }
}

Project structure highlights where the server entry point and core modules reside, useful for understanding how to extend or customize the server in your own workflow.

├── main.py                 # Main entry point
├── pyproject.toml         # Project configuration
├── src/
│   └── mcpserver/
│       ├── __init__.py
│       ├── __main__.py
│       └── deployment.py
└── README.md

Requirements to run this server include Python 3.12+ and the uv package manager for local development, ensuring environment compatibility for the commands shown.

Available tools

math_ops

Basic arithmetic operations exposed by the MCP server to perform calculations within your workflows.

custom_functions

Support for defining and using domain-specific functions to address your unique data processing needs.

github_deploy

Direct deployment from a GitHub repository to the MCP server, enabling seamless updates from source control.

MCP Server Example MCP Server - abckiran/mcpserverexample