Ollama / vLLM Bridge

v1.0.7
io.github.setheerwagen/mcp-ollama-vllm Checked 4 days ago Published 2 days ago

Call your local Ollama or vLLM model over MCP with schema-validated JSON output

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_models

Lists the models available on the local instance. Returns per model the name, parameter size, quantization and on-disk size, as far as the backend reports them. With vLLM it additionally shows whether an entry is a LoRA adapter and which base model it belongs to. Sensible before any other tool, to pick a fitting and actually present model name.

local_ask

Asks a local model a question and returns the answer as text. For free-text tasks: writing, rewriting, summarizing, explaining. If a machine-processable result is needed, use 'local_structured' instead. Args: model: Model name as in 'list_models', for example 'llama3.2:3b'. prompt: The actual instruction for the model. system: Optional role/behavior instruction. temperature: 0 means as deterministic as possible (default), higher means more creative. max_tokens: Optional cap on the number of generated tokens. context: Optional text p…

ParameterTypeDescription
model *string
prompt *string
context
max_tokens
system
temperaturenumber
thinkboolean

local_structured

Has a local model return a result that conforms to a JSON schema. Uses the respective backend's schema enforcement (Ollama's 'format' field, vLLM's 'response_format' with 'json_schema') and then additionally validates the answer against the schema itself. If the output does not satisfy the schema, it retries up to twice, passing the model the concrete violations. Only then an error, but then with the invalid raw output, so it is visible what went wrong. Args: model: Model name, for example 'llama3.2:3b'. prompt: Instruction on what should be extrac…

ParameterTypeDescription
model *string
prompt *string
schema *object
system
thinkboolean

local_embed

Computes embedding vectors for a list of texts. Useful for similarity comparisons, duplicate detection or a rough sort by topic, without troubling a large language model. Args: texts: List of texts to embed. model: Embedding model, with Ollama preset to 'nomic-embed-text'.

ParameterTypeDescription
texts *array
modelstring