first_mcp_server

sharmaratnesh/first_mcp_server

3.1

If you are the rightful owner of first_mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

MCP Server

This project is a basic MCP server implemented in Python. It provides an HTTP endpoint to return the sum of two numbers.

Project Structure

  • src/server.py: Entry point of the application.
  • src/handlers/math_handler.py: Contains the logic for summing two numbers.
  • src/utils/__init__.py: Utility functions and constants.
  • tests/test_server.py: Unit tests for the server functionality.
  • requirements.txt: Lists the dependencies required for the project.
  • README.md: Documentation for the project.

Setup

  1. Clone the repository:

    git clone <repository-url>
    
  2. Navigate to the project directory:

    cd mcp-server
    
  3. Install the required dependencies:

    pip install -r requirements.txt
    

Running the Server

To run the server, execute the following command:

python src/server.py

The server will start and listen for requests.

Testing

To run the tests, use the following command:

pytest tests/test_server.py