Skip to main content
Glama
husenbasha443

Claude MCP Custom Tools Server

README.md
# ๐Ÿ“ฆ Claude MCP Custom Tools Server (Python)

This project implements a **Model Context Protocol (MCP) server** in **Python** that connects to **Claude Desktop** and exposes multiple custom tools such as:

* ๐Ÿ  Airbnb (simulated search)
* ๐Ÿ” DuckDuckGo web search
* ๐Ÿ“š Wikipedia search
* ๐Ÿ“„ ArXiv research papers
* โž•โž— Custom math tools (add, multiply)

Claude can automatically invoke these tools via MCP using **stdio** communication.

---
## ๐Ÿ“ Project Structure

```
mcp_server_Claude/
โ”‚
โ”œโ”€โ”€ .venv/                     # Python virtual environment
โ”‚
โ”œโ”€โ”€ tools/                     # All MCP tools
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ airbnb.py              # Simulated Airbnb tool
โ”‚   โ”œโ”€โ”€ arxiv.py               # ArXiv research tool
โ”‚   โ”œโ”€โ”€ ddg.py                 # DuckDuckGo search
โ”‚   โ”œโ”€โ”€ maths.py               # Add & Multiply tools
โ”‚   โ””โ”€โ”€ wiki.py                # Wikipedia search
โ”‚
โ”œโ”€โ”€ server.py                  # Main MCP server entry point
โ”œโ”€โ”€ requirements.txt           # Python dependencies
โ””โ”€โ”€ README.md
```

---

## โš™๏ธ Requirements

* Python **3.10+**
* Claude Desktop (latest)
* Windows / macOS / Linux

---

## ๐Ÿ“ฆ Install Dependencies

### 1๏ธโƒฃ Create & activate virtual environment

```bash
python -m venv .venv
```

**Windows**

```bash
.venv\Scripts\activate
```

**macOS / Linux**

```bash
source .venv/bin/activate
```

---

### 2๏ธโƒฃ Install required packages

```bash
pip install -r requirements.txt
```

---

## ๐Ÿ› ๏ธ Tools Included

### โž•โž— Math Tools

* `add(a, b)`
* `multiply(a, b)`

### ๐Ÿ” DuckDuckGo

* Web search without API key

### ๐Ÿ“š Wikipedia

* Short factual summaries

### ๐Ÿ“„ ArXiv

* Academic research paper search

### ๐Ÿ  Airbnb

* Simulated listing search (demo purpose)

---

## ๐Ÿš€ How to Run MCP Server (Local Test)

Before connecting Claude, **always test locally**.

```bash
cd D:/mcp_server_Claude
python server.py
```

### โœ… Expected behavior

* No errors
* Process stays running
* Press `CTRL + C` to stop

If it crashes, Claude will also fail to connect.

---

## ๐Ÿ”Œ Claude Desktop MCP Configuration

### ๐Ÿ“ Config file location (Windows)

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

---

### โœ… MCP Server Configuration

```json
{
  "mcpServers": {
    "custom-tools": {
      "command": "D:/mcp_server_Claude/.venv/Scripts/python.exe",
      "args": ["D:/mcp_server_Claude/server.py"]
    }
  }
}
```

---

### ๐Ÿ” Restart Claude Desktop

Fully close and reopen Claude after editing the config.

---

## ๐Ÿงช Testing in Claude

Try any of the following prompts:

```
Add 15 and 25
```

```
Multiply 6 and 7
```

```
Search DuckDuckGo for latest AI agent frameworks
```

```
Find arxiv papers on LLM agents
```

```
Search Airbnb in Bangalore for 2 guests
```

Claude will automatically call the appropriate tool.

---
Author: Husen Basha
---