API Reference
MCP tools and resources exposed by the Janee server.
MCP Tools
When you run janee serve, these tools become available to your MCP client:
janee_execute
Make an HTTP request through Janee's proxy. Credentials are injected server-side — the agent never sees them.
{
"capability": "stripe-readonly",
"method": "GET",
"path": "/v1/balance",
"reason": "User asked for their Stripe balance"
}
Parameters
capability(string, required) — Name of the capability to usemethod(string, required) — HTTP method (GET, POST, PUT, DELETE, PATCH)path(string, required) — Request path (appended to service base URL)body(object, optional) — Request body (for POST/PUT/PATCH)headers(object, optional) — Additional request headersreason(string, optional) — Why the agent is making this request (logged to audit trail)
Returns
The HTTP response body from the upstream API.
janee_exec
Execute a CLI command with injected credentials. The agent never sees the credential values.
{
"capability": "twitter",
"command": ["bird", "post", "Hello world!"],
"reason": "User asked to post a tweet"
}
Parameters
capability(string, required) — Name of the exec-mode capabilitycommand(string[], required) — Command and arguments to executereason(string, optional) — Why the agent is running this commandcwd(string, optional) — Working directory for command execution
Returns
Object with stdout, stderr, and exitCode.
Git Integration
When the capability includes a GIT_ASKPASS credential, Janee automatically configures Git authentication. The agent can run git push, git pull, etc. without seeing the underlying token.
janee_list_capabilities
List available capabilities and their configuration.
// No parameters needed
janee_list_capabilities({})
Returns
Array of capabilities with their names, types (proxy/exec/app), TTLs, and rules.
Audit Log Format
Every tool call is logged to ~/.janee/audit.log as newline-delimited JSON:
{
"timestamp": "2025-01-15T10:30:00Z",
"tool": "janee_execute",
"capability": "stripe-readonly",
"method": "GET",
"path": "/v1/balance",
"status": 200,
"reason": "User asked for account balance",
"duration_ms": 245
}
Config File
Janee configuration lives at ~/.janee/config.yaml:
services:
stripe:
base_url: https://api.stripe.com
auth_header: Authorization
auth_prefix: "Bearer "
capabilities:
stripe-readonly:
service: stripe
ttl: 1h
autoApprove: true
rules:
- allow: GET /v1/*
- deny: "*"