PM

p18a/mcp-ruoka

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 5 forks 质量 51 趋势 14

An MCP server for grocery & alcohol search in Finland

概览

Unofficial MCP server for searching Finnish grocery and alcohol products across K-Ruoka, S-Kaupat, and Alko. - — Playwright browser with stealth plugin (Cloudflare Turnstile bypass) - — Direct HTTP with persisted GraphQL query hashes (extracted via Playwright) - — Direct HTTP with NextAuth guest session (no browser needed) - — Search products by query. Supports all three chains. storeId required for K-Ruoka/S-Kaupat, optional for Alko (national catalog). - — List stores, optionally filtered by city and/or chain. Dependencies and Playwright browser are installed automatically on first load. Note the client ID and secret — you'll need them to connect. Runs the server as a subprocess — simplest option for local use. For remote deployments. Deploy first (see above), then point your MCP client at it: For direct bearer token auth, set MCP_AUTH_TOKEN as a Fly secret and use it in the header above.

README

以下为原文 README 节选,完整内容请查看原文。

mcp-ruoka

Unofficial MCP server for searching Finnish grocery and alcohol products across K-Ruoka, S-Kaupat, and Alko.

  • K-Ruoka — Playwright browser with stealth plugin (Cloudflare Turnstile bypass)
  • S-Kaupat — Direct HTTP with persisted GraphQL query hashes (extracted via Playwright)
  • Alko — Direct HTTP with NextAuth guest session (no browser needed)

Tools

  • search_products — Search products by query. Supports all three chains. storeId required for K-Ruoka/S-Kaupat, optional for Alko (national catalog).
  • get_stores — List stores, optionally filtered by city and/or chain.

Install as Claude Code plugin

Requires Bun installed.

/plugin marketplace add p18a/mcp-ruoka
/plugin install ruoka@ruoka

Dependencies and Playwright browser are installed automatically on first load.

Deploy to Fly.io

# Clone and enter the repo
git clone https://github.com/p18a/mcp-ruoka.git
cd mcp-ruoka

# Create fly.toml from example (pick your own app name)
cp fly.example.toml fly.toml
fly launch --no-deploy

# Set OAuth credentials
fly secrets set \
  OAUTH_CLIENT_ID=$(openssl rand -hex 32) \
  OAUTH_CLIENT_SECRET=$(openssl rand -hex 32)

# Deploy
fly deploy

Note the client ID and secret — you’ll need them to connect.

Connect via stdio

Runs the server as a subprocess — simplest option for local use.

git clone https://github.com/p18a/mcp-ruoka.git
cd mcp-ruoka
bun install

Then add to your MCP client config:

{
  "mcpServers": {
    "ruoka": {
      "command": "bun",
      "args": ["run", "/path/to/mcp-ruoka/src/index.ts", "--stdio"]
    }
  }
}

Connect via Streamable HTTP

For remote deployments. Deploy first (see above), then point your MCP client at it:

{
  "mcpServers": {
    "ruoka": {
      "type": "streamable-http",
      "url": "https://.fly.dev/mcp",
      "headers": {
        "Authorization": "Bearer "
      }
    }
  }
}

For direct bearer token auth, set MCP_AUTH_TOKEN as a Fly secret and use it in the header above. For OAuth, configure OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET on both the server and your MCP client.

Local development

bun install
cp .env.example .env
bun run dev

The server runs on http://localhost:3001/mcp by default (Streamable HTTP). Pass --stdio for stdio transport.

Environment variables

Variable Description
OAUTH_CLIENT_ID OAuth client ID (required for claude.ai)
OAUTH_CLIENT_SECRET OAuth client secret (required for claude.ai)
MCP_AUTH_TOKEN Static bearer token (alternative to OAuth)
PORT Server port (default: 3001)
LOG_LEVEL pino log level (default: info)
BROWSER_DATA_DIR Persistent browser data directory (default: .browser-data/)

Usage examples

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "ruoka": { "command": "bun", "args": ["run", "/path/to/mcp-ruoka/src/index.ts", "--stdio"] } } }