mcpdeployment
MCP Demo Server
A demonstration MCP (Model Context Protocol) server showcasing Tools, Resources, and Prompts with integrated security scanning.
Features
š ļø Tools (6)
add- Add two numbersreverse_text- Reverse a stringformat_json- Pretty-print JSONcalculate- Evaluate mathematical expressionsscan_mcp_server- Scan MCP servers for vulnerabilitiescheck_scanner_status- Check scanner configuration
š Resources (4)
demo://info- Server metadatademo://timestamp- Current time and uptimedemo://examples- Usage examplesdemo://file/data- Read sample data
š¬ Prompts (3)
code_review- Code review templatesummarize- Text summarization templatedebug_helper- Debugging assistance template
Quick Start
Prerequisites
Python 3.11+
uv package manager
Installation
# Clone the repository
git clone https://github.com/manutri1986/mcpdeployment.git
cd mcpdeployment
# Install dependencies (automatic with uv)
uv syncRun the Server
Local Development (stdio transport):
# Start MCP server for IDE integration
uv run mcp-serverThe server communicates via stdio and will wait for MCP protocol connections.
Remote Deployment (HTTP transport):
# Start HTTP server for remote access
MCP_REMOTE_HOST=127.0.0.1 MCP_REMOTE_PORT=8000 uv run mcp-server-remote
# Or use the test script
./scripts/test_http_local.shš Full HTTP deployment guide: docs/HTTP_DEPLOYMENT.md
Security Scanning
Quick Scan
# Run security scan (YARA analyzer - fast, no API key needed)
uv run python scripts/scanners/yara_scanner.py
# Quick scan (sample components only)
uv run python scripts/scanners/yara_scanner.py --quick
# Advanced scanners (require API keys)
uv run python scripts/scanners/llm_api_scanner.py # OpenAI LLM analysis
uv run python scripts/scanners/cisco_api_scanner.py # Cisco AI DefenseScanner Coverage:
ā Tools (6) - All scanned
ā Prompts (3) - All scanned
ā ļø Resources (4) - Cannot scan via stdio
Setup Advanced Scanning (Optional)
For deeper analysis with LLM and API analyzers:
# Run setup script
./scripts/setup_scanner.sh
# Or set environment variables manually
export MCP_SCANNER_API_KEY="your_api_key"
export MCP_SCANNER_ENDPOINT="https://us.api.inspect.aidefense.security.cisco.com/api/v1"Get your API key: Cisco AI Defense
š Full documentation: docs/SCANNER_SETUP.md
Using with MCP Clients
Cursor IDE
Configuration included at .cursor/mcp.json. After setup:
Restart Cursor IDE
Test: "Use the add tool to calculate 5 + 3"
Or: "Access the demo://info resource"
Claude Desktop, VS Code, Windsurf
Add to your MCP client configuration:
{
"mcpServers": {
"mcpdeployment": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/manutri1986/mcpdeployment.git",
"mcp-server"
]
}
}
}Configuration file locations:
Client | Config Path |
Claude Desktop (macOS) |
|
Claude Desktop (Windows) |
|
Cursor |
|
Windsurf |
|
VS Code |
|
Claude Code |
|
Project Structure
mcpdeployment/
āāā src/mcpserver/ # MCP server implementation
ā āāā __init__.py
ā āāā __main__.py # Entry point (stdio transport)
ā āāā __main_remote__.py # Entry point (HTTP transport)
ā āāā server.py # Tools, resources, prompts
āāā scripts/ # Utility scripts
ā āāā scanners/ # Security scanner implementations
ā ā āāā yara_scanner.py
ā ā āāā llm_api_scanner.py
ā ā āāā cisco_api_scanner.py
ā āāā setup_scanner.sh # Scanner configuration
ā āāā test_http_local.sh # Local HTTP testing
āāā tests/ # Test files
ā āāā test_scanner.py # Test scanner setup
āāā reports/ # Generated scan reports (gitignored)
āāā docs/ # Documentation
ā āāā methodology/ # Scanner methodology docs
ā āāā SCANNER_SETUP.md
ā āāā SCANNER_LIMITATIONS.md
ā āāā HTTP_DEPLOYMENT.md # Remote deployment guide
āāā data/ # Sample data
ā āāā sample_data.json
āāā STRUCTURE.md # Detailed structure guide
āāā CLAUDE.md # AI assistant guidance
āāā README.md # This file
āāā pyproject.toml # Project configurationš See STRUCTURE.md for detailed directory structure and purpose.
Architecture
Built with FastMCP, a Python framework for MCP servers.
Key Pattern:
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("Demo")
@mcp.tool()
def your_tool(arg: type) -> type:
"""Tool description"""
return result
@mcp.resource("uri://path")
def your_resource() -> str:
"""Resource description"""
return json.dumps(data)
@mcp.prompt()
def your_prompt(arg: type) -> str:
"""Prompt description"""
return f"Prompt text with {arg}"See CLAUDE.md for detailed architecture notes.
Development
Test Scanner
# Verify scanner is configured
uv run python tests/test_scanner.pyAdding Components
Edit src/mcpserver/server.py:
Add function with appropriate decorator (
@mcp.tool(),@mcp.resource(),@mcp.prompt())Update scanner scripts in
scripts/scanners/to include new tools/prompts in scan listsRun security scan:
uv run python scripts/scanners/yara_scanner.py
Documentation
CLAUDE.md - Development guide for AI assistants
docs/HTTP_DEPLOYMENT.md - Remote HTTP deployment guide
docs/SCANNER_SETUP.md - Scanner configuration
docs/SCANNER_LIMITATIONS.md - What can/cannot be scanned
Troubleshooting
Server won't start
Check Python version:
uv run python --version(needs 3.11+)Reinstall dependencies:
uv sync
Tools not appearing in client
Restart client completely
Check client logs for errors
Verify configuration file syntax
Scanner errors
Verify installation:
uv pip list | grep cisco-ai-mcp-scannerTest setup:
uv run python tests/test_scanner.py
License
MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/manutrip-pm-AI-Defense/mcpdeployment'
If you have feedback or need assistance with the MCP directory API, please join our Discord server