Rawpurplesmurf MCP

MCPAI代理

提供方 rawpurplesmurf

AI代理 stdio · 本地进程 无需鉴权 社区 / 第三方
查看接入方式

一个展示LLM驱动工具选择、网络实用程序和实时工作流可视化的模型上下文协议演示项目,支持智能AI代理通过结构化协议执行工具。

一句话选型结论

按资料字段整理

Rawpurplesmurf MCP 属于AI代理类 MCP 服务器,stdio · 本地进程,无需鉴权,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类AI代理 传输方式stdio · 本地进程 鉴权无需鉴权 部署方式本地部署
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 2 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

AI代理
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量2暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

适用场景

HTML本地部署LLM集成网络工具实时可视化AI代理协议驱动

安装与配置

stdio · 本地进程 无需鉴权
客户端在本机拉起子进程,数据不出本机
python -m venv .venv

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Python,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 2 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
给代理接外部能力

让代理在任务中途调用搜索、数据库等真实工具。

多步任务编排

把一串操作拆成步骤,由代理按顺序执行。

自动化重复流程

把固定流程交给代理跑,减少手工操作。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 2 个工具,职责相对集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Rawpurplesmurf MCP当前 2 stdio · 本地进程 本地部署 有 2026-05-17
Filesystem 560c4363 13 未标注 本地部署 无 2026-05-17
Server Everything (everything) 11 stdio · 本地进程 本地部署 有 2026-05-17
Time 7365cb6d 2 SSE · 服务端推送 远程部署 有 2026-05-18
Everything Claude Code 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Openmemory 557e1585 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

AI代理
字段来自项目仓库与公开索引,中文说明由本站标注
提供方rawpurplesmurf上游标注的维护方 rawpurplesmurf
分类AI代理本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Python本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

20.8 KB
来自项目仓库与上游目录的原文,未做删改

Model Context Protocol (MCP) Network Tools Demo

A comprehensive demonstration of the Model Context Protocol featuring proper LLM-driven tool selection, network utilities, and real-time workflow visualization. This project showcases how MCP enables intelligent AI agents to reason about and execute tools through structured protocols.

Table of Contents

  • Features
  • Quick Start
  • Web UI
  • MCP Client Setup
  • Configuration
  • API Endpoints
  • Available Tools
  • Development
  • Project Structure
  • Documentation
  • macOS Development Notes
  • Changelog

Features

🖥️ MCP Server (Port 8000)

  • Network Time Tool: Retrieves accurate time from configurable NTP servers
  • Ping Tool: Tests network connectivity and latency to specified hosts
  • Redis Caching: Optional Redis integration for response caching
  • Environment Configuration: Fully configurable via environment variables

🤖 MCP Client (Port 8001)

  • Proper MCP Protocol: LLM receives tool schemas and makes structured tool selection decisions
  • Ollama Integration: Local LLM integration with Qwen2.5:7b-instruct model
  • Two-Phase Processing: Initial tool selection, then response integration with tool results
  • Structured Tool Requests: LLM responds with JSON specifying exact tools and parameters
  • Session Management: Context-aware conversations with debug endpoints

🌐 Web UI (Port 5173)

  • Modern Chat Interface: Sleek, responsive chat UI built with React + Vite
  • MCP Workflow Visualization: Real-time display of complete MCP protocol flow
  • Chronological Component Tracking: Shows UI → Client → Ollama → Server interactions
  • Detailed Data Exchange: Full request/response payloads and timing information
  • Educational Demo Mode: Perfect for understanding how MCP protocol works
  • Tool Visibility: Visual badges showing which MCP tools were used in each response
  • Mobile Responsive: Works beautifully on desktop, tablet, and mobile devices

> 📖 New to Model Context Protocol? See docs/MCP_EXPLAINED.md for a comprehensive guide to understanding MCP concepts and how they apply to this project.
>
> 🔧 Want to understand the Client Architecture? See docs/CLIENT_ARCHITECTURE.md for details on how the MCP client integrates with local LLMs.
>
> 🤖 Building AI agents for this project? See .github/copilot-instructions.md for AI coding agent guidance.
>
> 🍎 macOS Developer? See docs/MACOS_DEV.md for platform-specific setup and optimizations.
>
> 🐧 Linux Developer? See docs/LINUX_DEV.md for Linux/Ubuntu environment setup.
>

Quick Start

