- Home
- MCP servers
- MCP Server Basic
MCP Server Basic
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"harishivam1411-mcp-tutorial": {
"command": "uv",
"args": [
"run",
"mcp",
"run"
]
}
}
}This MCP server example demonstrates a minimal server that exposes simple tools and a greeting resource, illustrating how to implement and run an MCP server locally for development and testing.
How to use
Use an MCP client to interact with the server by issuing requests to the server’s tools and resources. The server defines two tools that perform arithmetic operations and a greeting resource that returns a personalized message. With an MCP client, you can invoke the add and subtract tools to compute results and request a greeting using a name.
How to install
Prerequisites include Python and the MCP CLI tool. The repository uses a virtual environment and the MCP CLI to install and run the server.
uv init mcp-server-basic
cd mcp-server-basic
uv venv
.venv\Scripts\activate
uv add "mcp[cli]"
(or)
uv add -r requirements.txt
Additional sections
Project structure and running details are provided below to help you start quickly and keep the server organized. The main server implementation is in main.py, and dependencies are declared in pyproject.toml.
Running the server for development with the MCP Inspector provides a live debugging experience, while running normally starts the server without the inspector. The server can also be installed for use in the Claude desktop app.
Project structure
main.py contains the main server implementation with tools and resources. pyproject.toml holds the project configuration and dependencies.
Available tools
mcp
MCP command-line interface used to initialize, install, and run MCP servers within the project.