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
Metadata
Release files for senteniel 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| senteniel-0.1.0.tar.gz | 38.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| senteniel-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 86.3 kB
Release files / senteniel-0.1.0.tar.gz
| Download URL | senteniel-0.1.0.tar.gz |
|---|---|
| Size | 38.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
358899409e78196b93ab0ae398dc5453ad637004ee6c1955fbe3fc8559ae91e0
|
|
BLAKE2b-256 checksum How to use checksums |
4c1ca0fb65a7515cade5b08f702171904ed677c274ae7a87375bf68032952d0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / senteniel-0.1.0-py3-none-any.whl
| Download URL | senteniel-0.1.0-py3-none-any.whl |
|---|---|
| Size | 48.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41f9446ad9811a60fccc81b96432df33dbebbad79d681ca151230df0a50a4f9b
|
|
BLAKE2b-256 checksum How to use checksums |
2634876710c6c6da20b961cb340a0f7374f781f86f8be795285784225176f7ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for senteniel 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.