Skip to main content
Glama
ramaprv

mcp-tools-hub

by ramaprv
README.md
# mcp-tools-hub

A collection of production-ready **Model Context Protocol (MCP) tools** for common tasks — web search, file system access, code execution, database queries, and more. Drop-in tools for any MCP-compatible AI agent or Claude Desktop setup.

## What is MCP?

Model Context Protocol (MCP) is an open standard that lets AI models interact with external systems through a unified tool interface. This repo packages useful tools as MCP servers that any compatible agent can call.

## Available tools

| Tool server | Description |
|-------------|-------------|
| `web-search` | Search the web via Tavily, return structured results |
| `code-runner` | Execute Python snippets in a sandboxed environment |
| `file-ops` | Read, write, list, and search files safely |
| `sqlite-query` | Run read-only SQL queries on a local SQLite database |
| `http-fetch` | Fetch and parse web pages, return cleaned markdown |
| `memory-store` | Simple key-value memory for agents to persist state |

## Architecture

Each tool is a standalone FastMCP server. They can be run individually or composed together via a gateway:

```
Agent (Claude / LangGraph / any MCP client)
        │
        │  MCP protocol (JSON-RPC over stdio or HTTP)
        │
┌───────▼────────────────────────────────┐
│             MCP Gateway                │
│  routes tool calls to the right server │
└──┬────────┬────────┬────────┬──────────┘
   │        │        │        │
web-search  code-runner  file-ops  sqlite-query
```

## Features

- Built with **FastMCP** — minimal boilerplate, clean tool definitions
- Input validation via **Pydantic** on every tool
- Sandboxed code execution (no network/filesystem access from runner)
- Configurable allow-lists for file-ops and sqlite-query
- Structured JSON responses with consistent error format
- Ready for Claude Desktop via `mcpServers` config

## Tech stack

`FastMCP` · `Pydantic v2` · `httpx` · `Tavily API` · `RestrictedPython`

## Project structure

```
mcp-tools-hub/
├── src/
│   ├── servers/
│   │   ├── web_search.py       # Tavily-backed search tool
│   │   ├── code_runner.py      # sandboxed Python execution
│   │   ├── file_ops.py         # file system tools
│   │   ├── sqlite_query.py     # SQL query tool
│   │   ├── http_fetch.py       # web page fetcher
│   │   └── memory_store.py     # agent memory tool
│   └── gateway.py              # multi-server MCP gateway
├── examples/
│   └── claude_desktop_config.json
├── requirements.txt
└── .gitignore
```

## Setup

```bash
pip install -r requirements.txt
export TAVILY_API_KEY=...

# Run a single tool server (stdio mode for Claude Desktop)
python -m src.servers.web_search

# Run all servers via gateway (HTTP mode)
python -m src.gateway --port 8080
```

## Claude Desktop config

```json
{
  "mcpServers": {
    "web-search": {
      "command": "python",
      "args": ["-m", "src.servers.web_search"],
      "cwd": "/path/to/mcp-tools-hub"
    },
    "code-runner": {
      "command": "python",
      "args": ["-m", "src.servers.code_runner"],
      "cwd": "/path/to/mcp-tools-hub"
    }
  }
}
```