Package Exports
- @devlaws/mcp-server
- @devlaws/mcp-server/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@devlaws/mcp-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@devlaws/mcp-server
Connect your AI coding agents to 110+ engineering laws and your personal enforcement protocol via the Model Context Protocol.
🔒 Security & IP Protection (Closed-Source Safety)
DevLaws is a proprietary, closed-source platform. The following safeguards are established in this repository to protect your intellectual property and prevent the accidental exposure of private user keys or system configurations:
Git Exclusions (
.gitignore): The root-level.gitignoreexplicitly excludes the interactivetest-client.jsscript, environment variables (.env,*.env), and build folders from version control. This prevents live credentials used in development from leaking to public hosts.npm Whitelisting (
.npmignore): We use an.npmignorewhitelist that explicitly permits only non-sensitive distribution assets (index.js,package.json,README.md). Internal test runners, environment settings, and database endpoints are kept strictly local.Runtime Configuration: No credentials, tokens, or URL formats are hardcoded into the source. Everything is injected safely at runtime through environment variables:
DEVLAWS_EMAIL: The user's account email address.DEVLAWS_API_KEY: The user's personal api key generated on the Integrations dashboard.DEVLAWS_API_URL: (Optional) Overrides the backend host target (e.g.http://localhost:3000for offline testing).
Claude Desktop (Zero Install / Recommended)
Add to your local configuration (~/.config/Claude/claude_desktop_config.json):
{
"mcpServers": {
"devlaws": {
"command": "npx",
"args": ["-y", "@devlaws/mcp-server"],
"env": {
"DEVLAWS_EMAIL": "you@example.com",
"DEVLAWS_API_KEY": "dlk_your_api_key_here",
"DEVLAWS_API_URL": "https://api.devlaws.xyz"
}
}
}
}OpenAI Codex CLI
To register your remote MCP server securely in the Codex CLI using npx:
codex mcp add devlaws \
--env DEVLAWS_EMAIL="you@example.com" \
--env DEVLAWS_API_KEY="dlk_..." \
-- npx -y @devlaws/mcp-serverCursor (Zero Install)
- Open Settings → Features → MCP
- Click + Add New MCP Server
- Configure:
- Name:
devlaws - Type:
command - Command:
npx -y @devlaws/mcp-server
- Name:
- Set environment variables:
DEVLAWS_EMAIL,DEVLAWS_API_KEY,DEVLAWS_API_URL.
Available Tools (10)
| Tool | Description | Auth Required |
|---|---|---|
get_laws |
Fetch all 110+ engineering laws | No |
search_laws |
Search laws by keyword | No |
get_law_detail |
Full law details by slug | No |
get_my_profile |
Your DevLaws user profile | Yes |
get_protocol |
Your enforced laws (Active Protocol) | Yes |
get_bookmarks |
Your saved/bookmarked laws | Yes |
add_to_protocol |
Start enforcing a law | Yes |
remove_from_protocol |
Stop enforcing a law | Yes |
add_bookmark |
Save a law for later | Yes |
remove_bookmark |
Remove a saved law | Yes |
Local Development & Testing
Run the test client
Verify tool schemas and response formats locally using the interactive sandbox:
export DEVLAWS_API_URL=http://localhost:3000
export DEVLAWS_EMAIL="you@example.com"
export DEVLAWS_API_KEY="dlk_..."
node test-client.jsUse the official MCP Inspector
Launch a web-based testing utility:
npx -y @modelcontextprotocol/inspector node index.jsPublishing to npm (Optional)
Scoped npm packages are published securely and only deploy the whitelisted distribution assets:
# Login to npm
npm login
# Publish package
npm publish --access publicLicense
MIT — DevLaws