Use
What the MCP Server Can Do
| Use Case | Example |
|---|---|
| Fetch enterprise data | Pull sales order data from an SAP backend |
| Execute business processes | Create and run workflow jobs |
| Answer document questions | Hybrid QA using FAISS + LLM |
| Connect AI to live systems | Custom handlers for SAP, OData, and other backends |
Architecture & Processing Flow
Client
↓
API Routers (routers/upload_router.py)
↓
Core Manager
↓
Tool Loader → Tool Generator → Tool Executor
↓
Custom Handlers (custom_handlers/)
↓
Backend Services (AI Core, Vector Store, Chat History)
| Component | File | What it Does |
|---|---|---|
| Tool Loader | core/tool_loader.py | Discovers and loads tool definitions and handler modules at startup |
| Tool Generator | core/tool_generator.py | Generates runtime adapters from tool manifests |
| Tool Executor | core/tool_executor.py | Validates inputs, runs the tool, enforces error handling and timeouts |
| YAML Validator | core/yaml_validator.py | Validates manifests and tool metadata |
| Auth Manager | core/auth_manager.py | Performs authentication and authorization for all API requests |
API Usage
List Available Tools
Call this first to discover what capabilities are registered in the runtime.
curl --location 'https://cw-mcp-server.cfapps.eu10-004.hana.ondemand.com/mcp/{{env}}' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'
Execute a Tool
curl --location 'https://cw-mcp-server.cfapps.eu10-004.hana.ondemand.com/mcp/{{env}}' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "create_task_and_run_job",
"arguments": {
"user_id": "muthuveeramuni.v@incture.com",
"process_name": "appcreation2",
"name": "name8",
"age": "Age8"
}
}
}'
Execution flow: Tool Loader → Validator → Executor → Handler → Backend Service → Response
REST Endpoints
| Method | Endpoint | What it Does |
|---|---|---|
POST | /upload | Accepts files and runs the document ingestion pipeline |
GET | /status | Returns health and status information |
POST | /mcp/{env} | JSON-RPC interface for tool discovery and execution |
Authentication
| Method | Description |
|---|---|
| API Key | Token passed via environment variable; validated on each request |
| Bearer Token | JWT or OAuth token passed in the Authorization header |
Flow: client sends token → auth_manager validates → principal/claims attached to request context → authorization check runs before tool execution.
Hybrid QA Pipeline
Answers user questions by combining FAISS document retrieval with an LLM.
| Step | What Happens |
|---|---|
| 1. Retrieve | Query FAISS vector store for the top-N most relevant document chunks |
| 2. Assemble | Build a context window from retrieved chunks using prompt templates |
| 3. Generate | Send context + user query to the LLM via aicore_service.py |
| 4. Post-process | Apply citations, provenance trimming, or re-ranking to the output |
Key files:
| File | Purpose |
|---|---|
hybrid_qa/prompts.py | Prompt templates used for QA |
hybrid_qa/service.py | Core QA orchestration logic |
hybrid_qa/handler.py | Request handler for QA endpoints |
Adding a New Custom Handler
- Create a new module under
custom_handlers/(e.g.,my_integration_handler.py) - Implement a handler class that inherits from
custom_handlers/base.py - Register it by adding discovery metadata to
manifest.yaml - Restart the server — the Tool Loader picks it up automatically
⚠️ Handler module names must exactly match what is declared in
manifest.yaml. A mismatch will prevent discovery at startup.
Available Custom Handlers
| File | Purpose |
|---|---|
base.py | Base classes all handlers must inherit from |
nwf_handlers.py | Native Workflow integration handlers |
scp_handlers.py | SAP Cloud Platform handlers |
soa_handler.py | Sales Order Automation handlers |
odata_services_catalog.json | OData service metadata registry |
Services Reference
| Service | File | What it Does |
|---|---|---|
| AI Core | services/aicore_service.py | Orchestrates LLM calls and AI model logic |
| Vector Store | services/vectorstore_service.py | FAISS operations — persistence, indexing, retrieval |
| Chat History | services/chat_history_service.py | Persists and retrieves conversational context |
| Document Ingestion | services/document_ingestion.py | Preprocesses and ingests documents into the vector store |