Senteniel server wrapper for Sentinel control plane (FastAPI + GraphQL)
Project description
Senteniel Server Wrapper
senteniel is the server/runtime wrapper package (FastAPI + GraphQL).
For embedded library usage, use sentinel-core.
Install
python -m pip install -U pip setuptools wheel
python -m pip install -e .
Run
senteniel serve --host 0.0.0.0 --port 8000
Equivalent direct run:
uvicorn app.main:app --host 0.0.0.0 --port 8000
Key Endpoints
- GraphQL:
http://localhost:8000/graphql - Metrics:
http://localhost:8000/metrics
Key Environment Variables
DATABASE_URLGATEWAY_GRAPHQL_URLORCHESTRATOR=langgraph|crewai|autogenTOOL_BACKEND=mcp_http|mcp_stdio|mockOPENAI_API_BASEOPENAI_MODEL_NAMEOPENAI_API_KEYMCP_BASE_URL/MCP_URL(formcp_http)MCP_TOOL_RUNNER_URL(formcp_stdio, defaulthttp://tool-runner:8100)MCP_STDIO_CMD(forwarded to tool-runner, defaultdocker mcp gateway run)MCP_STDIO_AUTO_SYNC(defaulttrue)MCP_STDIO_SERVER_NAME(defaultgateway)MCP_STDIO_PLACEHOLDER_URL(display-only placeholder for stdio mode)MCP_STDIO_SERVER_TOOL_MARKERS(optional JSON map for per-server filtering)MCP_STDIO_SERVER_PREFIX_OVERRIDES(optional JSON map for MCP server prefixes)MCP_STDIO_STRIP_PREFIXES(optional CSV fallback for namespace stripping on call)
MCP Notes
mcp_httpexpects Docker-hosted MCP endpoints using Docker service hostnames.mcp_stdiocalls a separate Tool Runner service over HTTP.- Tool Runner executes
docker mcp gateway runand talks MCP over stdio. gateway-apidoes not need Docker CLI or Docker socket access.tool-runnerinstalls a native Linuxdocker-mcpCLI plugin at image build time and setsDOCKER_MCP_IN_CONTAINER=1.- During stdio sync/call, Senteniel appends
--servers <server_name>for non-gateway logical servers so per-server discovery returns only that server's tools. - In stdio mode, tool discovery can auto-sync on first tool call.
- In stdio mode,
tools/listis aggregated; useMCP_STDIO_SERVER_TOOL_MARKERSto store tools per logical server when runningsyncMcpTools. - If no marker is configured for a given server, Senteniel falls back to dynamic matching from server name tokens and tool metadata.
- Synced stdio tools are namespaced with the logical server prefix
(for example:
openbnb.airbnb_search,gh.list_issues). - During execution, Senteniel strips the known namespace and sends the raw tool name to Docker MCP Gateway.
Example:
export MCP_STDIO_SERVER_TOOL_MARKERS='{
"openbnb-airbnb":["airbnb_"],
"github-official":["add_","issue_","list_","search_"]
}'
export MCP_STDIO_SERVER_PREFIX_OVERRIDES='{
"openbnb-airbnb":"openbnb",
"github-official":"gh"
}'
Then sync each server name:
mutation { syncMcpTools(serverName: "openbnb-airbnb") { serverName toolCount } }
mutation { syncMcpTools(serverName: "github-official") { serverName toolCount } }
Policy can now target server namespaces directly:
export POLICY_PREFIX_RULES='{
"openbnb.":{"decision":"APPROVAL_REQUIRED","risk":0.6,"reason":"Airbnb tools require approval"},
"gh.list_":{"decision":"ALLOW","risk":0.0,"reason":"GitHub read/list allowed"},
"gh.issue_write":{"decision":"APPROVAL_REQUIRED","risk":0.7,"reason":"GitHub write requires approval"}
}'
All orchestrators (langgraph, crewai, autogen) support explicit
namespaced tool invocation using either:
<tool_name> {"json":"args"}<tool_name> key=value key2=value2
Example: openbnb_airbnb.airbnb_search {"location":"Accra"}
Tool Runner Architecture
With TOOL_BACKEND=mcp_stdio, requests flow like this:
gateway-apievaluates policy and orchestrates.gateway-apicallsMCP_TOOL_RUNNER_URLfortools/listandtools/call.tool-runnerexecutesdocker mcp gateway runover stdio.- Docker MCP Gateway fans out to the MCP servers you enabled in Docker MCP Toolkit.
In Docker Compose, tool-runner is the only service that needs Docker socket
access (/var/run/docker.sock).
Verify
curl -s http://localhost:8000/graphql -H 'content-type: application/json' \
-d '{"query":"{ ping }"}'
SDK vs Runtime
senteniel: full runtime/control plane (this package)sentinel-core: library SDK for embedded policy/orchestration/tool execution and optional remote client calls
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file senteniel-0.1.0.tar.gz.
File metadata
- Download URL: senteniel-0.1.0.tar.gz
- Upload date:
- Size: 38.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
358899409e78196b93ab0ae398dc5453ad637004ee6c1955fbe3fc8559ae91e0
|
|
| MD5 |
559b0b43d848d92060d8018e5f4e71aa
|
|
| BLAKE2b-256 |
4c1ca0fb65a7515cade5b08f702171904ed677c274ae7a87375bf68032952d0c
|
File details
Details for the file senteniel-0.1.0-py3-none-any.whl.
File metadata
- Download URL: senteniel-0.1.0-py3-none-any.whl
- Upload date:
- Size: 48.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41f9446ad9811a60fccc81b96432df33dbebbad79d681ca151230df0a50a4f9b
|
|
| MD5 |
92f4f0b762d965a8671abfa6c54164e4
|
|
| BLAKE2b-256 |
2634876710c6c6da20b961cb340a0f7374f781f86f8be795285784225176f7ec
|