MCP server that provides design-pattern selection expertise to AI coding agents
npx @getmcp/cli add io.github.olk/design-pattern-mcpRequires Docker Engine. Community-contributed server. Review source before installing.
DESIGN_PATTERN_GENERATOR_API_KEYAPI key for the generator LLM (LiteLLM provider).
DESIGN_PATTERN_EMBEDDER_BASE_URLRequired: the dense retrieval leg embeds the 438-record catalogue during startup warmup and the server refuses to start when the endpoint is unreachable. TEI embeddings endpoint: on the Docker host use http://host.docker.internal:8080 (add --add-host=host.docker.internal:host-gateway on Linux); on a shared Docker network use http://design-pattern-tei-embed:8080.
DESIGN_PATTERN_RERANKER_BASE_URLRequired: retrieval runs a mandatory TEI cross-encoder rerank whenever the fused pool has more than one candidate. On the Docker host use http://host.docker.internal:8080; on a shared Docker network use http://design-pattern-tei-rerank:8080.
Config file: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"io.github.olk/design-pattern-mcp": {
"command": "docker",
"args": [
"host.docker.internal:host-gateway",
"run",
"-i",
"--rm",
"-e",
"DESIGN_PATTERN_GENERATOR_API_KEY",
"-e",
"DESIGN_PATTERN_GENERATOR_PROVIDER",
"-e",
"DESIGN_PATTERN_GENERATOR_MODEL",
"-e",
"DESIGN_PATTERN_GENERATOR_BASE_URL",
"-e",
"DESIGN_PATTERN_PATTERN_DIRECTORY",
"-e",
"DESIGN_PATTERN_EMBEDDER_BASE_URL",
"-e",
"DESIGN_PATTERN_EMBEDDER_API_KEY",
"-e",
"DESIGN_PATTERN_RERANKER_BASE_URL",
"docker.io/olkowa/design-pattern-mcp:1.0.1",
"--transport",
"stdio"
],
"env": {
"DESIGN_PATTERN_GENERATOR_API_KEY": "",
"DESIGN_PATTERN_GENERATOR_PROVIDER": "openai",
"DESIGN_PATTERN_GENERATOR_MODEL": "gpt-4o-mini",
"DESIGN_PATTERN_GENERATOR_BASE_URL": "https://api.openai.com/v1",
"DESIGN_PATTERN_PATTERN_DIRECTORY": "/app/pattern",
"DESIGN_PATTERN_EMBEDDER_BASE_URL": "",
"DESIGN_PATTERN_EMBEDDER_API_KEY": "not-needed",
"DESIGN_PATTERN_RERANKER_BASE_URL": ""
}
}
}
}