Skip to main content
Version: 2.0.0

Use

What the MCP Server Can Do

Use CaseExample
Fetch enterprise dataPull sales order data from an SAP backend
Execute business processesCreate and run workflow jobs
Answer document questionsHybrid QA using FAISS + LLM
Connect AI to live systemsCustom 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)
ComponentFileWhat it Does
Tool Loadercore/tool_loader.pyDiscovers and loads tool definitions and handler modules at startup
Tool Generatorcore/tool_generator.pyGenerates runtime adapters from tool manifests
Tool Executorcore/tool_executor.pyValidates inputs, runs the tool, enforces error handling and timeouts
YAML Validatorcore/yaml_validator.pyValidates manifests and tool metadata
Auth Managercore/auth_manager.pyPerforms 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

MethodEndpointWhat it Does
POST/uploadAccepts files and runs the document ingestion pipeline
GET/statusReturns health and status information
POST/mcp/{env}JSON-RPC interface for tool discovery and execution

Authentication

MethodDescription
API KeyToken passed via environment variable; validated on each request
Bearer TokenJWT 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.

StepWhat Happens
1. RetrieveQuery FAISS vector store for the top-N most relevant document chunks
2. AssembleBuild a context window from retrieved chunks using prompt templates
3. GenerateSend context + user query to the LLM via aicore_service.py
4. Post-processApply citations, provenance trimming, or re-ranking to the output

Key files:

FilePurpose
hybrid_qa/prompts.pyPrompt templates used for QA
hybrid_qa/service.pyCore QA orchestration logic
hybrid_qa/handler.pyRequest handler for QA endpoints

Adding a New Custom Handler

  1. Create a new module under custom_handlers/ (e.g., my_integration_handler.py)
  2. Implement a handler class that inherits from custom_handlers/base.py
  3. Register it by adding discovery metadata to manifest.yaml
  4. 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

FilePurpose
base.pyBase classes all handlers must inherit from
nwf_handlers.pyNative Workflow integration handlers
scp_handlers.pySAP Cloud Platform handlers
soa_handler.pySales Order Automation handlers
odata_services_catalog.jsonOData service metadata registry

Services Reference

ServiceFileWhat it Does
AI Coreservices/aicore_service.pyOrchestrates LLM calls and AI model logic
Vector Storeservices/vectorstore_service.pyFAISS operations — persistence, indexing, retrieval
Chat Historyservices/chat_history_service.pyPersists and retrieves conversational context
Document Ingestionservices/document_ingestion.pyPreprocesses and ingests documents into the vector store