Skip to main content
Glama

MCP Template Server

by BJW101102

MCP-Template

a Python starter project for building an MCP (Model Context Protocol) server. It includes a server, a client pool to manage multiple connections safely, and a Jupyter notebook demonstrating how to use the tools and communicate with the AI. The project is structured to make it easy to add your own tools, prompts, and workflows. To get started, clone the repository, install dependencies, run the server, and use the notebook to test and interact with your MCP setup.

Prerequisites:

  • Create a virtual environment (conda or python) and activate it

    # Python Virtual Environment (Create) python -m venv .venv # Activating (Windows) .\.venv\Scripts\activate # Activating (Linux/MacOS) source .venv/bin/activate
    # Conda Virtual Environment (Create) conda create -n myenv python=3.11 # Activating conda activate myenv
  • pip install the requirements (in the environment)

    pip install -r requirements.txt
  • Make sure you have an Azure client (or OpenAI; you may need to update the code if new fields are required). Create a .env file in the project root directory with the following fields:

    AZURE_API_KEY="Your API Key" ENDPOINT="Your Endpoint" VERSION="Your OpenAI Version" MODEL="Your Azure OpenAI Model"

Sources

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A Python starter template for building MCP servers with client connection management and Jupyter notebook integration. Provides a structured foundation for adding custom tools, prompts, and workflows to create AI-powered applications.

  1. Sources

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/BJW101102/MCP-Template'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server