MCP Server
Nenjo's built-in MCP server -- Streamable HTTP transport, JSON-RPC protocol, and complete tool reference.
MCP Server
Nenjo includes a built-in Model Context Protocol server that exposes platform resources as tools. Any MCP-compatible client can connect and interact with tickets, projects, agents, pipelines, and more.
Connection Details
| Property | Value |
|---|---|
| Endpoint | POST /mcp |
| Transport | Streamable HTTP |
| Protocol | JSON-RPC 2.0 |
| Auth | API key (Authorization: Bearer or X-API-Key) |
| Protocol Version | 2025-03-26 |
Authentication
The MCP endpoint requires an API key. Pass it via either header:
# Authorization header
curl -X POST -H "Authorization: Bearer nen_<key>" ...
# X-API-Key header
curl -X POST -H "X-API-Key: nen_<key>" ...The key's scopes determine which tools are visible and callable. See API Keys for creating keys.
Protocol Flow
1. Initialize
curl -X POST \
-H "Authorization: Bearer nen_<key>" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {}
}' \
https://your-instance/mcpResponse:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2025-03-26",
"capabilities": {
"tools": {}
},
"serverInfo": {
"name": "nenjo",
"version": "0.1.0"
}
}
}2. Send Initialized Notification
{
"jsonrpc": "2.0",
"method": "notifications/initialized",
"params": {}
}This is a notification (no id field). The server responds with 204 No Content.
3. List Tools
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list",
"params": {}
}Returns all tools the key's scopes allow. Each tool includes its name, description, input schema, and required scope.
4. Call a Tool
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "tickets_list",
"arguments": {
"project_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "open",
"limit": 10
}
}
}Response:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{
"type": "text",
"text": "[{\"id\": \"...\", \"title\": \"...\", ...}]"
}
]
}
}Tool results are returned as text content containing pretty-printed JSON.
Supported Methods
| Method | Description |
|---|---|
initialize | Establish connection and exchange capabilities |
notifications/initialized | Client acknowledgment (no response) |
tools/list | List available tools (filtered by key scopes) |
tools/call | Execute a tool |
Tool Reference
Tools are organized by resource group. Each tool has a required scope.
Tickets
| Tool | Scope | Description |
|---|---|---|
tickets_list | tickets:read | List tickets with optional filters (project_id, status, priority, type, tags, limit, offset) |
tickets_get | tickets:read | Get a ticket by ID with full details |
tickets_create | tickets:write | Create a new ticket |
tickets_update | tickets:write | Update a ticket (partial update) |
tickets_delete | tickets:write | Delete a ticket by ID |
tickets_list parameters:
| Parameter | Type | Description |
|---|---|---|
project_id | uuid | Filter by project |
status | string | open, ready, backlog, assigned, in_progress, done, failed |
priority | string | low, medium, high, critical |
type | string | bug, feature, task, improvement |
tags | string | Comma-separated tags |
limit | integer | Max results (default 50, max 200) |
offset | integer | Pagination offset (default 0) |
tickets_create required parameters: project_id, title
tickets_create optional parameters: description, status (open, ready, backlog), priority, type, tags (string array), complexity (1-5), acceptance_criteria
Projects
| Tool | Scope | Description |
|---|---|---|
projects_list | projects:read | List all projects accessible to the current user |
projects_get | projects:read | Get a project by ID |
projects_create | projects:write | Create a new project |
projects_update | projects:write | Update a project (partial update) |
projects_create required parameters: name
projects_create optional parameters: description
projects_update required parameters: id
projects_update optional parameters: name, description, settings (object)
Documents
| Tool | Scope | Description |
|---|---|---|
documents_list | documents:read | List documents in a project |
documents_read | documents:read | Read document content (not yet supported via MCP) |
documents_delete | documents:write | Delete a document from a project |
documents_list required parameters: project_id
documents_delete required parameters: project_id, document_id
Agents and Roles
| Tool | Scope | Description |
|---|---|---|
agents_list | agents:read | List agents, optionally filtered by project |
agents_get | agents:read | Get an agent by ID |
agents_create | agents:write | Create a new agent |
agents_update | agents:write | Update an agent (partial update) |
agents_delete | agents:write | Delete an agent by ID |
roles_list | agents:read | List all agent roles accessible to the current user |
roles_get | agents:read | Get an agent role by ID |
agents_create required parameters: name, model
agents_create optional parameters: description, model_provider (openai, anthropic, google; default openai), temperature (0-2, default 0.7), tags (string array)
Pipelines
| Tool | Scope | Description |
|---|---|---|
pipelines_list | pipelines:read | List all pipelines accessible to the current user |
pipelines_get | pipelines:read | Get a pipeline by ID with all steps and edges |
pipelines_create | pipelines:write | Create a new pipeline |
pipelines_update | pipelines:write | Update a pipeline (partial update) |
pipelines_delete | pipelines:write | Delete a pipeline by ID |
pipeline_steps_create | pipelines:write | Add a step to a pipeline |
pipeline_edges_create | pipelines:write | Add an edge between two pipeline steps |
pipelines_create required parameters: name, trigger
pipelines_create optional parameters: description, is_active (default true), max_retries (default 3), metadata (object)
Trigger values: ticket.ready, chat.message, cron
pipeline_steps_create required parameters: pipeline_id, name, step_type
Step types: agent, gate, terminal, council, lambda
pipeline_steps_create optional parameters: agent_id, council_id, role_id, lambda_id, config (object), order_index (integer), position_x, position_y
pipeline_edges_create required parameters: pipeline_id, source_step_id, target_step_id
Edge conditions: always (default), on_pass, on_fail, on_review_pass, on_review_fail
Executions
| Tool | Scope | Description |
|---|---|---|
executions_list | executions:read | List execution runs with optional filters |
executions_get | executions:read | Get an execution run by ID with full details |
executions_list parameters: project_id (uuid), status (string), limit (default 50, max 200), offset (default 0)
Councils
| Tool | Scope | Description |
|---|---|---|
councils_list | councils:read | List all councils accessible to the current user |
councils_get | councils:read | Get a council by ID with leader and member details |
councils_create | councils:write | Create a new council with leader and members |
councils_update | councils:write | Update a council (partial update) |
councils_delete | councils:write | Delete a council by ID |
councils_create required parameters: name, leader_role_assignment_id, members (array)
councils_create optional parameters: description, delegation_strategy (round_robin, priority, random; default round_robin), config (object)
Member objects: role_assignment_id (required), priority (integer, default 0)
Chat
| Tool | Scope | Description |
|---|---|---|
chat_sessions_list | chat:read | List chat sessions for a project and role |
chat_messages_list | chat:read | List chat messages with optional pagination |
chat_sessions_list required parameters: project_id, role_id
chat_sessions_list optional parameters: include_archived (boolean, default false)
chat_messages_list required parameters: project_id, role_id, session_id
chat_messages_list optional parameters: limit (default 50, max 200), before (ISO-8601 timestamp)
Graph
| Tool | Scope | Description |
|---|---|---|
graph_dependencies | graph:read | Get the dependency graph for a project |
graph_execution_order | graph:read | Get topologically sorted execution order for a project |
Both tools require: project_id
Error Handling
If a tool call fails due to insufficient scopes:
{
"jsonrpc": "2.0",
"id": 3,
"error": {
"code": -32001,
"message": "Scope 'tickets:write' required for tool 'tickets_create'"
}
}If a tool is not found:
{
"jsonrpc": "2.0",
"id": 3,
"error": {
"code": -32601,
"message": "Tool not found: nonexistent_tool"
}
}