MCP Test Project
A simple MCP server/client implementation for testing Hermes Agent, exposing basic tools like echo, add, and get_server_info via stdio.
README
MCP Test Project
A simple Model Context Protocol (MCP) server/client implementation for testing Hermes Agent with GitHub MCP.
Overview
This project demonstrates a basic MCP (Model Context Protocol) implementation with:
- MCP Server (
src/mcp_test/server.py) - Exposes tools via stdio transport - MCP Client (
src/mcp_test/client.py) - Connects to and tests MCP servers - Data Models (
src/mcp_test/models.py) - Pydantic models for tool calls and results - Tests (
tests/) - Unit tests for models and server functionality
Project Structure
mcp/
├── pyproject.toml # Project configuration (dependencies, build, tools)
├── Makefile # Development commands
├── .gitignore # Git ignore rules
├── README.md # This file
├── src/
│ └── mcp_test/
│ ├── __init__.py # Package exports
│ ├── models.py # Pydantic data models
│ ├── server.py # MCP server implementation
│ └── client.py # MCP client implementation
└── tests/
├── __init__.py # Test package
├── test_models.py # Tests for data models
└── test_server.py # Tests for server functionality
Requirements
- Python 3.10+
- Dependencies listed in
pyproject.toml
Installation
# Install in development mode with dev dependencies
make install
# Or manually:
pip install -e ".[dev]"
Running the Server
# Using make
make run-server
# Or directly
python -m mcp_test.server
The server runs over stdio and exposes these tools:
echo- Echo back a messageadd- Add two numbersget_server_info- Get server metadata
Running the Client
# Using make
make run-client
# Or directly
python -m mcp_test.client
The client will connect to the server (started as a subprocess) and run test calls.
Running Tests
# Run all tests with coverage
make test
# Or directly
pytest -v
Code Quality
# Run linting
make lint
# Format code
make format
# Type checking
make typecheck
# All checks
make check
Development
Adding a New Tool
- Add the tool definition in
server.pyin thelist_tools()handler - Add the implementation method (e.g.,
_tool_your_tool) - Add the tool call handler in
call_tool() - Add a convenience method in
client.pyif needed - Write tests in
tests/test_server.py
Running a Single Test
pytest tests/test_models.py::test_tool_call_creation -v
License
MIT License - see LICENSE file for details.
Related
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.