Skip to main content

ContextLayer MCP

The invisible intelligence layer for AI coding tools.

Generalist AI models write chatty, bloated code because they lack situational workspace awareness. ContextLayer intercepts your prompt, silently scans your local working directory for languages and paradigms, and wraps the prompt in strict professional expert schemas. This forces the AI to skip the tutorial fluff and output precise, deterministic, production-grade results. Quick Start

ContextLayer runs entirely locally via the Model Context Protocol (MCP). It takes 10 seconds to install and works with Cursor, Windsurf, Claude Desktop, and any MCP-compatible client.

  1. Install uv (The only dependency)

We recommend using uv because it automatically downloads and runs ContextLayer in the background without you needing to manage Python virtual environments.

For Mac and Linux, run this in your terminal: curl -LsSf https://astral.sh/uv/install.sh | sh

For Windows (PowerShell), run this: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Note: After installing, restart your terminal so the uvx command is recognized. 2. Connect to your AI Client

For macOS (Cursor and Claude Desktop):

Open Cursor.

Press Cmd + Shift + P to open the Command Palette.

Type "View: Open MCP settings" and select it.

Paste this exact configuration into the file:
{
"mcpServers": {
"contextlayer": {
"command": "uvx",
"args": ["--from", "contextlayer-mcp-server", "contextlayer"]
}
}
}

Save the file and restart Cursor.

For Claude Desktop on macOS:

Open the config file: ~/Library/Application Support/Claude/claude_desktop_config.json (You may need to create it if it doesn't exist).

Paste the exact same configuration block from above.

Quit Claude completely (Cmd+Q) and reopen it.

For Windows (Cursor and Claude Desktop):

Open Cursor.

Press Ctrl + Shift + P to open the Command Palette.

Type "View: Open MCP settings" and select it.

Paste the same configuration block:
{
"mcpServers": {
"contextlayer": {
"command": "uvx",
"args": ["--from", "contextlayer-mcp-server", "contextlayer"]
}
}
}

Save and restart Cursor.

For Claude Desktop on Windows:

Press Win + R, type %APPDATA%\Claude, and hit Enter.

Open claude_desktop_config.json in Notepad (or create it if it doesn't exist).

Paste the exact same configuration block from above.

Right-click the Claude icon in your system tray and select Quit. Reopen it.

For Linux (Cursor / Windsurf and Claude Desktop):

Open the Command Palette (Ctrl + Shift + P).

Type "View: Open MCP settings".

Paste the configuration block from above and save.
For Claude Desktop on Linux:

Open the config file: ~/.config/Claude/claude_desktop_config.json

Paste the configuration block and save.

Kill the Claude process completely (e.g., killall claude) and reopen it.

How to use it

Once connected, you can just talk to the AI normally. But to force it to use the tool, you can be explicit:

"Use the analyze_and_wrap_prompt tool on my current directory, then fix the PDF generation bug in this repo."

What happens under the hood:

The AI asks ContextLayer to scan your directory.

ContextLayer detects you are using Python, async/await, and pydantic.

It injects strict directives: "Do NOT explain basic concepts. Output code first. Enforce strict type safety."

The AI responds with immediate, production-grade code.

Troubleshooting

uvx command not found? Restart your terminal. If it still fails, ensure ~/.local/bin (Mac/Linux) or %USERPROFILE%.local\bin (Windows) is in your system PATH.

Does this send my code to the cloud? No. ContextLayer runs 100% locally on your machine. It only reads file names and snippets to detect your stack. It never uploads your codebase.

Does it work with ChatGPT Desktop?\n ChatGPT's desktop app does not natively support MCP servers yet. Use Cursor, Windsurf, or Claude Desktop.

Built for developers who are tired of AI explaining what a variable is.

Multi-Domain Support

ContextLayer now automatically detects your workspace and routes to the correct expert persona:

  • Software: Scans for languages/frameworks (Python, React, etc.) and enforces strict architectural paradigms.
  • Medicine: Detects clinical protocols, FHIR/EHR schemas, and patient data. Injects evidence-based directives and mandatory medical disclaimers.
  • Legal: Detects contracts, NDAs, and policies. Injects strict statutory interpretation, risk mitigation directives, and legal disclaimers.

You can also force a domain by passing domain="medicine" or domain="legal" in your prompt to the AI.

Metadata

Release files for contextlayer-mcp-server 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for contextlayer-mcp-server 0.2.0
File Size Uploaded
contextlayer_mcp_server-0.2.0.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for contextlayer-mcp-server 0.2.0
File Interpreter ABI Platform
contextlayer_mcp_server-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.3 kB

Release files / contextlayer_mcp_server-0.2.0.tar.gz

Download URL contextlayer_mcp_server-0.2.0.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b095df5898ac84b50f02ba6129c4831699006579975764d04f1363ee722dd8ef
BLAKE2b-256 checksum
How to use checksums
9fe135e25957c86b2f53a55e4fd801dcc9ebecc9a2dcb0c94c1cacc7f8462f30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / contextlayer_mcp_server-0.2.0-py3-none-any.whl

Download URL contextlayer_mcp_server-0.2.0-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf378ceea393b5562fd6c3d0c74f17ea1928ba68b43d944465e1d47ab67700c9
BLAKE2b-256 checksum
How to use checksums
52dee3b1bb0264e1ed872c796d947f3773086bcd451f296a32d1fc748a3e0a44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page