sankalpsrv/Mutaabik-MCP-Test
3.2
If you are the rightful owner of Mutaabik-MCP-Test and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Azure UV MCP Server is a standalone Model Context Protocol server designed for Wikibase functionality, following the official MCP quickstart guide.
Tools
natural_language_query
Query legal/environmental data using natural language
Mutaabik MCP Server
A simplified Model Context Protocol (MCP) server for Wikibase SPARQL queries. Provides natural language to SPARQL query functionality for legal/environmental data.
Features
- Single Tool:
natural_language_query(question)
- Query legal/environmental data using natural language - Simplified Architecture: Single file, functional approach
- Dual Mode: Works as both stdio MCP server and HTTP server
- AI-Powered Query Selection: Uses Azure OpenAI embeddings for semantic matching
- Graceful Fallbacks: Works without AI credentials (uses first example)
- Wikibase Integration: Uses wikibaseintegrator for robust SPARQL execution
- Environment Variable Support: Loads from .env files automatically
Setup Instructions
Prerequisites
- Python 3.11+
- UV package manager
Installation
- Install UV (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
- Clone/Navigate to the project:
cd azure-uv-mcp-server
- Install dependencies:
uv sync
- Set environment variables:
Option A: Create a .env
file (recommended):
cp .env.example .env
# Edit .env file with your actual values
Option B: Export environment variables:
export AZURE_OPENAI_API_KEY="your-api-key"
export AZURE_OPENAI_API_ENDPOINT="your-endpoint"
export USER_AGENT="MutaabikMCP/1.0"
Running the Server
Option 1: As MCP stdio Server (Default)
# Activate virtual environment
source .venv/bin/activate
# Run the server
python combined_server.py
Option 2: As HTTP Server on Local Port
# Activate virtual environment
source .venv/bin/activate
# Run as HTTP server on port 8000
python combined_server.py server
The server will be available at http://localhost:8000
- Health check:
GET http://localhost:8000/health
- Server info:
GET http://localhost:8000/
- MCP SSE endpoint:
GET http://localhost:8000/message
- MCP message handler:
POST http://localhost:8000/message
Testing the Server
Test via MCP Inspector
- Start the server in HTTP mode:
python combined_server.py server
- Open MCP Inspector in your browser
- Connect to:
http://localhost:8000/message
- Test the
natural_language_query
tool
Test via curl
# Test MCP message endpoint
curl -X POST http://localhost:8000/message \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "natural_language_query",
"arguments": {
"question": "Extract environmental law rule names"
}
}
}'
Environment Variables
AZURE_OPENAI_API_KEY
: Optional - enables AI-powered query selectionAZURE_OPENAI_API_ENDPOINT
: Optional - Azure OpenAI endpointUSER_AGENT
: Optional, defaults to "MutaabikMCP/1.0"
Architecture
The simplified architecture consists of:
- Functional Components: Pure functions for query selection, execution, and formatting
- Graceful Initialization: AI components initialize safely with fallbacks
- Single Entry Point: One file with clear separation of concerns
- Minimal Dependencies: Only essential packages required
- Environment Integration: Automatic .env loading with fallbacks