Tutorial: getting started with MCP in mini-me
By the end of this tutorial, you will have started mini-me with MCP servers configured, and made the model call a tool from one of them.
No prior knowledge of MCP is required.
Prerequisites
- The
mmbinary built, and Docker Model Runner running with the model pulled: see your first session with mini-me. - A terminal open at the root of the repository.
- An internet connection: the servers of this tutorial are remote.
Step 1 — Look at the provided configuration
Display the mcp: section of the provided configuration file:
grep -A3 "^mcp:" demos/dmr/agent.dmr.mcp.yaml
You should see:
mcp:
enabled: true
permissions: ask # Ask before executing MCP tools (recommended for security)
discoveryTimeout: 10s # Timeout for discovering tools at startup
Further down, the same section declares three servers: context7, wikipedia and github.
Step 2 — Export your API keys (optional)
Wikipedia needs no API key, so you can skip this step and still do steps 3 and 4. To also use the two other servers, export their keys in this terminal:
export CONTEXT7_API_KEY="your-context7-key"
export GITHUB_PERSONAL_ACCESS_TOKEN="your-github-token"
Step 3 — Start mini-me with MCP enabled
Run mini-me with the provided configuration file:
./mm -config demos/dmr/agent.dmr.mcp.yaml
You should see in the startup banner:
tools: bash, read_skill, read_file, write_file, edit_file, plan, ask_user, unload_model, wikipedia_search_wikipedia, wikipedia_get_article, wikipedia_get_summary, ...
✅ Expected result: you see the MCP tools (
wikipedia_*) in the list. Each one is named after its server.
A server without its key is skipped with a warning above the banner, and the others still work:
[warning: mcp server context7: discovery failed: initialize: missing token for env var CONTEXT7_API_KEY]
If you exported the keys, the context7_* and github_* tools are in the list too.
Step 4 — Try Wikipedia (no authentication)
At the > prompt, type:
Explain what the Model Context Protocol is
Because the file says permissions: ask, mini-me asks before each MCP tool call:
🔐 wikipedia: search_wikipedia
[a] allow once · [s] allow wikipedia_search_wikipedia for this session · [r] reject · [n] never wikipedia_search_wikipedia
?
Type a and press Enter, each time it asks. The model usually searches first, then reads an article.
✅ Expected result: the model answers from what
wikipedia_search_wikipediaandwikipedia_get_articlereturned.
Step 5 — Try Context7 (with authentication)
If you exported CONTEXT7_API_KEY, ask the model:
How do I use useEffect in React?
✅ Expected result: the model uses
context7_resolve_library_id, thencontext7_query_docs, to find the documentation.
Step 6 — Try GitHub (with authentication)
If you exported GITHUB_PERSONAL_ACCESS_TOKEN, ask the model:
What are my repositories on GitHub?
✅ Expected result: the model uses the
github_*tools to reach your repositories.
Step 7 — Leave
At the > prompt, type:
/quit
What now?
You have successfully set up MCP in mini-me. To go further:
- To carry out specific tasks → see the how-to guides
- To understand how it works → see the explanation
- For the technical reference → see the reference
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|