This is the fastest path from zero to a working local MCP policy layer.
By the end of this page you should have:
- a local
secure-mcp.yml - a validated policy
- a working wrapper command
- a clear understanding of where to plug SecureMCP-Lite into your AI client
npx securemcp-lite initThis creates a starter secure-mcp.yml in the current directory.
npm install --save-dev securemcp-lite
npx securemcp-lite init --config ./secure-mcp.ymlUse the project-local install if you want:
- reproducible setup for a team
- a version-pinned dependency in
package.json - a repo-level MCP command that different clients can share
For a first rollout, use a read-only policy shape:
version: 1
rateLimit:
requestsPerMinute: 60
logging:
level: info
includeArguments: false
tools:
allow:
- read_file
- list_dir
- search_files
parameterRules:
read_file:
path:
allow:
- '^/absolute/path/to/project(?:/.*)?$'
deny:
- '\.\.'This is a good first step because it gives an agent useful repository visibility without silent write or shell access.
npx securemcp-lite validate-config --config ./secure-mcp.ymlFor CI or stricter rollout gates:
npx securemcp-lite validate-config --config ./secure-mcp.yml --strictUse --strict if you want risky-but-valid configs to fail early instead of slipping into daily use.
Example with the MCP filesystem server:
npx securemcp-lite start \
--target "npx -y @modelcontextprotocol/server-filesystem ." \
--target-cwd /absolute/path/to/project \
--config /absolute/path/to/project/secure-mcp.ymlWhat this does:
- SecureMCP-Lite becomes the MCP command your client launches
- SecureMCP-Lite spawns the real target server behind the scenes
- every
tools/callrequest is evaluated locally before it reaches the target
Do not configure your AI client to launch the target MCP server directly.
Use this pattern instead:
AI client -> securemcp-lite start -> target MCP server
That is the core product model.
What success should look like:
- allowed read-only tool calls are forwarded
- disallowed tools are blocked locally
- path traversal attempts are blocked locally
- JSON-RPC logs stay on
stdout - human-readable logs stay on
stderr
npm install
npm run build
npm run demo:blocked
npm run demo:allowed
npm run demo:sessionThese demos are bundled with the repository and are intended to prove the product behavior before you wire a real third-party MCP server into your workflow.
Next pages to read: