mcp-siebel-phala
by Jeretucu
README.md
# mcp-siebel-phala
MCP (Model Context Protocol) server for Siebel CRM with HTTP/SSE transport, designed to be deployed on Phala Cloud TEE (Trusted Execution Environment).
Running your Siebel connector inside a TEE ensures that credentials and sensitive data are protected — even the infrastructure provider cannot access them.
## Available Tools
| Tool | Description |
|---|---|
| `get_account` | Get an account by ID |
| `search_accounts` | Search accounts by name |
| `get_contact` | Get a contact by ID |
| `search_contacts` | Search contacts by name or email |
| `get_opportunity` | Get an opportunity by ID |
| `create_activity` | Create an activity in Siebel |
| `update_record` | Update any Siebel record |
| `run_query` | Run a query on any Business Object |
## Requirements
- Docker
- Node.js 20+ (for local development without Docker)
## Environment Variables
Copy `.env.example` to `.env` and fill in your values:
```env
SIEBEL_URL=https://your-siebel-server:9001
SIEBEL_USERNAME=your_username
SIEBEL_PASSWORD=your_password
SIEBEL_LANG=ENU
PORT=3000
```
## Run locally with Docker
```bash
git clone https://github.com/Jeretucu/mcp-siebel-phala.git
cd mcp-siebel-phala
cp .env.example .env
# Edit .env with your Siebel credentials
docker compose up --build
```
The server will be available at `http://localhost:3000`.
### Endpoints
| Method | Route | Description |
|---|---|---|
| `GET` | `/sse` | SSE connection for the MCP client |
| `POST` | `/messages` | Tool call messages |
| `GET` | `/health` | Health check |
| `GET` | `/attestation` | TDX remote attestation quote (Phala Cloud only) |
## Deploy to Phala Cloud
Phala Cloud runs your container inside a TEE (Intel TDX), ensuring Siebel credentials are **never visible** outside the secure environment.
### 1. Push your image to Docker Hub
```bash
docker build -t your-dockerhub-user/mcp-siebel-phala:latest .
docker push your-dockerhub-user/mcp-siebel-phala:latest
```
### 2. Create a CVM on Phala Cloud
1. Go to [cloud.phala.network](https://cloud.phala.network) and sign in.
2. Click **Deploy** and paste this `docker-compose.yml`:
```yaml
services:
app:
image: your-dockerhub-user/mcp-siebel-phala:latest
container_name: app
ports:
- "3000:3000"
environment:
- SIEBEL_URL=https://your-siebel-server:9001
- SIEBEL_USERNAME=your_username
- SIEBEL_PASSWORD=your_password
- SIEBEL_LANG=ENU
- PORT=3000
volumes:
- /var/run/tappd.sock:/var/run/tappd.sock
restart: unless-stopped
```
3. Click **Deploy** and wait for the CVM to start.
### 3. Connect your MCP client
Once running, Phala Cloud assigns a public URL like:
```
https://xxxxxxxxxxxxxxxx.phala.network
```
Configure your MCP client (e.g. Claude Desktop):
```json
{
"mcpServers": {
"siebel": {
"url": "https://xxxxxxxxxxxxxxxx.phala.network/sse"
}
}
}
```
### 4. Verify TEE attestation
```bash
curl https://xxxxxxxxxxxxxxxx.phala.network/attestation
# → { "success": true, "quote": { ... } }
```
The returned quote is a cryptographic proof signed by Intel TDX that your MCP server is running inside a real TEE.
## Project Structure
```
mcp-siebel-phala/
├── src/
│ ├── index.ts # Express server + SSE
│ ├── siebel-client.ts # Siebel REST API HTTP client
│ └── tools/
│ ├── accounts.ts
│ ├── contacts.ts
│ ├── opportunities.ts
│ ├── activities.ts
│ ├── records.ts
│ ├── query.ts
│ └── index.ts
├── Dockerfile
├── docker-compose.yml
├── package.json
└── tsconfig.json
```
## Local development (without Docker)
```bash
npm install
cp .env.example .env
# Edit .env
# Dev mode (hot reload)
npm run dev
# Build and run
npm run build
npm start
```
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues