mcp-bastion-ollama
Security middleware for Ollama powered by MCP-Bastion.
MCP-Bastion security middleware for Ollama local models (OpenAI-compatible API).
Install
pip install mcp-bastion-ollama
Usage
from mcp_bastion_ollama import SecureOllama
client = SecureOllama() # default http://localhost:11434/v1
print(client.chat("What is MCP?", model="llama3.2"))
Features
- Content filtering on prompts / messages
- Rate limiting per caller
- Prompt injection heuristics (via MCP-Bastion core)
- Pulls in
mcp-bastion-pythonautomatically
License
Same terms as the MCP-Bastion project: see LICENSE. Non-commercial use is free with required citation/attribution; copyright terms apply. Commercial use as defined in the License may need a separate agreement (COMMERCIAL_LICENSE.md).
Release files for mcp-bastion-ollama 5.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 | |
|---|---|---|---|
| mcp_bastion_ollama-5.1.0.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_bastion_ollama-5.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.6 kB
Release files / mcp_bastion_ollama-5.1.0.tar.gz
| Download URL | mcp_bastion_ollama-5.1.0.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0853e8916dba746f287d545826bd879555e66fddbc0cbb097482a9978331ee9
|
|
BLAKE2b-256 checksum How to use checksums |
d4bcc74eb5fe12bd36a7043a644c87c806c905cfc0a6890da68aa4a8a81d2f09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logRelease files / mcp_bastion_ollama-5.1.0-py3-none-any.whl
| Download URL | mcp_bastion_ollama-5.1.0-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a73161c629c2d0b5e754676e1b8156b90c6bfca6b0d1f296e9050ccebe69c15d
|
|
BLAKE2b-256 checksum How to use checksums |
58301bc43107de1ff79b6d78c1acf329aaf84173a193c27c11ea2aae7a7e7c4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency log