Mmj Palette

io.github.meta-taroPublished by GitHub account meta-tarov0.1.0Updated Oct 24, 2026

Build a MapLibre style from four anchor colours. Self-hosted maps, no API key.

VerifiedSTDIODesktop onlyDeveloper ToolsMedia & Design

Overview

AI-generated overview

A local MCP server that turns four anchor colours into a 24-role MapLibre colour palette or a ready-to-serve style JSON for self-hosted maps.

What you can do
List the 24 map colour roles and what each one changes on the map, and list the base styles that can be used as a starting point. Derive a 24-role palette from anchor colours for land, water, ink and accent, with optional green and per-role overrides. Build a complete style JSON from those anchors on a chosen base style, with a name and an output path. Colours are mixed in Oklab, and the given anchor values are passed through unchanged.
When to use it
Use it when you are self-hosting MapLibre maps and want a custom colour scheme generated from a few brand colours, either as a palette file or as a full style JSON, without an API key.
Requirements
Runs as a local process over stdio, started with pnpm from the repository (pnpm palette:mcp). No API key, environment variables or headers are declared. The README notes the official MCP SDK is not used.
Before you install
Generated output is written to a file or standard output and is meant to be edited by you. Keep the OpenStreetMap attribution and the mmj:generated marker in the output, and do not place generated files into the project's styles directory. The TILES_URL placeholder is left in place on purpose.

Installation

In SourceWeft

  1. Open Mmj Palette in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@mmj-map/palette

導入者が自分の配色を完全に作るための道具。指し値(4〜5 色)から、 24 役割の配色、またはそのまま配れるスタイル JSON を作ります。

ここが吐いたものを styles/ へ置かないこと。 MMJ が配る 6 枚は手書きの作品のままです(D-002)。 この道具は導入者のためのものとして切り出してあります(D-021)。 出力には mmj:generated: true が入り、手書きと見分けが付きます。

使う

bash
# 24 役割の配色(<mmj-map palette-url> にそのまま渡せる)pnpm palette -- --land=#f7f9fb --water=#bfd7e8 --ink=#16202b --accent=#0a5fff
# そのまま配れるスタイルpnpm palette -- --land=#f7f9fb --water=#bfd7e8 --ink=#16202b --accent=#0a5fff \  --style --base=modern-light --name="Acme Maps" --out=acme.json
# 出したあとに確かめるpnpm style:check -- acme.json
引数意味
--land陸・背景の色(必須)
--water水域の色(必須)。陸の系列から独立させる
--ink文字の色(必須)。ラベルの一番濃い側
--accentテーマカラー(必須)。高速道路と駅の縁に乗る
--green公園・森。省くと陸から導く
--set=役割=色役割を手で上書きする。最後に勝つ。何度でも書ける
--style配色ではなくスタイルごと作る
--base土台のスタイル名。既定 modern-light(--style のとき)
--name作るスタイルの名前。既定 Custom
--out書き出し先。無ければ標準出力

何が導かれるか

指し値はそのまま出ます(作り変えません)。

役割どうなるか
background earth station-fill halo--land そのもの
water--water そのもの
label-city--ink そのもの
highway station--accent そのもの
landcover built paved buildings path road-* rail boundary label-station label-neighbourhood地色から文字色へ向かって濃くなる。細いものほど地色に近い
waterway label-water水から文字色へ向かって濃くなる
highway-casingaccent を文字色側へ寄せた色
green--green、無ければ陸から導く

混ぜるのは Oklab(sRGB のまま混ぜると階調が詰まり、色がくすむ)。依存は足していません(式だけ)。

好みで変わるところは式にしていない

明るい土台で道路を白抜きにしたい(地色より明るくする)ことがありますが、 ここでは地色から文字色へ向かって濃くしています。白抜きにしたいときは上書きしてください。

bash
pnpm palette -- ... --set=road-minor=#ffffff --set=road-medium=#ffffff --set=road-major=#ffffff

MCP の口

エージェントから直接作れます。

bash
pnpm palette:mcp

Claude Code への登録(.mcp.json / claude mcp add):

json
{  "mcpServers": {    "mmj-palette": {      "command": "pnpm",      "args": ["palette:mcp"],      "cwd": "<このリポジトリのパス>"    }  }}
道具何をするか
mmj_list_roles24 役割と、それぞれが地図の何を変えるかを返す
mmj_list_bases土台にできるスタイル名を返す
mmj_derive_palette指し値から 24 役割の配色を作る
mmj_build_style指し値からスタイル JSON を作る

SDK は入れていません。MCP の stdio は JSON-RPC 2.0 を改行区切りで流すだけで、 ここで要るのは initialize / tools/list / tools/call の 3 つです。 公式 SDK(@modelcontextprotocol/sdk 1.30.0・MIT)は express / hono / cors / jose / express-rate-limit まで引いてきて 99 パッケージ増えます(実測・2026-09-21)。 HTTP と SSE の輸送のためのもので、stdio 1 本には釣り合いません(baseline §1 / §12)。

代わりに、本物のプロセスを起動して本物の JSON-RPC を流すテストがあります (test/mcp.test.ts)。仕様が動いたらそこが落ちます。

使う側

html
<!-- 配色だけ渡す --><mmj-map tiles="..." style-url="/styles/modern-light.json" palette-url="./acme-palette.json"></mmj-map>
<!-- スタイルごと持つ --><mmj-map tiles="..." style-url="./acme.json"></mmj-map>

スタイルごと作った場合、metadata["mmj:anchors"].accent を部品が読むので、 accent 属性を書かなくても目印・まとまり・自前 POI の色が揃います。

出したものの扱い

  • あなたのものです。手で直して構いません(そのための形にしてあります)
  • __TILES_URL__ は残ります。焼き込むと配信先を変えられなくなるため
  • © OpenStreetMap contributors の帰属表示は残ります。消して配らないでください(ODbL)
  • mmj:generated: true が入ります。外さないでください(手書きの作品と混ざります)

Source: tools/palette/README.md at commit e637bd1

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.0LatestOct 13, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts