MatMCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MatMCPfind organic milk and add 2 cartons to my basket"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MatMCP 🛒
An MCP (Model Context Protocol) server that provides AI assistants with tools to interact with Mathem.se, a Swedish online grocery store. Search for ingredients, add items to your basket, and manage recipes directly through your AI assistant.
Features
Search Ingredients: Find products on Mathem.se by name or description
Add to Basket: Add products directly to your Mathem.se shopping cart
Recipe Management: List and fetch detailed recipe information
Structured Data: Get clean, structured product and recipe data
Related MCP server: oda-mcp
Prerequisites
macOS/Linux: This guide assumes macOS, but Linux instructions are similar
Python 3.12+: Required for the project
uv: Fast Python package manager
Mathem.se Account: For adding items to basket functionality
Installation
1. Install uv (Python package manager)
brew install uv2. Clone and setup the project
git clone <your-repo-url>
cd matmcp3. Install dependencies
uv sync4. Configure Mathem.se authentication (optional)
For basket functionality, you need to provide your Mathem.se session cookies:
Copy the example cookie file:
cp cookie.txt.example cookie.txtGet your session cookies from Mathem.se:
Open your browser and go to mathem.se
Log in to your account
Open Developer Tools (F12)
Go to the Network tab
Refresh the page
Find a request to mathem.se and copy the Cookie header value
Paste it into
cookie.txt
The format should look like:
sessionid=your_session_id_here; csrftoken=your_csrf_token_here; other_cookies=value
Note: Without cookies, you can still search for ingredients, but adding to basket will not work.
Claude Desktop Integration
Add this MCP server to your Claude Desktop configuration:
1. Open Claude Desktop config
# macOS
open ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Linux
open ~/.config/claude/claude_desktop_config.json2. Add the server configuration
Replace /YOUR/PATH/TO/matmcp with your actual project directory:
{
"mcpServers": {
"mathem": {
"command": "uv",
"args": [
"--directory",
"/YOUR/PATH/TO/matmcp",
"run",
"mathem.py"
]
}
}
}3. Restart Claude Desktop
Close and reopen Claude Desktop to load the new MCP server.
Usage
Once configured, you can ask Claude to:
Search for ingredients: "Find organic tomatoes on Mathem"
Add items to basket: "Add 2 packages of pasta to my Mathem basket"
Get recipes: "Show me the available recipes"
Recipe details: "Get the details for recipe number 1"
Available Tools
search_mathem_ingredients(query: str)
Search for products on Mathem.se
Example: Search for "organic milk"
add_to_mathem_basket(product_id: int, quantity: int = 1)
Add a product to your Mathem.se shopping basket
Requirements: Valid session cookies in cookie.txt
list_recipes()
List all available recipes from recipes.csv
get_recipe_by_index(index: int)
Get detailed recipe information by index
Development
Running tests
uv run pytestRunning the server directly
uv run mathem.pyAdding recipes
Edit recipes.csv to add new recipes with columns: id, title, url
License
This project is for educational and personal use. Please respect Mathem.se's terms of service when using this tool.
Available Tools
4 toolsadd_to_mathem_basketC
Add a product to the Mathem.se shopping basket
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | Yes | ||
| quantity | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool adds a product to a shopping basket, implying a write/mutation operation, but doesn't address permissions, side effects, error conditions, or response format. This leaves significant gaps in understanding how the tool behaves beyond its basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with 2 parameters, 0% schema coverage, no annotations, but an output schema, the description is incomplete. It covers the basic purpose but lacks usage guidelines, parameter details, and behavioral context. The presence of an output schema reduces the need to describe return values, but other gaps remain significant.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the schema provides no parameter descriptions. The tool description mentions 'product' and 'quantity' implicitly but doesn't explain what product_id represents, valid ranges for quantity, or any constraints. It adds minimal semantic value beyond what can be inferred from parameter names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Add') and the target ('product to the Mathem.se shopping basket'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential sibling tools that might also modify the basket (though none are listed among the provided siblings).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or context for invocation. It simply states what the tool does without indicating appropriate scenarios or constraints.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_recipe_by_indexC
Get a recipe by index from the list
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves a recipe but doesn't describe whether it's a read-only operation, what happens if the index is invalid (e.g., error handling), or any rate limits or permissions required. This is a significant gap for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no wasted words, making it appropriately sized and front-loaded. However, it could be more structured by including key details upfront, but it earns high marks for brevity and clarity within its limited scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (1 parameter) and the presence of an output schema (which likely defines return values), the description is minimally complete. However, with no annotations and poor parameter documentation, it lacks sufficient context for safe and effective use, such as error handling or behavioral traits, making it only adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for the undocumented parameter. It mentions 'by index' which adds some meaning beyond the schema's generic 'Index' title, but it doesn't explain what the index represents (e.g., zero-based, range, source) or provide context like valid values or examples, leaving the parameter poorly defined.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool's purpose ('Get a recipe by index from the list') with a clear verb ('Get') and resource ('recipe'), but it's vague about what 'the list' refers to and doesn't differentiate from sibling tools like 'list_recipes' or 'search_mathem_ingredients'. It's adequate but lacks specificity about scope or context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as 'list_recipes' or 'search_mathem_ingredients'. The description implies usage by index but doesn't specify prerequisites (e.g., needing to know the index from another operation) or exclusions, leaving the agent with no context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_recipesB
List available recipes
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the action ('List available recipes') without explaining what 'available' entails (e.g., pagination, sorting, authentication needs, rate limits, or return format). This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence ('List available recipes') with zero waste. It is front-loaded and appropriately sized for a simple tool, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 0 parameters, 100% schema coverage, and an output schema exists, the description is minimally adequate. However, it lacks context about what 'available' means and behavioral details (e.g., how recipes are listed), which are important for a tool that might return a list. The output schema helps, but the description could be more informative.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description does not add parameter details, which is appropriate since there are no parameters. However, it could hint at implicit filtering (e.g., by 'available'), but this is not required, so a baseline score of 4 is justified.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'List available recipes' clearly states the verb ('List') and resource ('recipes'), providing a basic purpose. However, it lacks specificity about what 'available' means (e.g., all recipes, filtered by user, etc.) and does not distinguish it from sibling tools like 'get_recipe_by_index' or 'search_mathem_ingredients', making it vague in context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention when to prefer 'list_recipes' over 'get_recipe_by_index' (for specific recipes) or 'search_mathem_ingredients' (for ingredient-based searches), nor does it specify any prerequisites or exclusions for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_mathem_ingredientsB
Search for ingredients on Mathem.se grocery store
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('search') but doesn't describe traits like whether it's read-only, rate-limited, authentication requirements, or what the search scope includes (e.g., partial matches, case sensitivity). This leaves significant gaps for an AI agent to understand how to invoke it correctly.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no wasted words. It's front-loaded with the core purpose ('search for ingredients') and efficiently includes the context ('on Mathem.se grocery store'). Every part of the description earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 1 parameter, no annotations, and an output schema exists (which should cover return values), the description is minimally adequate. It states what the tool does but lacks details on usage, behavior, and parameter specifics. For a search tool, more context on search behavior or results would be helpful, but the output schema mitigates some gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 1 parameter with 0% description coverage, so the schema provides no semantic information. The description mentions 'search for ingredients' which implies the 'query' parameter is for ingredient names, adding some meaning beyond the bare schema. However, it doesn't specify format, examples, or constraints, so it only partially compensates for the low schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('search') and resource ('ingredients on Mathem.se grocery store'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list_recipes' or 'get_recipe_by_index' which might also involve ingredient-related operations, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to use 'search_mathem_ingredients' instead of sibling tools like 'add_to_mathem_basket' or 'list_recipes', nor does it specify any prerequisites or exclusions for its use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.0- First observed
add_to_mathem_basket - First observed
get_recipe_by_index - First observed
list_recipes - First observed
search_mathem_ingredients
TDQS
The tools have mostly distinct purposes: list_recipes and get_recipe_by_index handle recipe browsing, while add_to_mathem_basket and search_mathem_ingredients focus on shopping basket and ingredient search. However, there is a slight overlap in the recipe domain where list_recipes and get_recipe_by_index could be confused if an agent needs to retrieve a specific recipe, but the descriptions clarify their distinct roles.
The naming is mixed with some consistency: list_recipes and get_recipe_by_index follow a verb_noun pattern, but add_to_mathem_basket uses a prepositional phrase and search_mathem_ingredients includes the domain name. This creates a readable but inconsistent convention across the tool set, with deviations from a uniform pattern.
With 4 tools, the count is reasonable for a server focused on recipes and grocery shopping. It covers key operations like listing, retrieving, searching, and adding items, making it well-scoped for its apparent purpose, though it could potentially benefit from additional tools for a more complete workflow.
The tool set covers basic recipe browsing and ingredient shopping, but there are notable gaps. For example, there is no tool to manage the shopping basket beyond adding items (e.g., remove or view items), and no update or delete operations for recipes. This limits the agent's ability to handle full lifecycle tasks in the domain.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Turn any shopping list into a ready-to-checkout grocery cart across 26 European supermarkets.
AI-powered kitchen management — pantry, recipes, meal plans, shopping lists
Search, save, organize, cook, and share recipes with any AI assistant.
Household-aware cooking brain: pantry, meal suggestions, dietary safety, recipes, shopping lists.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Rohlik Group's online grocery delivery services across multiple European countries, supporting product search, shopping cart management, order history analysis, and personalized meal suggestions based on purchase patterns.563MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables agentic grocery shopping on Oda (Norway) and Mathem (Sweden) platforms through an MCP-compatible interface. Users can search for products, manage their shopping cart, and access order history using natural language commands.1-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with Rohlik Group's online grocery delivery services across multiple countries, including product search, cart management, and account info.56119MIT
- FlicenseAqualityCmaintenanceEnables AI assistants to manage shopping lists and items (create, edit, delete, mark as purchased) via integration with a backend API.8-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sleipner42/mathem-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server