SimpleShop MCP

SimpleShop MCP

A read-only MCP server for SimpleShop accounting data, enabling AI agents to find documents, download PDFs, inspect products, and review sales exports.

Category
访问服务器

README

SimpleShop MCP

Read-only FastMCP server for SimpleShop accounting data.

This server exposes a small MCP tool surface for AI agents that need to audit SimpleShop documents, download document PDFs, inspect products, and review product sales exports before copying data into another accounting system.

It is intentionally read-only. It does not create, update, delete, pay, cancel, send, or mutate SimpleShop records.

Install as a Plugin

simpleshop-mcp ships as a Claude Code / Cowork plugin. In either client:

/plugin marketplace add mikz/simpleshop-mcp
/plugin install simpleshop-mcp@simpleshop-mcp

When the plugin is enabled the host prompts for SimpleShop login and SimpleShop API key. The API key is masked, stored in your OS keychain, and injected into the MCP server's environment at launch.

Requirements on the host machine:

  • uvx on PATH (install with uv)
  • Python 3.13 (uvx will fetch one if missing)

Features

  • Find SimpleShop documents across invoices, proformas, receipts, orders, tax documents, and related document types.
  • Batch-download document PDFs, with per-document success/error results.
  • Expose document PDFs as MCP resources: simpleshop://documents/{document_id}/pdf/{variant}.
  • Find products through the SimpleShop product API.
  • Fetch and normalize SimpleShop "who bought" product sales exports.
  • Return metadata useful for accounting filters, including document types, product types, flags, payment methods, number series, and tags.
  • Use one reusable HTTP client initialized through FastMCP lifespan dependency injection.
  • Redact customer/buyer PII by default, with explicit opt-in for full data.

Tool Surface

simpleshop_test_login
simpleshop_find_documents
simpleshop_download_documents
simpleshop_find_products
simpleshop_get_product_sales
simpleshop_get_metadata

simpleshop_test_login takes no arguments and is the quickest way to confirm your .env credentials work — it calls SimpleShop's test/ endpoint and returns { "ok": true } on success or a structured { "ok": false, "error": ... } otherwise.

Finder tools use a concrete query object with a required mode field:

{
  "query": {
    "mode": "search"
  }
}

or:

{
  "query": {
    "mode": "by_ids",
    "ids": [123]
  }
}

by_ids mode requires IDs and ignores stray search filters so retry calls remain robust when an agent carries over defaults from schema discovery.

See TOOLS.md for full schemas, examples, cursor behavior, and privacy controls. The design rationale is in DESIGN.md.

Privacy Defaults

Normal document and sales responses redact customer/buyer PII by default.

Set include_customer_pii: true only when the caller actually needs names, emails, phone numbers, addresses, company IDs, VAT IDs, custom sales fields, raw document payloads, or raw CSV exports.

Raw fields are guarded:

  • include_raw requires include_customer_pii: true.
  • include_raw_csv requires include_customer_pii: true.
  • simpleshop_get_product_sales supports max_sales_rows, total_rows, returned_rows, and truncated for bounded exports.

Requirements

  • Python >=3.13,<3.14
  • uv
  • Optional: mise for pinned local tool versions

The project currently pins:

  • fastmcp==3.3.0
  • httpx==0.28.1
  • pydantic==2.13.4
  • pydantic-settings==2.14.1

Installation

Using mise:

mise install
mise run sync

Using uv directly:

uv sync --locked

Configuration

Create a local .env from the example or set the variables in your MCP host environment:

cp .env.example .env

Required:

SIMPLESHOP_LOGIN=user@example.com
SIMPLESHOP_API_KEY=replace-with-api-key

Optional:

SIMPLESHOP_BASE_URL=https://api.simpleshop.cz/2.0/
SIMPLESHOP_TIMEOUT_SECONDS=30

Do not commit .env or real API credentials.

Running

The plugin's MCP server config lives inline in .claude-plugin/plugin.json (uses uvx --from ${CLAUDE_PLUGIN_ROOT} + ${user_config.*} env injection). No .mcp.json is committed at the repo root, so workspace-mode Claude Code sessions in this directory do not try to launch the server — run it with one of the commands below instead.

Run the MCP server over stdio:

uv run --locked simpleshop-mcp

With the installed script:

uv run --locked simpleshop-mcp

Run directly from GitHub with uvx:

SIMPLESHOP_LOGIN=user@example.com \
SIMPLESHOP_API_KEY=replace-with-api-key \
uvx --from git+https://github.com/mikz/simpleshop-mcp.git simpleshop-mcp

For local development with FastMCP reload:

mise run mcp

MCP Client Configuration

Example MCP server config:

[mcp_servers.simpleshop]
command = "uv"
args = ["run", "--locked", "simpleshop-mcp"]
cwd = "/path/to/simpleshop-mcp"

If you use mise:

[mcp_servers.simpleshop]
command = "mise"
args = ["run", "mcp"]
cwd = "/path/to/simpleshop-mcp"

Run from GitHub without cloning:

[mcp_servers.simpleshop]
command = "uvx"
args = ["--from", "git+https://github.com/mikz/simpleshop-mcp.git", "simpleshop-mcp"]

Pass credentials through your MCP host environment, not through committed config.

Development

Run tests:

uv run --locked pytest

Run lint:

uv run --locked ruff check .

Check formatting on touched files:

uv run --locked ruff format --check src tests

Live smoke tests are intentionally opt-in because they use real SimpleShop credentials and may expose account data in local logs if run carelessly. See E2E.md.

Repository Layout

src/
  client.py        SimpleShop HTTP client
  models.py        Pydantic models for normalized and raw API data
  normalization.py Document normalization helpers
  server.py        FastMCP server and exposed tools
DESIGN.md          Tool design rationale
TOOLS.md           Tool reference and examples
E2E.md             Live smoke-test guidance
tests/             Offline unit and contract tests

License

MIT. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选