premanmcp
v0.3.5
Published
Turn APIs into agent-callable MCP tools with auth, testing, and audit logs
Maintainers
Readme
PreMan MCP
Turn your APIs into MCP tools that coding agents can discover, call, test, and audit.
PreMan is agent-first API infrastructure. It lets backend teams expose endpoints to AI coding agents through MCP, add an auth layer around those tools, and see exactly which agent called what.
Install
npm exec -y premanmcp@latest -- installLocal development form:
node bin/cli.js installFirst-time users are prompted for email, OTP, and password directly in the terminal. PreMan creates or connects the account, generates an API key, saves it to ~/.preman/credentials.json, then writes a preman MCP server into ~/.cursor/mcp.json:
{
"mcpServers": {
"preman": {
"command": "npm",
"args": ["exec", "-y", "--package", "premanmcp@latest", "--", "premanmcp"],
"env": {
"PREMAN_BACKEND": "https://api.preman.live",
"PREMAN_FRONTEND": "https://app.preman.live"
}
}
}
}Restart Cursor or toggle the MCP server off/on after install. The MCP server loads the saved key automatically.
You can also create or connect your account before install:
npm exec -y premanmcp@latest -- loginYou can also pass the key directly:
npm exec -y premanmcp@latest -- install --api-key pm_live_xxxFor project-local installation:
npm exec -y premanmcp@latest -- install --projectWhat It Does
- Converts API endpoints into agent-callable MCP tools.
- Creates/connects a PreMan account from the terminal or IDE agent.
- Lets agents test real backend endpoints from the IDE.
- Syncs endpoint inventory across backend and frontend workflows.
- Adds API-key auth for PreMan MCP access.
- Supports hosted MCPs with consumer tokens for customer-facing agent access.
- Records per-call observability so teams can audit which agent did what.
Common Agent Commands
After installing, ask your coding agent:
Use the PreMan MCP to scan this codebase, deploy a hosted MCP, and give me the install command.Use PreMan to sign me up, verify my email OTP, create my API key, then scan this project.Use PreMan to test POST /auth/login.Convert these endpoints into an MCP.Show me the audit log for this hosted MCP.Cursor
The installer targets Cursor by default:
npm exec -y premanmcp@latest -- installManual Cursor config:
{
"mcpServers": {
"preman": {
"command": "npm",
"args": ["exec", "-y", "--package", "premanmcp@latest", "--", "premanmcp"]
}
}
}Claude Code
claude mcp add preman -- npm exec -y --package premanmcp@latest -- premanmcpCLI
npm exec -y premanmcp@latest -- # Start the MCP server
npm exec -y premanmcp@latest -- login # Create/login and generate a PreMan API key
npm exec -y premanmcp@latest -- install # Install Cursor MCP config
npm exec -y premanmcp@latest -- install --project # Write .cursor/mcp.json in current repo
npm exec -y premanmcp@latest -- install --print # Print config without writing
npm exec -y premanmcp@latest -- install --api-key KEY # Install with your PreMan API keyOptions:
--api-key <key>: PreMan API key.--backend <url>: PreMan backend URL. Defaults tohttps://api.preman.live.--frontend <url>: PreMan frontend URL. Defaults tohttps://app.preman.live.--name <name>: MCP server name. Defaults topreman.--project: Write.cursor/mcp.jsonin the current project.--skip-login: Install config without interactive terminal auth.--print: Print the generated MCP config without writing it.
Environment Variables
PREMAN_API_KEY: PreMan API key.PREMAN_BACKEND: PreMan backend URL.PREMAN_FRONTEND: PreMan frontend URL.
If PREMAN_API_KEY is omitted, the MCP server loads credentials from ~/.preman/credentials.json.
Product
PreMan helps teams make APIs usable by agents without giving up control. Developers can turn endpoints into MCP servers, hand customers an install snippet or hosted MCP URL, and audit every tool call through PreMan.
Dashboard: https://app.preman.live
License
MIT
