MCPatterns is an MCP server that stores and retrieves personalized coding patterns from a local JSONL file. It connects Large Language Model clients directly to a developer's structured coding preferences, conventions, and reusable code examples. Designed for software developers and AI coding agents, it serves as a persistent memory layer across coding sessions. By saving patterns categorized by name, technology, description, and use cases, MCPatterns enables AI models to adopt specific architectural styles and project conventions. Stored data is maintained locally using newline-delimited JSON with atomic file updates to ensure data consistency. Rather than relying on generic LLM coding suggestions, developers can use this server to search across their pattern library, fetch concrete language-specific implementations, and inject personal coding standards directly into active AI generation and refactoring workflows.
Category: Developer Tools & Code Intelligence
Tags: coding, jsonl, knowledge, patterns, snippets
bash git clone https://github.com/nicholasrubright/mcpatterns.git cd mcpatterns pnpm install pnpm run build 3. Alternatively, run the server using npx. 4. To configure Claude Desktop, add MCPatterns to your claude_desktop_config.json file: json { "mcpServers": { "mcpatterns": { "command": "npx", "args": ["-y", "@mcpatterns/server"] } } } 5. Optionally, set a custom file destination by supplying the PATTERNS_FILE_PATH environment variable in the server configuration.Part of MCP Servers
MCPatterns is an open-source Model Context Protocol server that stores and retrieves personalized coding patterns from a local JSONL file. It functions as a persistent memory system that enables AI coding assistants to follow an individual developer's preferred styles, libraries, and coding patterns.
You can run MCPatterns using npx by specifying the package @mcpatterns/server in your MCP client configuration, such as Claude Desktop or VS Code. Alternatively, you can clone the repository from GitHub, install dependencies with pnpm, build the project, and run it locally.
MCPatterns exposes tools including create_patterns, add_code_examples, delete_patterns, delete_code_examples, read_patterns, search_patterns, and open_patterns. These tools allow client applications to create, query, inspect, and remove code patterns and language-specific code snippets.
By default, patterns are stored in a patterns.json file in JSONL format inside the server directory. You can specify a custom storage location using the PATTERNS_FILE_PATH environment variable.
Yes, MCPatterns is an open-source project released under the MIT license, available on GitHub.