
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
laviya-mcp-server
Advanced tools
Laviya AI Orchestration Developer Runtime is implemented as a single machine-level Node.js + TypeScript MCP server package (laviya-mcp-server).
Each repository provides only a lightweight local config (.laviya/project.json or .laviya.json) plus optional prompt/rule overrides.
This is the recommended production model:
Global runtime is better than copying orchestration files into every repo because it provides:
Copy-per-repo designs create drift, slow upgrades, repeated fixes, and inconsistent runtime behavior.
Global shared runtime responsibilities:
includeTokenUsage).Project-local responsibilities:
projectId, optional projectName.agentProfile.pollMode compatibility metadata (long-poll currently behaves as host-driven pull).runPinning.Machine/global install layout:
Windows
%APPDATA%\npm\node_modules\@laviya\mcp-server\
%USERPROFILE%\.laviya\config\global.json
macOS/Linux
~/.npm-global/lib/node_modules/laviya-mcp-server/
~/.laviya/config/global.json
Runtime package structure:
mcp/
src/
client/
config/
orchestration/
tools/
prompts/
schemas/
utils/
examples/
cursor/
claude/
vscode/
Per-project local structure:
<repo>/
.laviya/
project.json
prompts/
override.system.md
.cursor/
rules/
laviya-project.mdc
.vscode/
settings.json
Global config path:
~/.laviya/config/global.json (or %USERPROFILE%\.laviya\config\global.json)
Global config example:
{
"baseUrl": "https://api.laviya.app",
"defaultPollIntervalSeconds": 15,
"defaultLeaseRefreshSeconds": 30,
"requestTimeoutSeconds": 30,
"logLevel": "info",
"retry": {
"maxAttempts": 3,
"baseDelayMs": 500,
"maxDelayMs": 5000,
"jitter": true,
"retryOnHttpStatus": [408, 409, 425, 429, 500, 502, 503, 504]
},
"completion": {
"includeTokenUsage": true
}
}
Recommended TypeScript shape:
interface GlobalConfig {
baseUrl: string;
defaultPollIntervalSeconds: number;
defaultLeaseRefreshSeconds: number;
requestTimeoutSeconds: number;
logLevel: "debug" | "info" | "warn" | "error";
retry: {
maxAttempts: number;
baseDelayMs: number;
maxDelayMs: number;
jitter: boolean;
retryOnHttpStatus: number[];
};
completion?: {
includeTokenUsage?: boolean;
};
}
Schema file: src/schemas/globalConfig.schema.json
Project config paths:
.laviya/project.json.laviya.jsonMinimal example:
{
"projectId": 1204,
"agentProfile": "backend-implementer",
"pollMode": "pull"
}
Advanced example:
{
"projectId": 1204,
"projectName": "Laviya Backend",
"agentProfile": "platform-orchestrator",
"pollMode": "long-poll",
"runPinning": {
"enabled": true,
"runId": 987654
},
"promptOverridePath": ".laviya/prompts/override.system.md",
"completion": {
"requireExecutionSummary": true,
"autoFailOnMissingSummary": true,
"includeLogs": true,
"includeTokenUsage": true
},
"codingRules": {
"cursorRulePath": ".cursor/rules/laviya-project.mdc",
"vscodeSettingsPath": ".vscode/settings.json",
"codingConventionsPath": "docs/coding-conventions.md"
}
}
Recommended TypeScript shape:
interface ProjectConfig {
projectId: number;
projectName?: string;
agentProfile: string;
pollMode?: "pull" | "long-poll";
runPinning?: {
enabled: boolean;
runId?: number;
};
promptOverridePath?: string;
completion?: {
requireExecutionSummary?: boolean;
autoFailOnMissingSummary?: boolean;
includeLogs?: boolean;
includeTokenUsage?: boolean;
};
codingRules?: {
cursorRulePath?: string;
vscodeSettingsPath?: string;
codingConventionsPath?: string;
};
}
Schema file: src/schemas/projectConfig.schema.json
Required:
LAVIYA_API_KEYOptional:
LAVIYA_BASE_URLLAVIYA_AGENT_UIDLAVIYA_LOG_LEVELLAVIYA_GLOBAL_CONFIG_PATH (readable path override for global config file)Examples:
export LAVIYA_API_KEY="***"
export LAVIYA_BASE_URL="https://api.laviya.app"
export LAVIYA_AGENT_UID="optional-agent-uid"
export LAVIYA_LOG_LEVEL="info"
LAVIYA_AGENT_UID is used as the initial agent context. Discovered AIAgentUID values are isolated by
run so parallel executions cannot overwrite each other's agent context.
Secrets must remain in environment variables, not repo config files.
The runtime sends apiKey and, when available, agentUID only as query parameters expected by the
Laviya AI orchestration endpoints. It does not send Authorization, X-API-Key, or X-Agent-UID
headers. Request redirects are refused so query credentials cannot be forwarded to another origin.
Production base URLs must use HTTPS; HTTP is accepted only for loopback development addresses.
Legacy global auth objects are accepted temporarily for migration, but ignored with a warning.
Merge order in runtime:
baseUrl and logLevel.completion defaults).completion settings.Runtime responsibilities implemented in code:
apiKey, agentUID) and idempotency.HasFailed: true to MCP isError: true.structuredContent.ExecutionPolicy per run/task and enforce read-only completion evidence before API submission.laviya_diagnostics.MCP tools exposed:
laviya_helplaviya_feed_tasklaviya_get_local_work_statuslaviya_cancel_local_worklaviya_add_task_commentlaviya_get_my_worklaviya_start_executionlaviya_complete_executionlaviya_report_token_usagelaviya_diagnosticsCall laviya_help without arguments to receive every tool's purpose and a valid
example call. Pass toolName to return help for a single tool.
MCP prompt/resource exposed:
laviya_orchestrator_system_promptlaviya://prompts/orchestrator.system.mdTool contracts:
laviya_feed_task
{ payload: { taskID } } (strict: no extra payload keys)HasFailed, Messages, Data) with feed/run metadata.laviya_get_local_work_status
runIdHasFailed, Messages, Data).isError result.laviya_cancel_local_work
{ payload: { runID, reason? } }HasFailed, Messages, Data) with final status snapshot.isError result.laviya_add_task_comment
{ payload: { taskID, description } }HasFailed, Messages, Data) with created task comment metadata.laviya_get_my_work
runId?, projectId?, includeFileBytes?, previousLogsLimit?, output?ExecutionPolicy, and supports lite payload defaults.HasFailed, Messages, Data) as text; minified by default with optional field omission.isError result.laviya_start_execution
runId, taskId, executionId?laviya_complete_execution
{ payload: { taskID, aiAgentFlowRunID, aiAgentTaskExecutionID, finalOutput, requestKey?, agentType?, agentVersion? } } (no HTTP Data envelope).finalOutput contains exactly one contract 1.0 result matching the work item's ExpectedOutputType; <LAVIYA_RESULT>...</LAVIYA_RESULT> is the preferred format.executionSummary, isFailed, logs, tasks, wikis, technicalAnalysis, lessons, and tokenUsages are rejected.laviya_report_token_usage
{ payload: <token usage payload> } (no HTTP Data envelope).measurement as exact, estimated, or unavailable; exact data requires measurementSource, estimated data requires estimationModelVersion, and unavailable data contains no token/cost values.laviya_diagnostics
Base prompt location:
src/prompts/orchestrator.system.md
Prompt design principles:
PreviousWorks and orchestration context fields.ExecutionPolicy as a binding capability boundary.analysis and review modes.executionEvidence for enforced read-only steps.AgentWorkLanguageIsoCode / AgentWorkLanguageCultureCode) for user-facing outputs.agentReportedStatus as an agent claim; Laviya calculates final status and routing server-side.Project override mechanism:
promptOverridePath.## Project Override) without forking core prompt.Allowed project-local customization:
projectIdagentProfilepollModerunPinningpromptOverridePathNot allowed in project-local config:
Recommended package names:
laviya-mcp-serverlaviya-mcp-serverCommands:
npm install -g laviya-mcp-server
npm update -g laviya-mcp-server
npm run dev
npm run build && npm start
VS Code integration:
examples/vscode/mcp.json as MCP server definition.Codex integration:
codex mcp add and run laviya-mcp-server via npx.../docs/InstallationAndUsage.md (Client-Specific MCP Setup > Codex CLI).Antigravity integration:
mcp.json user config).../docs/InstallationAndUsage.md (Client-Specific MCP Setup > Antigravity).Cursor integration:
.cursor/rules/laviya-project.mdc).Claude Code integration:
examples/claude/SKILL.md and point tooling to the same MCP runtime.../docs/InstallationAndUsage.md (Client-Specific MCP Setup > Claude).Recommendations:
MAJOR.MINOR.PATCH).npm run dev with staged backend.npm run typecheck, npm test, npm run build, and npm pack --dry-run before release.Implemented files in this scaffold:
1. package.json
2. tsconfig.json
3. src/index.ts
4. src/server.ts
5. src/config/loadGlobalConfig.ts
6. src/config/loadProjectConfig.ts
7. src/config/mergeConfig.ts
8. src/client/laviyaApiClient.ts
9. src/orchestration/getMyWork.ts
10. src/orchestration/startExecution.ts
11. src/orchestration/completeExecution.ts
12. src/orchestration/reportTokenUsage.ts
13. src/orchestration/feedTask.ts
14. src/orchestration/getLocalWorkStatus.ts
15. src/orchestration/cancelLocalWork.ts
16. src/orchestration/leaseManager.ts
17. src/tools/getMyWorkTool.ts
18. src/tools/startExecutionTool.ts
19. src/tools/completeExecutionTool.ts
20. src/tools/reportTokenUsageTool.ts
21. src/tools/feedTaskTool.ts
22. src/tools/getLocalWorkStatusTool.ts
23. src/tools/cancelLocalWorkTool.ts
24. src/prompts/orchestrator.system.md
25. src/utils/env.ts
26. src/utils/logger.ts
27. src/utils/requestKey.ts
28. src/utils/json.ts
29. src/schemas/projectConfig.schema.json
30. src/schemas/globalConfig.schema.json
31. src/schemas/executionSummary.schema.json
32. src/schemas/completeExecution.schema.json
33. examples/global.json
34. examples/project.json
35. examples/project-advanced.json
36. examples/override.system.md
37. examples/cursor/laviya-project.mdc
38. examples/claude/SKILL.md
39. examples/vscode/mcp.json
40. README.md
One-time machine setup:
~/.laviya/config/global.json.LAVIYA_API_KEY required).Per-project setup:
.laviya/project.json (or .laviya.json).Run locally:
cd mcp
npm install
npm run dev
Config discovery behavior:
.laviya/project.json, then .laviya.json.IDE integration behavior:
This design installs one shared AI runtime per machine and keeps each project configuration lightweight.
It reduces maintenance cost because updates, bug fixes, and security improvements happen once, centrally.
It also improves rollout and support by giving every team the same reliable behavior while still allowing project-specific settings.
FAQs
Laviya AI Orchestration MCP runtime for IDE and agent integrations.
We found that laviya-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.