quads-mcp
MCP server for interacting with QUADS infrastructure systems via API, enabling resource management and automation through LLM applications.
README
quads-mcp
A Model Context Protocol for QUADS
Overview
This is a Model Context Protocol (MCP) server that exposes tools, resources, and prompts for use with LLM applications like Claude. MCP servers let you extend AI applications with custom functionality, data sources, and templated interactions.
Installation
Option 1: Install from PyPI (Recommended)
# Install the latest version from PyPI
pip install quads-mcp
# Or using uvx for isolated installation
uvx install quads-mcp
# Run the server
quads-mcp
Option 2: Run directly via uvx
# Run the server
uvx quads-mcp
#### Claude Desktop Configuration (PyPI Installation)
```json
{
"mcpServers": {
"quads-mcp": {
"command": "quads-mcp",
"env": {
"MCP_QUADS__BASE_URL": "https://your-quads-server.com/api/v3",
"MCP_QUADS__USERNAME": "your-username",
"MCP_QUADS__PASSWORD": "your-password",
"MCP_QUADS__VERIFY_SSL": "false"
}
}
}
}
#### Claude Desktop Configuration (via uvx)
```json
{
"mcpServers": {
"quads-mcp": {
"command": "uvx",
"args": [
"--from", "quads-mcp", "quads-mcp"
],
"env": {
"MCP_QUADS__BASE_URL": "https://your-quads-server.com/api/v3",
"MCP_QUADS__USERNAME": "your-username",
"MCP_QUADS__PASSWORD": "your-password",
"MCP_QUADS__VERIFY_SSL": "false"
}
}
}
}
Option 2: Install from Source
Quick Start
Option 1: Run with uvx (Easiest)
The fastest way to run the server without any setup:
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
# Run the server directly (from project directory)
uvx --from . quads-mcp
# Or run the module
uvx --from . python -m quads_mcp.server
Option 2: Setup with uv (Recommended)
# Set up the environment
make setup
# Check virtual environment status
make status
# Run the server (automatically uses virtual environment)
make run
# Run in development mode with MCP Inspector
make dev
# Install the server in Claude Desktop
make install
Note: You don't need to manually activate the virtual environment when using make commands - they automatically use the .venv environment!
If you encounter import errors, run make reinstall to refresh the package installation.
Option 3: Manual Setup
# Install uv if you don't have it
pip install uv
# Create a virtual environment
uv venv
# Activate the virtual environment
source .venv/bin/activate # On Unix/MacOS
# or
.venv\Scripts\activate # On Windows
# Install the package in development mode
uv pip install -e .
# Run in development mode
mcp dev quads_mcp.server
# Install in Claude Desktop
mcp install quads_mcp.server
uvx Configuration
When running with uvx, you can configure the server using environment variables or .env files:
# Option 1: Environment variables
MCP_QUADS__BASE_URL="https://your-quads-api.com/api/v3" \
MCP_QUADS__AUTH_TOKEN="your-token" \
uvx --from . quads-mcp
# Option 2: .env file (recommended)
cp .env.example .env
# Edit .env with your configuration
uvx --from . quads-mcp
# Option 3: Development mode
MCP_DEBUG=true uvx --from . quads-mcp
Installing as Global Tool
# Install globally with uvx
uvx install .
# Now run from anywhere
quads-mcp
# Uninstall when done
uvx uninstall quads-mcp
Containers
This project uses Podman for containerization. Podman is a daemonless container engine that's compatible with OCI containers and provides better security than traditional container engines.
Quick Start with Podman
# Build the container image
make container-build
# or
podman build -t quads-mcp .
# Run the container
make container-run
# or
podman run -p 8000:8000 quads-mcp
Podman Compose (Recommended)
For easier development and deployment, use Podman Compose:
# Run with Podman Compose
make compose-up
# or
podman-compose up -d
# View logs
make compose-logs
# or
podman-compose logs -f
# Stop the service
make compose-down
# or
podman-compose down
Development with Podman
For development with live code reloading:
# Run development profile
make compose-dev
# or
podman-compose --profile dev up -d quads-mcp-dev
# The development container mounts your code for live updates
Configuration with Podman
Option 1: Environment Variables
podman run -p 8000:8000 \
-e MCP_QUADS__BASE_URL=https://your-quads-api.com/api/v3 \
-e MCP_QUADS__AUTH_TOKEN=your-token \
quads-mcp
Option 2: .env File
# Create .env file with your configuration
cp .env.example .env
# Edit .env with your values
# Run with .env file
podman run -p 8000:8000 \
-v $(pwd)/.env:/app/.env:ro \
quads-mcp
Option 3: Podman Compose with .env
# Edit podman-compose.yml to uncomment the .env volume mount
# Then run:
podman-compose up -d
Production Builds
Multi-stage Build (Recommended)
For smaller, optimized production images:
# Build with multi-stage Containerfile
make container-build-prod
# or
podman build -f Containerfile.multistage -t quads-mcp:production .
# Run production image
make container-run-prod
# or
podman run -p 8000:8000 quads-mcp:production
Ultra-Secure Build (Distroless)
For maximum security with minimal attack surface:
# Build with distroless base image
make container-build-distroless
# or
podman build -f Containerfile.distroless -t quads-mcp:distroless .
# Run distroless image
make container-run-distroless
# or
podman run -p 8000:8000 quads-mcp:distroless
Security Features
- Alpine Linux Base: Minimal, security-focused distribution
- Non-root User: Runs as unprivileged
mcpuser (UID/GID 1001) - Distroless Option: Ultra-minimal base with no shell or package manager
- Security Updates: Automatically includes latest security patches
- Minimal Attack Surface: Only includes necessary dependencies
Server Architecture
The server is organized into several components:
server.py: Main MCP server setup and configurationconfig.py: Configuration managementtools/: Tool implementations (functions that LLMs can execute)resources/: Resource implementations (data that LLMs can access)prompts/: Prompt template implementations (reusable conversation templates)
MCP Features
This server implements all three MCP primitives:
-
Tools: Functions that the LLM can call to perform actions
- Example:
calculate,fetch_data,long_task
- Example:
-
Resources: Data sources that provide context to the LLM
- Example:
static://example,dynamic://{parameter},config://{section}
- Example:
-
Prompts: Reusable templates for LLM interactions
- Example:
simple_prompt,structured_prompt,data_analysis_prompt
- Example:
Adding Your Own Components
Adding a New Tool
Create or modify files in the tools/ directory:
@mcp.tool()
def my_custom_tool(param1: str, param2: int = 42) -> str:
"""
A custom tool that does something useful.
Args:
param1: Description of first parameter
param2: Description of second parameter with default value
Returns:
Description of the return value
"""
# Your implementation here
return f"Result: {param1}, {param2}"
Adding a New Resource
Create or modify files in the resources/ directory:
@mcp.resource("my-custom-resource://{param}")
def my_custom_resource(param: str) -> str:
"""
A custom resource that provides useful data.
Args:
param: Description of the parameter
Returns:
The resource content
"""
# Your implementation here
return f"Resource content for: {param}"
Adding a New Prompt
Create or modify files in the prompts/ directory:
@mcp.prompt()
def my_custom_prompt(param: str) -> str:
"""
A custom prompt template.
Args:
param: Description of the parameter
Returns:
The formatted prompt
"""
return f"""
# Custom Prompt Template
Context: {param}
Please respond with your analysis of the above context.
"""
Configuration
The server supports configuration via:
-
Environment Variables: Prefix with
MCP_(e.g.,MCP_QUADS__BASE_URL=https://quads.example.com)- Nested config: Use double underscores (
MCP_QUADS__USERNAME=myuser)
- Nested config: Use double underscores (
-
Config File: Specify via
MCP_CONFIG_FILEenvironment variable -
.env File: Place a
.envfile in the project directory
QUADS Configuration
# Required: QUADS API URL
MCP_QUADS__BASE_URL=https://your-quads-server.com/api/v3
# Authentication (use either username/password OR token)
MCP_QUADS__USERNAME=your-username
MCP_QUADS__PASSWORD=your-password
# OR
MCP_QUADS__AUTH_TOKEN=your-auth-token
# Optional settings
MCP_QUADS__TIMEOUT=30
MCP_QUADS__VERIFY_SSL=true # Set to false for self-signed certificates
SSL Certificates
For QUADS servers with self-signed certificates, set:
MCP_QUADS__VERIFY_SSL=false
⚠️ Security Note: Only disable SSL verification for trusted internal servers. See SSL_CONFIGURATION.md for details.
JSON Configuration Example
{
"quads": {
"base_url": "https://quads.example.com/api/v3",
"username": "your-username",
"password": "your-password",
"timeout": 30,
"verify_ssl": false
}
}
Development
# Run tests
make test
# Format code
make format
# Type checking
make type-check
# Clean up build artifacts
make clean
License
[Include your license information here]
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。