Skip to main content

Projectors

Apply Idiomark personalities to external systems - MCP servers, shopping agents, HTTP APIs, gaming bots, and more.

Overview​

Projectors are adapters that project Idiomark personalities onto external systems (the opposite of adapters which extract personalities from platforms).

┌─────────────────────┐         ┌──────────────────────┐
│ Idiomark Personality │────────▶│ External System │
│ (voice, values) │ Apply │ (MCP, UCP, Games) │
└─────────────────────┘ └──────────────────────┘

Available Projectors​

ProjectorDescriptionPackage
MCP ServerModel Context Protocol server with personality-driven tools@idiomark/projectors/mcp
UCP AdapterUniversal Commerce Protocol shopping agent@idiomark/projectors/ucp
HTTP ServerREST API that responds with personality@idiomark/projectors/http
GamingIn-game NPCs and chat bots (Minecraft, Roblox, VRChat, Fortnite)@idiomark/projectors/gaming

Architecture​

All projectors extend BaseProjectionAdapter which provides:

FeatureDescription
Rate LimitingConfigurable request throttling
CachingCache personality applications
Retry LogicAutomatic retry with exponential backoff
MetricsRequest counting, latency tracking
EventsEvent emission for observability

Personality Modes​

All projectors support three personality application modes:

ModeDescription
strictMaximum personality application
balancedBalanced personality (default)
subtleSubtle personality hints

MCP Server​

Creates an MCP server that exposes your personality as tools and resources.

Exposed Tools​

ToolDescription
generate_responseGenerate responses with your personality
get_personalityQuery personality metadata (voice, values, domains, knowledge)
get_system_promptGet the system prompt encoding
get_healthHealth check with metrics

Exposed Resources​

ResourceDescription
idiomark:///personalityFull Idiomark file
idiomark:///voiceVoice profile (tone, formality, humor, etc.)
idiomark:///valuesCore values and principles
idiomark:///domainsAreas of expertise and interest

Usage​

import { MCPServer } from "@idiomark/projectors/mcp";
import myPersonality from "./my-personality.idiomark";

const server = new MCPServer({
transport: "stdio", // or 'http'
port: 3000, // required for http transport
personality: myPersonality,
});

await server.start();

Configuration​

interface MCPServerConfig {
transport: "stdio" | "http";
port?: number;
personality: IdiomarkFile;
provider?: "anthropic" | "openai" | "auto";
model?: string;
}

UCP Adapter​

Creates a Universal Commerce Protocol shopping agent infused with your personality.

Features​

  • Personality Integration: Interaction style (tone, formality, humor)
  • Values Alignment: Product recommendations matching your values
  • Domain Matching: Prioritizes products in your domains of interest
  • Voice Matching: Product descriptions in your communication style

Usage​

import { UCPAdapter } from "@idiomark/projectors/ucp";
import myPersonality from "./my-personality.idiomark";

const adapter = new UCPAdapter({
merchantId: "merchant-123",
businessName: "My Store",
personality: myPersonality,
port: 3000,
});

const result = await adapter.start();
console.log(`Profile at: ${result.profileUrl}`);

UCP Profile Fields​

interface UCPProfile {
ucp_version: string;
merchant_id: string;
business_name: string;
capabilities: UCPCapabilities;
personality_integration: {
interaction_style: {
tone: string;
formality: number;
directness: number;
humor: number;
enthusiasm: number;
};
recommendation_strategy: {
values_alignment: string[];
domain_preferences: string[];
voice_matching: boolean;
};
system_prompt: string;
};
}

HTTP Server​

Simple REST API that applies your personality to incoming requests.

Endpoints​

EndpointMethodDescription
/generatePOSTGenerate response with personality
/streamPOSTStream response (SSE)
/personalityGETView personality JSON
/system-promptGETView system prompt
/healthGETHealth check with metrics

Usage​

import { HTTPServerAdapter } from "@idiomark/projectors/http";
import myPersonality from "./my-personality.idiomark";

const server = new HTTPServerAdapter({
port: 3000,
personality: myPersonality,
provider: "anthropic", // or 'openai'
model: "claude-3-opus-20240229",
});

await server.start();

Example Request​

curl -X POST http://localhost:3000/generate \
-H "Content-Type: application/json" \
-d '{"message": "Hello!", "mode": "balanced"}'

Gaming Adapters​

Create personality-powered in-game bots and NPCs.

Supported Games​

GameAdapterFeatures
MinecraftMinecraftAdapterChat responses, command handling
RobloxRobloxAdapterGame interaction, social features
VRChatVRChatAdapterWorld interactions, avatar behavior
FortniteFortniteAdapterBattle royale chat and commands

Usage​

import { MinecraftAdapter } from "@idiomark/projectors/gaming/minecraft";
import myPersonality from "./my-personality.idiomark";

