Skip to main content
Glama
PRITAM-TU

Test MCP Server

by PRITAM-TU
README.md
# Test MCP Server

My first Model Context Protocol (MCP) server, built with [FastMCP](https://gofastmcp.com/) and Python. It exposes simple tools that can be used from Claude Desktop.

## Available Tools

| Tool | Description | Example request |
| --- | --- | --- |
| `health_check` | Returns the server status and current UTC time. | "Check the MCP server health." |
| `greet` | Greets a person by name. | "Ask the MCP server to greet Pritam." |
| `add_numbers` | Adds two numbers. | "Use the MCP server to add 12 and 30." |
| `echo` | Returns a message unchanged. | "Echo this message using the MCP server." |

## Requirements

- Python 3.13 or newer
- [uv](https://docs.astral.sh/uv/getting-started/installation/)
- Claude Desktop

## Run Locally

Open PowerShell in the project directory and start the server:

```powershell
uv run test-mcp
```

The server runs locally over HTTP at:

```text
http://127.0.0.1:8000/mcp
```

## Connect to Claude Desktop

Open the Claude Desktop configuration file:

```text
%APPDATA%\Claude\claude_desktop_config.json
```

Add the following inside the top-level `mcpServers` object. Replace the path with the absolute path to this repository on your computer:

```json
{
	"mcpServers": {
		"test-mcp": {
			"command": "uv",
			"args": [
				"--directory",
				"C:\\Users\\prita\\OneDrive\\Desktop\\Agentic AI using LangGraph\\Test_mcp",
				"run",
				"test-mcp"
			]
		}
	}
}
```

Save the file and restart Claude Desktop. Then try:

```text
Check the health of the test-mcp server.
```

Claude should discover the four tools listed above.

## Deployed Server

The server is also deployed with FastMCP Horizon:

```text
https://crooked-indigo-leopard.fastmcp.app/mcp
```

This endpoint requires authentication. Use the authentication method provided by Horizon when connecting to the deployed server. Never commit deployment credentials, access tokens, or secrets to this repository.

## Project Layout

```text
Test_mcp/
├── main.py                 # Horizon deployment entrypoint
├── pyproject.toml          # Project metadata and dependencies
├── uv.lock                 # Locked dependency versions
└── src/
		└── test_mcp/
				├── __init__.py
				└── main.py          # FastMCP server and tools
```

## Development Checks

Compile the entrypoints:

```powershell
uv run python -m py_compile .\main.py .\src\test_mcp\main.py
```

Build the package:

```powershell
uv build
```