Skip to content

Commit e8d9c21

Browse files
authored
docs: updating README.md (#115)
* docs: updating README.md * docs: updating README.md
1 parent d1d673b commit e8d9c21

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
- [Autocomplete and Prompt Features](#autocomplete-and-prompt-features)
4343
- [Configuration Management](#configuration-management)
4444
- [Server Configuration Format](#server-configuration-format)
45+
- [Tips: Where to Put MCP Server Configs and a Working Example](#tips-where-to-put-mcp-server-configs-and-a-working-example)
4546
- [Compatible Models](#compatible-models)
4647
- [Ollama Cloud Models](#ollama-cloud-models)
4748
- [Where Can I Find More MCP Servers?](#where-can-i-find-more-mcp-servers)
@@ -519,6 +520,57 @@ The JSON configuration file supports STDIO, SSE, and Streamable HTTP server type
519520
> [!NOTE]
520521
> **MCP 1.10.1 Transport Support**: The client now supports the latest Streamable HTTP transport with improved performance and reliability. If you specify a URL without a type, the client will default to using Streamable HTTP transport.
521522
523+
### Tips: where to put MCP server configs and a working example
524+
525+
A common point of confusion is where to store MCP server configuration files and how the TUI's save/load feature is used. Here's a short, practical guide that has helped other users:
526+
527+
- The TUI's `save-config` / `load-config` (or `sc` / `lc`) commands are intended to save *TUI preferences* like which tools you enabled, your selected model, thinking mode, and other client-side settings. They are not required to register MCP server connections with the client.
528+
- For MCP server JSON files (the `mcpServers` object shown above) we recommend keeping them outside the TUI config directory or in a clear subfolder, for example:
529+
530+
```
531+
~/.config/ollmcp/mcp-servers/config.json
532+
```
533+
534+
You can then point `ollmcp` at that file at startup with `-j` / `--servers-json`.
535+
536+
> [!IMPORTANT]
537+
> When using HTTP-based MCP servers, use the `streamable_http` type (not just `http`).
538+
539+
Here a minimal working example let's say this is your `~/.config/ollmcp/mcp-servers/config.json`:
540+
541+
```json
542+
{
543+
"mcpServers": {
544+
"github": {
545+
"type": "streamable_http",
546+
"url": "https://api.githubcopilot.com/mcp/",
547+
"headers": {
548+
"Authorization": "Bearer mytoken"
549+
}
550+
}
551+
}
552+
}
553+
```
554+
555+
> [!TIP]
556+
> When using GitHub MCP server, make sure to replace `"mytoken"` with your actual GitHub API token.
557+
558+
With that file in place you can connect using:
559+
560+
```
561+
ollmcp -j ~/.config/ollmcp/mcp-servers/config.json
562+
```
563+
564+
Here you can find a GitHub issue related to this common pitfall: https://github.com/jonigl/mcp-client-for-ollama/issues/112#issuecomment-3446569030
565+
566+
#### Demo
567+
568+
A short demo (asciicast) that should help anyone reproduce the working setup quickly. This example uses an [MCP server example with streamable HTTP protocol](https://github.com/jonigl/mcp-server-with-streamable-http-example) usage:
569+
570+
[![asciicast](https://asciinema.org/a/751387.svg)](https://asciinema.org/a/751387)
571+
572+
573+
522574
## Compatible Models
523575

524576
The following Ollama models work well with tool use:
@@ -579,6 +631,7 @@ This repository contains reference implementations for the Model Context Protoco
579631
## Related Projects
580632

581633
- **[Ollama MCP Bridge](https://github.com/jonigl/ollama-mcp-bridge)** - A Python API layer that sits in front of Ollama, automatically adding tools from multiple MCP servers to every chat request. This project provides a transparent proxy solution that pre-loads all MCP servers at startup and seamlessly integrates their tools into the Ollama API.
634+
- **[MCP Server with Streamable HTTP Example](https://github.com/jonigl/mcp-server-with-streamable-http-example)** - An example MCP server demonstrating the usage of the streamable HTTP protocol.
582635

583636
## License
584637

0 commit comments

Comments
 (0)