const bot = new MinecraftAdapter({
name: "MyBot",
serverConfig: {
host: "mc.hypixel.net",
port: 25565,
},
personality: myPersonality,
});

await bot.connect();

Gaming Features​

  • Chat Personality: In-game chat with your voice
  • NPC Behavior: Personality-driven character responses
  • Command Handling: Custom commands with personality
  • Avatar Customization: Express personality through appearance

CLI Quick Start​

# Create a new MCP server adapter
idiomark projector create my-server --type mcp --personality me.idiomark

# Create a gaming adapter for Minecraft
idiomark projector create my-mc-bot --type minecraft --personality me.idiomark

# Validate an adapter
idiomark projector validate ./my-server

# Test an adapter
idiomark projector test ./my-server

# List all adapters
idiomark projector list

idiomark projector create​

Create a new projection adapter from a template.

idiomark projector create <name> [options]

Arguments​

ArgumentDescription
nameName for the adapter (kebab-case)

Options​

FlagAliasDescriptionDefault
--type-tAdapter typemcp
--personality-pPath to Idiomark fileRequired
--output-oOutput directory./<name>
--description-dAdapter descriptionAuto-generated
--portPort for HTTP adapters3000
--transportTransport for MCP (stdio|http)stdio
--gameGame type for gaming adapters-
--templateCustom template path-
--minimalGenerate minimal templatefalse
--force-fOverwrite existing directoryfalse
--dry-runShow files without creatingfalse

Adapter Types​

TypeDescription
mcpModel Context Protocol server
ucpUniversal Commerce Protocol adapter
httpHTTP REST API server
minecraftMinecraft server bot
robloxRoblox game adapter
vrchatVRChat world adapter
fortniteFortnite game adapter

Examples​

# Create an MCP server
idiomark projector create my-assistant \
--type mcp \
--personality me.idiomark

# Create a Minecraft bot
idiomark projector create mc-server-bot \
--type minecraft \
--personality gamer.idiomark \
--game minecraft

# Create HTTP server with custom port
idiomark projector create personality-api \
--type http \
--personality me.idiomark \
--port 8080

# Create with custom template
idiomark projector create custom-server \
--type mcp \
--template ./my-template \
--personality me.idiomark

# Dry run to preview files
idiomark projector create test-server \
--type mcp \
--personality me.idiomark \
--dry-run

# Force overwrite existing
idiomark projector create my-server \
--type mcp \
--personality me.idiomark \
--force

Output​

🎭 Creating Projection Adapter

📦 Adapter Type: MCP Server
👤 Personality: me.idiomark (casual, 75% humor)

📁 Output Directory: ./my-server

📝 Files to create:
────────────────────────────────────
✓ src/index.ts - Entry point
✓ src/tools.ts - MCP tools
✓ src/resources.ts - MCP resources
✓ src/handlers.ts - Request handlers
✓ package.json - Dependencies
✓ tsconfig.json - TypeScript config
✓ tsup.config.ts - Build config
✓ README.md - Documentation
────────────────────────────────────

✅ Adapter created successfully!

🚀 Next steps:
cd my-server
npm install
npm run dev

idiomark projector validate​

Validate a projection adapter (TypeScript, imports, Idiomark schema).

idiomark projector validate <path> [options]

Arguments​

ArgumentDescription
pathPath to adapter directory

Options​

FlagAliasDescriptionDefault
--typescript-tCheck TypeScript compilationtrue
--imports-iVerify imports resolvetrue
--schema-sValidate Idiomark schematrue
--strictEnable strict modefalse
--fixAuto-fix issuesfalse

Examples​

# Basic validation
idiomark projector validate ./my-server

# Skip TypeScript compilation
idiomark projector validate ./my-server --no-typescript

# Strict validation with auto-fix
idiomark projector validate ./my-server --strict --fix

Output​

🔍 Validating Projection Adapter

📂 Path: ./my-server

🔎 Checks:
────────────────────────────────────
✓ TypeScript compilation
✓ Import resolution
✓ Idiomark schema validation
✓ File structure
────────────────────────────────────

✅ Adapter is valid!

idiomark projector test​

Test a projection adapter with various test modes.

idiomark projector test <path> [options]

Arguments​

ArgumentDescription
pathPath to adapter directory

Options​

FlagAliasDescriptionDefault
--unit-uRun unit teststrue
--integration-IRun integration testsfalse
--coverage-cGenerate coverage reportfalse
--personality-pTest with Idiomark personality-
--watch-wWatch modefalse
--verbose-vVerbose outputfalse

Examples​

# Run unit tests
idiomark projector test ./my-server

# Full test suite with coverage
idiomark projector test ./my-server \
--integration \
--coverage

