siebel-mcp-gateway
Exposes the Oracle Siebel CRM REST API as MCP tools over streamable HTTP, enabling agentic clients to query, create, update, and delete Siebel records and pull the object catalog without holding Siebel credentials themselves.
README
Siebel MCP Gateway
Exposes the Oracle Siebel REST API as MCP tools over streamable HTTP, so an agentic client can query/create/update/delete Siebel records and pull the object catalog without holding Siebel credentials itself.
Mock mode models a synthetic healthcare-referral demo schema (patient → community/hospital referral → Form 17 commitment → treatment history), built to faithfully carry a set of documented, deliberate data-quality findings rather than smooth them over — duplicate patient records across two orgs, a status field that actually holds urgency, a script that silently overrides a Workflow's stated limits, two "visits remaining" fields that drift apart. All data is synthetic.
Stack
Python 3.12+, the official mcp SDK (MCPServer, the current name for what
used to be called FastMCP in older SDK versions), httpx for outbound
Siebel calls, uvicorn as the ASGI server.
Local run
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Fill in .env, or for a first run without a live Siebel instance:
# MOCK_MODE=true
# MCP_GATEWAY_TOKEN=<any string you'll also give your client>
MOCK_MODE=true MCP_GATEWAY_TOKEN=dev-token \
uvicorn app.server:app --host 0.0.0.0 --port 8000
Health check: curl http://localhost:8000/healthz → {"status":"ok"} (no
auth required, so platform health checkers work).
MCP endpoint: http://localhost:8000/mcp — every request needs
Authorization: Bearer <MCP_GATEWAY_TOKEN>, since the endpoint itself has no
other access control once deployed publicly.
Tests
python3 -m pytest -v
All tests run against the in-memory mock store or a mocked HTTP transport — no network calls, no live Siebel instance required.
Deploying to Render
- Push this repo to GitHub.
- Grant Render access to the repo first, if it's not already connected. Render's GitHub App only sees repos it's been explicitly given access to — a brand-new repo won't show up in Render's repo picker just because you own it. Go to github.com/settings/installations → find Render → Configure → either switch to "All repositories" or add this repo to the allowed list → Save. Only then will it appear back in Render's connect screen.
- In the Render dashboard: New → Blueprint (not "Web Service" — this
repo has a
render.yaml, and Blueprint is what reads it). Connect the repo, confirm branchmainand the defaultrender.yamlpath. - Render shows a form for every env var marked
sync: falseinrender.yaml— fill these in before deploying:MCP_GATEWAY_TOKEN— generate one, e.g.openssl rand -hex 32MOCK_MODE—trueto start serving mock data immediately (recommended while the real Siebel instance isn't ready yet),falseif you already have real Siebel credentials to enter belowSIEBEL_BASE_URL/SIEBEL_USERNAME/SIEBEL_PASSWORD— only required ifMOCK_MODE=false; leave blank if starting in mock mode
- Click Deploy Blueprint. Render assigns
https://<your-service>.onrender.com.
To change any of these later (e.g. flip MOCK_MODE once the real Siebel
instance is ready): open the service (not the Blueprint) → Environment
tab → edit the value → Save Changes, which triggers a redeploy.
Pointing your MCP client at the deployed gateway
- URL:
https://<your-service>.onrender.com/mcp - Transport: streamable HTTP
- Auth: a static bearer token/API key, not OAuth — set the header to
Authorization: Bearer <MCP_GATEWAY_TOKEN>(the same value from step 4 above). If your client's auth UI wants a header name and a raw value separately rather than one combined header, header name isAuthorizationand value isBearer <token>(include the word "Bearer") — if that gets a 401, try giving it just the raw token instead, since some clients add theBearerprefix themselves.
Notes from actually deploying this
- The mock store is in-memory only. Anything created/updated/deleted during a session persists only as long as that server process stays up. A redeploy, or Render's free-tier instance spinning down after ~15 minutes idle and cold-starting on the next request, resets it back to the original seeded data. That's expected mock-mode behavior, not a bug.
- The
mcpPython SDK's client-side transport dependency ishttpx2, not plainhttpx— only relevant if you're writing your own MCP client against this gateway using the SDK'sstreamable_http_clienthelper rather than a higher-level client app; it expects anhttpx2.AsyncClientfor thehttp_client=argument, not a regularhttpx.AsyncClient.
Flip-to-live checklist
Once the real Siebel instance is up:
- [ ] Set
SIEBEL_BASE_URLto the real instance (no trailing slash), e.g.https://<siebel-host>/siebel/v1.0 - [ ] Set
SIEBEL_USERNAME/SIEBEL_PASSWORD - [ ] Set
SIEBEL_VERIFY_TLS=falseonly if the instance is still on a self-signed cert — flip back totrueonce it has a real one - [ ] Set
MOCK_MODE=false - [ ] Redeploy, then smoke-test with
siebel_list_objectsandsearch_facilitiesbefore pointing real agent traffic at it
Tools
Generic (work against any Business Component: Contact, Employee,
Medical Facility, Appointment Slot, Referral Request,
Commitment Form, Treatment History):
| Tool | Purpose |
|---|---|
siebel_query |
List/search records: searchspec, fields, page_size, start_row |
siebel_get |
Fetch one record by row_id |
siebel_create |
Create a record from a fields dict |
siebel_update |
Update a record's fields by row_id |
siebel_delete |
Delete a record by row_id |
siebel_list_objects |
List the business components the account exposes |
Convenience wrappers, thinner surface for common demo asks:
| Tool | Purpose |
|---|---|
search_facilities |
By specialty code and/or exact city |
search_contacts |
By last-name prefix |
create_referral |
Patient + doctor + specialty + urgency; starts at Stage Code = COMMUNITY_SEARCH |
Notes on the Siebel REST API assumptions baked in here
- Auth is HTTP Basic on every outbound call (separate from this gateway's own bearer-token check on inbound MCP requests — two different auth layers, don't conflate them).
- URL grammar is
{BASE}/data/{BusinessObject}/{BusinessComponent}. BO and BC are not always the same name here — e.g.Referral Requestis a child BC under thePatient ReferralBO,Appointment Slotis a child BC underAppointment Management. Tools take the BC name; the client looks up the right BO internally. Path segments are URL-encoded, so multi-word names work. - List responses arrive as
{"items": [...]}; the"links"array on each record is stripped before returning to the model, to save tokens. - Non-2xx responses are surfaced as the HTTP status code plus Siebel's own message text; a 401 gets a clear "check Siebel credentials" prefix. Outbound calls time out at 30s.
- Several fields are computed, not stored (Age, Days Waiting, Visits Remaining, Is Expired, Entry Gap Days, and the Facility/Doctor/Patient join fields) — they're derived fresh on every read, matching how they'd behave as real Business Component calculated/join fields rather than physical columns.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。