Skip to main content

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_URL
  • GATEWAY_GRAPHQL_URL
  • ORCHESTRATOR=langgraph|crewai|autogen
  • TOOL_BACKEND=mcp_http|mcp_stdio|mock
  • OPENAI_API_BASE
  • OPENAI_MODEL_NAME
  • OPENAI_API_KEY
  • MCP_BASE_URL / MCP_URL (for mcp_http)
  • MCP_TOOL_RUNNER_URL (for mcp_stdio, default http://tool-runner:8100)
  • MCP_STDIO_CMD (forwarded to tool-runner, default docker mcp gateway run)
  • MCP_STDIO_AUTO_SYNC (default true)
  • MCP_STDIO_SERVER_NAME (default gateway)
  • 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_http expects Docker-hosted MCP endpoints using Docker service hostnames.
  • mcp_stdio calls a separate Tool Runner service over HTTP.
  • Tool Runner executes docker mcp gateway run and talks MCP over stdio.
  • gateway-api does not need Docker CLI or Docker socket access.
  • tool-runner installs a native Linux docker-mcp CLI plugin at image build time and sets DOCKER_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/list is aggregated; use MCP_STDIO_SERVER_TOOL_MARKERS to store tools per logical server when running syncMcpTools.
  • 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:

  1. gateway-api evaluates policy and orchestrates.
  2. gateway-api calls MCP_TOOL_RUNNER_URL for tools/list and tools/call.
  3. tool-runner executes docker mcp gateway run over stdio.
  4. 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)

Source distribution for senteniel 0.1.0
File Size Uploaded Provenance
senteniel-0.1.0.tar.gz 38.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for senteniel 0.1.0
File Interpreter ABI Platform
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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page