Automated Setup (Recommended)

Use the automated setup script to configure everything:```bash
git clone <repository-url>
cd model-context-protocol
bash scripts/setup.sh


The setup script will:
- ✅ Check Python 3.10+ and Node.js installation
- ✅ Create and activate Python virtual environment
- ✅ Install all Python dependencies (production + testing)
- ✅ Install Node.js dependencies for UI
- ✅ Configure Playwright with Chromium browser
- ✅ Create `.env` and `.env.client` from templates

After setup completes, activate the virtual environment and start services:```bash
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
npm start

Manual Setup

  1. Clone and Setup:bash git clone &lt;repository-url&gt; cd model-context-protocol python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate

  2. Install Dependencies:```bash
    # Install all dependencies (Python + Node.js + UI + Playwright)
    npm run install:all

# Or install separately:
pip install -r requirements.txt
pip install -r requirements-test.txt
cd ui && npm install && npx playwright install chromium
```

  1. Configure Environment:bash cp .env.example .env cp .env.client.example .env.client # Edit .env and .env.client with your settings

  2. Start All Services:bash npm start # Or: bash scripts/start.sh

  3. Test the MCP Server:```bash
    # Health check
    curl http://localhost:8000/health

# List available tools
curl http://localhost:8000/v1/tools/list

# Test network time
curl -X POST http://localhost:8000/v1/tools/call \
-H "Content-Type: application/json" \
-d '{"tool_name": "get_network_time", "arguments": {}, "session_id": "test"}'

# Test ping
curl -X POST http://localhost:8000/v1/tools/call \
-H "Content-Type: application/json" \
-d '{"tool_name": "ping_host", "arguments": {"hostname": "google.com"}, "session_id": "test"}'
```

Web UI

A modern, responsive chat interface is available for easy interaction with the MCP system.

Quick Start with UI

  1. Start all services (from project root):bash npm start # Or: bash scripts/start.sh
    This single command starts:
    - MCP Server (port 8000)
    - MCP Client (port 8001)
    - Web UI (port 5173)

  2. Open in browser: Navigate to http://localhost:5173

UI Features

The Web UI provides an intuitive chat interface with:
- 🎨 Modern dark theme - Easy on the eyes for extended use
- 💬 Real-time chat - Instant responses from the MCP client
- 🔧 Tool badges - Visual indicators showing which tools (NTP time, ping) were used
- 📱 Fully responsive - Adapts to any screen size
- ⚡ Fast & lightweight - Built with Vite for instant hot-reload during development
- 🗨️ Clear chat - Button to clear conversation history
- 🎯 Auto-scroll - Always shows the latest messages

Example Interactions

Try these queries in the UI:
- "What time is it?" → Uses get_network_time tool
- "Can you ping google.com?" → Uses ping_host tool
- "Hello, what can you help me with?" → General conversation

See ui/README.md for more UI-specific details.

MCP Client Setup

The project includes a complete MCP client that integrates with local Ollama models for intelligent tool usage. For detailed architecture information, see docs/CLIENT_ARCHITECTURE.md and docs/CLIENT_README.md.

Prerequisites

  1. Install Ollama: Visit ollama.ai and install Ollama
  2. Pull Qwen2.5 Model: ollama pull qwen2.5:7b-instruct

Client Setup

  1. Configure Client Environment:bash cp .env.client.example .env.client # Edit .env.client with your preferred settings

  2. Start the Client (in a new terminal):bash uvicorn client:app --port 8001

  3. Test the Client:```bash
    # Health check
    curl http://localhost:8001/health

# Chat with time question
curl -X POST http://localhost:8001/chat \
-H "Content-Type: application/json" \
-d '{"message": "What time is it?", "session_id": "demo"}'

# Chat with ping question
curl -X POST http://localhost:8001/chat \
-H "Content-Type: application/json" \
-d '{"message": "Can you ping google.com?", "session_id": "demo"}'

# General conversation
curl -X POST http://localhost:8001/chat \
-H "Content-Type: application/json" \
-d '{"message": "Hello, what can you help me with?", "session_id": "demo"}'
```

Configuration

The server is configured via environment variables. Copy .env.example to .env and modify as needed:

Redis Configuration

  • REDIS_HOST: Redis server hostname (default: localhost)
  • REDIS_PORT: Redis server port (default: 6379)
  • REDIS_PASSWORD: Redis password (optional)
  • REDIS_DB: Redis database number (default: 0)