# Test with specific personality
idiomark projector test ./my-server \
--personality ./test-personality.idiomark

# Watch mode for development
idiomark projector test ./my-server --watch

Output​

🧪 Testing Projection Adapter

📂 Path: ./my-server

🔬 Running tests...
────────────────────────────────────
✓ Unit tests (12/12 passed)
✓ Integration tests (5/5 passed)
✓ Personality application
────────────────────────────────────

📊 Coverage Report:
────────────────────────────────────
Statements: 94.5%
Branches: 89.2%
Functions: 96.8%
Lines: 94.5%
────────────────────────────────────

✅ All tests passed!

idiomark projector list​

List all projectors in the workspace.

idiomark projector list [options]

Options​

FlagAliasDescriptionDefault
--type-tFilter by typeAll
--status-sFilter by statusAll
--searchSearch by name-
--json-jJSON outputfalse
--tableTable formattrue

Examples​

# List all adapters
idiomark projector list

# Filter by type
idiomark projector list --type mcp

# Filter by status
idiomark projector list --status production

# Search by name
idiomark projector list --search "bot"

# JSON output
idiomark projector list --json

Output​

📋 Projection Adapters

┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Name ┃ Type ┃ Status ┃ Port ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ my-assistant │ MCP │ production │ - │
│ mc-bot │ Minecraft│ dev │ 25565 │
│ personality-api │ HTTP │ staging │ 8080 │
│ shopping-agent │ UCP │ experimental│ - │
└────────────────────┴─────────┴─────────────┴────────────┘

Total: 4 adapters

idiomark projector info​

Display detailed information about an adapter.

idiomark projector info <path> [options]

Arguments​

ArgumentDescription
pathPath to adapter directory

Options​

FlagAliasDescriptionDefault
--json-jJSON outputfalse
--dependencies-dShow dependenciestrue

Examples​

# Show adapter info
idiomark projector info ./my-server

# JSON output
idiomark projector info ./my-server --json

Output​

📋 Adapter Information

📁 Path: ./my-server

📦 Metadata:
────────────────────────────────────
Name: my-assistant
Type: MCP Server
Version: 1.0.0
Status: production
Created: 2026-02-10
Last Updated: 2026-02-11
────────────────────────────────────

👤 Personality:
────────────────────────────────────
File: me.idiomark
Tone: casual
Formality: 0.30
Humor: 0.75
────────────────────────────────────

📦 Dependencies:
────────────────────────────────────
@idiomark/core ^2.0.0
@idiomark/inference ^2.0.0
@idiomark/projectors ^2.0.0
────────────────────────────────────

🔧 Configuration:
────────────────────────────────────
Transport: stdio
Port: -
Build Target: es2022
────────────────────────────────────

idiomark projector add-tools​

Add tools to an existing MCP adapter.

idiomark projector add-tools <path> [options]

Arguments​

ArgumentDescription
pathPath to adapter directory

Options​

FlagAliasDescriptionDefault
--interactive-iInteractive modefalse
--tool-tTool name(s) to add-

Examples​

# Interactive mode
idiomark projector add-tools ./my-server --interactive

# Add specific tools
idiomark projector add-tools ./my-server \
--tool search \
--tool calculate

idiomark projector add-resources​

Add resources to an existing MCP adapter.

idiomark projector add-resources <path> [options]

Arguments​

ArgumentDescription
pathPath to adapter directory

Options​

FlagAliasDescriptionDefault
--interactive-iInteractive modefalse
--resource-rResource name(s) to add-

Examples​

# Interactive mode
idiomark projector add-resources ./my-server --interactive

# Add specific resources
idiomark projector add-resources ./my-server \
--resource config \
--resource logs

Generated Adapter Structure​

MCP Adapter​

my-server/
├── src/
│ ├── index.ts # Entry point
│ ├── tools.ts # MCP tools definition
│ ├── resources.ts # MCP resources
│ └── handlers.ts # Request handlers
├── package.json
├── tsconfig.json
├── tsup.config.ts
└── README.md

Gaming Adapter (Minecraft)​

mc-bot/
├── src/
│ ├── index.ts # Entry point
│ ├── client.ts # Game client
│ ├── chat.ts # Chat handler
│ └── commands.ts # Command handlers
├── package.json
├── tsconfig.json
├── tsup.config.ts
└── README.md

HTTP Adapter​

personality-api/
├── src/
│ ├── index.ts # Server setup
│ ├── routes.ts # API routes
│ └── middleware.ts # Middleware
├── package.json
├── tsconfig.json
├── tsup.config.ts
└── README.md

Environment Variables​

VariableDescriptionDefault
IDIOMARK_API_KEYAPI key for inference-
Idiomark_MODELDefault modelgpt-4
Idiomark_ADAPTER_DIRDefault output directory.