Get the FREE Ultimate OpenClaw Setup Guide →

mcp

Custom MCP server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ynnekf-mcp-server uvx run main.py

How to use

This MCP server implements a simple Model Context Protocol (MCP) server designed to manage context information for clients and enable models to interact through a standardized MCP RESTful interface. It supports context management, ensuring that models can access relevant data and state for each client, and it adheres to MCP specifications to remain compatible with MCP-enabled clients and tools. You can integrate this server with Copilot Chat by exposing resources and tools as MCP endpoints, then referencing them within your Copilot configuration to enable dynamic, context-aware interactions.

To use the server, install UV (a Python package manager) and create a managed UV project, then add the MCP component to your project dependencies. Run the server using UV, which will start the MCP service and expose its REST API for client requests. The documentation mentions a typical workflow of running the server with commands like uv run mcp install main or uv run main.py, depending on your setup. Once running, you can define MCP resources (endpoints/tools) and interact with them via the MCP protocol, enabling clients to retrieve context, manage sessions, and invoke model interactions in a standardized way.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • Access to the Internet to install dependencies
  • UV (https://docs.astral.sh/uv) for Python package management (recommended)

Installation steps:

  1. Install UV (if not already installed): curl -LsSf https://astral.sh/uv/install.sh | sh source $HOME/.local/bin/env

  2. Initialize a UV-managed project: uv init .

  3. Add the MCP component to your project dependencies (MCP specifically): uv add "mcp[cli]"

  4. Install project dependencies and prepare the MCP server: uv install

  5. Run the MCP server (examples shown). You can adapt to your environment:

    • Using the MCP command via UV: uv run mcp install main
    • Running the server directly (if you have a main.py entry): uv run main.py

Note: The README describes running the server with commands like uv run mcp dev main.py or uv run main.py depending on how you structure your project. Adjust the run command to point to your server entry file (main.py or equivalent) and ensure your UV project is properly configured with the MCP resources you want to expose.

Additional notes

Tips and common considerations:

  • Ensure your environment exposes the MCP resources you intend to use with Copilot Chat by configuring .vscode/mcp.json in your project root, pointing to the appropriate uv command and script.
  • If you encounter module or path issues, verify that your UV environment is activated and that the entry script (e.g., main.py) is in the correct location relative to where you run uv run.
  • The MCP RESTful API is the primary interface for client interactions; refer to your API docs for endpoint details, authentication, and payload formats.
  • When testing locally with Copilot Chat, ensure the Copilot configuration includes the MCP resource type and correct command invocation so Copilot can discover and use the server tools.
  • Environment variables can be added under env in mcp_config if your MCP server requires configuration (e.g., for authentication, database connections, or context sources).

Related MCP Servers

Sponsor this space

Reach thousands of developers