NTP Configuration

  • NTP_SERVER: Primary NTP server (default: pool.ntp.org)
  • NTP_BACKUP_SERVER: Backup NTP server (default: time.google.com)
  • NTP_TIMEOUT: NTP request timeout in seconds (default: 5)

Server Configuration

  • SERVER_PORT: FastAPI server port (default: 8000)
  • LOG_LEVEL: Logging level (default: INFO)

Client Configuration (.env.client)

  • OLLAMA_URL: Ollama server URL (default: http://localhost:11434)
  • OLLAMA_MODEL: Model to use (default: qwen2.5:7b-instruct)
  • MCP_SERVER_URL: MCP server URL (default: http://localhost:8000)
  • CLIENT_PORT: Client server port (default: 8001)

See .env.example and .env.client.example for complete configuration templates.

API Endpoints

MCP Server (Port 8000)

  • GET /health - Returns server status and Redis connection status
  • GET /v1/tools/list - List all available tools
  • POST /v1/tools/call - Execute a specific tool
  • POST /v1/generate - LLM generation endpoint with tool reasoning loop

MCP Client (Port 8001)

  • GET /health - Returns client, Ollama, and MCP server status
  • GET /tools - List available tools from MCP server
  • POST /chat - Chat interface with intelligent tool usage
  • POST /test-tool - Direct tool testing endpoint

Available Tools

get_network_time

Retrieves accurate time from NTP servers.
- Parameters: None
- Returns: UTC timestamp, readable time, offset, and source server

ping_host

Tests network connectivity and latency.
- Parameters:
- hostname (required): Hostname or IP address to ping
- Returns: Host status, latency, packet loss, and output snippet

Development

The server includes several areas marked for enhancement:
1. Enhanced ping parsing for better latency extraction (see server.py._execute_ping)
2. Robust Redis caching with session management (see server.py.LLMService.generate)
3. Full LLM integration with tool-use reasoning loop (see server.py.LLMService.generate)
4. Redis connection resilience improvements (see server.py startup event)

For detailed development workflows and testing, see:
- test_client.py - End-to-end client testing
- test_config.py - Server configuration validation
- CLIENT_ARCHITECTURE.md - Client implementation details
- .github/copilot-instructions.md - AI agent guidance

Project Structure

Project Structure```

model-context-protocol/
├── server.py # MCP Server (FastAPI, port 8000)
├── client.py # MCP Client (Ollama integration, port 8001)
├── requirements.txt # Python dependencies (server + client)
├── requirements-test.txt # Python test dependencies
├── package.json # NPM scripts for unified commands
├── .env.example # Server environment template
├── .env.client.example # Client environment template
├── docs/ # Documentation
│ ├── CHANGELOG.md # Version history
│ ├── CLIENT_ARCHITECTURE.md
│ ├── CLIENT_README.md
│ ├── LINUX_DEV.md
│ ├── MACOS_DEV.md
│ ├── MCP_EXPLAINED.md
│ ├── PROJECT_SUMMARY.md
│ ├── TESTING.md
│ └── WINDOWS_DEV.md
├── scripts/ # Shell scripts
│ ├── start.sh # Start all services
│ ├── run-tests.sh # Run all tests
│ └── test.sh # Quick test suite
├── tests/ # Backend tests (pytest)
│ ├── conftest.py # Test fixtures
│ ├── test_server.py # Server tests
│ └── test_client.py # Client tests
├── ui/ # Web UI (React + Vite)
│ ├── src/
│ │ ├── App.jsx # Main chat component
│ │ ├── App.css # Styles
│ │ └── main.jsx # Entry point
│ ├── tests/ # UI tests (Playwright)
│ │ └── ui.spec.js
│ ├── playwright.config.js
│ └── package.json
├── test_client.py # End-to-end client test
└── test_config.py # Configuration validation


## Documentation

This project includes comprehensive documentation for different audiences and purposes:

### 📚 **Core Documentation**
- **docs/MCP_EXPLAINED.md** - Comprehensive introduction to Model Context Protocol concepts
- **docs/CLIENT_ARCHITECTURE.md** - Client architecture and LLM integration details
- **docs/CLIENT_README.md** - Client-specific documentation and usage
- **docs/PROJECT_SUMMARY.md** - High-level project overview and goals

### ️ **Platform-Specific Guides**
- **docs/MACOS_DEV.md** - macOS development setup and platform-specific notes
- **docs/LINUX_DEV.md** - Linux/Ubuntu environment setup guide
- **docs/WINDOWS_DEV.md** - Windows 10/11 development environment setup

### 📝 **Configuration &amp; History**
- **docs/CHANGELOG.md** - Detailed version history and release notes
- **.env.example** - Server environment configuration template
- **.env.client.example** - Client environment configuration template
- **ui/README.md** - Web UI specific documentation and setup

### 🧪 **Testing &amp; Validation**
- **docs/TESTING.md** - Comprehensive testing guide
- **scripts/run-tests.sh** - Unified pytest + Playwright test runner
- **test_client.py** - End-to-end client testing script
- **test_config.py** - Server configuration validation script
- **scripts/test.sh** - Comprehensive shell-based test suite

## Testing

The project includes comprehensive automated testing for both backend and frontend:

### Running All Tests

Use the unified test runner to execute all tests:```bash
npm test
# Or: bash scripts/run-tests.sh

This script will:
1. Install test dependencies if needed
2. Run pytest tests for backend (server and client)
3. Run Playwright tests for UI
4. Display a comprehensive summary with pass/fail status

Backend Testing (pytest)

Run pytest tests separately:```bash

Install test dependencies

pip install -r requirements-test.txt

Run all tests with coverage

pytest tests/ --cov=. --cov-report=term-missing --cov-report=html -v

Run specific test files

pytest tests/test_server.py -v
pytest tests/test_client.py -v


**Coverage**: Backend tests cover:
- Health endpoints and Redis connectivity
- Tool listing and schema validation
- Network time tool (NTP synchronization)
- Ping tool (localhost, external hosts, error handling)
- LLM generation endpoints
- Chat functionality with session management
- Input validation and error responses

View HTML coverage report: `open htmlcov/index.html`

### Frontend Testing (Playwright)

Run Playwright UI tests separately:```bash
# From project root
cd ui

# Install Playwright dependencies
npm install
npx playwright install chromium

# Run tests
npx playwright test

# Run tests with UI
npx playwright test --ui

# Run specific test file
npx playwright test tests/ui.spec.js

Coverage: UI tests cover:
- Chat interface rendering and interactions
- Message sending and receiving
- Tool badge display (get_network_time, ping_host)
- Loading states and error handling
- Clear chat functionality
- Auto-scroll behavior
- Responsive design (mobile/desktop)
- Server error handling

View Playwright report: npx playwright show-report

Prerequisites for Testing

Backend tests require:
- MCP Server running on port 8000
- MCP Client running on port 8001
- Start services: npm start or bash scripts/start.sh

Frontend tests require:
- All backend services running
- UI will auto-start on port 5173 (managed by Playwright config)

Test Organization```

tests/ # Backend tests (pytest)
├── conftest.py # Shared fixtures
├── test_server.py # MCP server tests
└── test_client.py # MCP client tests

ui/tests/ # Frontend tests (Playwright)
└── ui.spec.js # UI end-to-end tests
```

macOS Development Notes

This project was developed and tested on macOS. For platform-specific development information, including setup, configuration, and optimization tips for macOS developers, please see our macOS Development Guide.

> 🍎 macOS Users: The project includes specific optimizations and configurations for macOS development environments, including proper handling of network interfaces, NTP server selection, and Ollama integration.

Changelog

v2.0.0 - Complete MCP Client Integration (November 7, 2025)

🤖 MCP Client Implementation

  • Ollama Integration: Full integration with local Ollama LLM server
  • Qwen2.5:7b-instruct Model: Optimized for reliable tool usage patterns
  • Intelligent Tool Routing: Automatic detection of time and network queries
  • Direct Tool Testing: /test-tool endpoint for manual tool execution
  • Session Management: Context-aware conversation handling
  • Health Monitoring: Complete system status across all components

🧠 Smart Query Processing

  • Time Query Detection: Automatic triggering of get_network_time tool
  • Network Query Detection: Automatic triggering of ping_host tool
  • Hostname Extraction: Intelligent parsing of hostnames from user queries
  • Fallback Responses: Graceful handling of non-tool-related queries

🔧 Client Architecture

  • Async Operations: Non-blocking client-server communication
  • Error Handling: Comprehensive error management across all operations
  • Configuration Management: Separate client environment configuration
  • Multi-Model Support: Easy switching between Ollama models

📊 Dual-Server Architecture

  • MCP Server: Port 8000 - Tool execution and caching
  • MCP Client: Port 8001 - LLM integration and chat interface
  • Independent Operation: Each server can run and be tested independently
  • Seamless Communication: Automatic tool discovery and execution

🧪 Enhanced Testing

  • Client Test Suite: test_client.py for end-to-end validation
  • Live Demonstrations: Working examples of all functionality
  • Model Validation: Tested with multiple Ollama models
  • Performance Metrics: Response time and accuracy measurements

v1.0.0 - Initial MCP Server Release (November 7, 2025)

🚀 Core Features

  • FastAPI Server: Full async/await FastAPI implementation with automatic OpenAPI documentation
  • Network Tools Focus: Specialized MCP server for network utilities only
  • Redis Integration: Async Redis client with connection pooling and graceful fallback
  • Environment Configuration: Complete .env-based configuration system

🔧 Available Tools

  • get_network_time: NTP-based network time synchronization
  • Configurable NTP servers (primary/backup)
  • Millisecond precision with offset calculation
  • Graceful fallback to system time
  • Configurable timeout settings
  • ping_host: Network connectivity and latency testing
  • Cross-platform ping implementation (Windows/Linux/macOS)
  • Packet loss detection and reporting
  • Latency measurement and parsing
  • Configurable ping count

🏗️ Architecture

  • Pydantic Schemas: Type-safe request/response models
  • Service Layer: Clean separation of concerns with ToolService and LLMService
  • Async Operations: Non-blocking operations for all network calls
  • Error Handling: Comprehensive error handling with detailed error responses

📊 API Endpoints

  • GET /health - Server and Redis connection status
  • GET /v1/tools/list - List available tools with schema
  • POST /v1/tools/call - Execute tools with arguments
  • POST /v1/generate - LLM integration endpoint (with mock implementation)

⚙️ Configuration System

  • Redis Configuration: Host, port, password, database selection
  • NTP Configuration: Primary/backup servers, timeout settings
  • Server Configuration: Port, logging level
  • Environment Files: .env support with .env.example template
  • Git Integration: Proper .gitignore for sensitive configuration

🧪 Testing & Validation

  • Health Checks: Redis connectivity validation
  • Configuration Testing: test_config.py script for end-to-end validation
  • API Testing: cURL examples and automated test script
  • Cross-platform Support: Tested on macOS, designed for Linux/Windows compatibility

📚 Documentation

  • Comprehensive README: Setup, configuration, and usage instructions
  • Environment Templates: .env.example with detailed comments
  • API Examples: Complete cURL examples for all endpoints
  • Configuration Guide: Detailed explanation of all environment variables

🔒 Security & Best Practices

  • Environment Variables: Sensitive configuration excluded from version control
  • Type Safety: Full Pydantic validation for all inputs/outputs
  • Error Isolation: Tools failures don't crash the server
  • Resource Management: Proper async resource cleanup

📦 Dependencies

  • fastapi - Modern web framework
  • uvicorn[standard] - ASGI server with performance optimizations
  • pydantic - Data validation and serialization
  • redis[asyncio] - Async Redis client
  • ntplib - Network Time Protocol client
  • python-dotenv - Environment variable management
  • requests - HTTP client for testing

🎯 Future Enhancements (Marked for Implementation)

  • Task 1: Enhanced ping parsing with robust latency extraction
  • Task 2: Advanced Redis caching with session-based context management
  • Task 3: Full LLM integration with tool-use reasoning loop
  • Task 4: Redis connection resilience and connection pooling improvements

We are going to build an MCP server we can got to do things on our behalf with an LLM model.

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
Rawpurplesmurf MCP 怎么安装?

在客户端按下面的安装命令接入:python -m venv .venv。装完在客户端配置里引用同一个包或端点。

Rawpurplesmurf MCP 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

Rawpurplesmurf MCP 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Rawpurplesmurf MCP 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Rawpurplesmurf MCP 能提供哪些能力?

资料显示约 2 个工具;能力标签包括 网络工具、HTML、AI代理。具体工具清单以官方文档为准。

Rawpurplesmurf MCP 需要什么运行环境?

运行时为 Python;属于本地进程,需要在本机装好运行环境。

Rawpurplesmurf MCP 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。