@intentlm/mcp-server
v0.1.1
Published
MCP server for intentLM — behavioral intent classification for AI agents
Maintainers
Readme
@intentlm/mcp-server
MCP server for intentLM — expose intent classification, URL pattern configuration, and agent prompts to Claude Code, Cursor, Windsurf, and other MCP clients.
Thin client over the intentLM Inference + Config APIs. No separate data store.
Install
npm install -g @intentlm/mcp-server
# or run without global install:
npx -y @intentlm/mcp-serverMonorepo dev:
cd api/mcp
npm install && npm run build
npm link # optionalEnvironment
| Variable | Required | Default | Purpose |
|----------|----------|---------|---------|
| INTENTLM_API_KEY | Yes | — | ilm_live_… SDK key from dashboard Setup |
| INTENTLM_CONFIG_URL | No | http://localhost:8081 | Config API base URL |
| INTENTLM_INFERENCE_URL | No | http://localhost:8080 | Inference API base URL |
Production example:
export INTENTLM_API_KEY=ilm_live_...
export INTENTLM_CONFIG_URL=https://intentlm-dev-config-....run.app
export INTENTLM_INFERENCE_URL=https://intentlm-dev-inference-....run.appClaude Code
Add to .claude/settings.json (project or user):
{
"mcpServers": {
"intentlm": {
"command": "npx",
"args": ["-y", "@intentlm/mcp-server"],
"env": {
"INTENTLM_API_KEY": "ilm_live_...",
"INTENTLM_CONFIG_URL": "https://your-config.run.app",
"INTENTLM_INFERENCE_URL": "https://your-inference.run.app"
}
}
}
}Cursor
Settings → MCP → Add server (stdio):
- Command:
npx - Args:
-y,@intentlm/mcp-server - Env:
INTENTLM_API_KEY,INTENTLM_CONFIG_URL,INTENTLM_INFERENCE_URL
Or in .cursor/mcp.json:
{
"mcpServers": {
"intentlm": {
"command": "npx",
"args": ["-y", "@intentlm/mcp-server"],
"env": {
"INTENTLM_API_KEY": "ilm_live_..."
}
}
}
}Windsurf / other stdio clients
Same pattern: command npx, args ["-y", "@intentlm/mcp-server"], pass env vars.
Tools (12)
| Tool | Description |
|------|-------------|
| analyze_session | POST token sequence → intent + confidence |
| get_intent_taxonomy | List classifiable intent classes |
| get_token_taxonomy | List token IDs and namespaces |
| get_visitor_context | Cross-session intent history for a visitor |
| get_agent_prompt | Prompt template for an intent class |
| set_url_pattern | Add/update URL glob → token mapping |
| remove_url_pattern | Remove a URL pattern |
| set_sensitivity | Per-intent confidence threshold |
| suppress_intent | Add intent to suppression list |
| unsuppress_intent | Remove from suppression list |
| set_agent_prompt | Update agent prompt for an intent |
| suggest_url_patterns | POST route paths → suggested token mappings |
Prompts (4)
setup-intentlm— SDK + pattern setup workflowdiagnose-intent— Debug misclassificationconfigure-alerts— Webhook / sensitivity tuningreview-coverage— Instrumentation gap review
Remote transport (SSE)
For Docker or hosted agents:
intentlm-mcp --transport=sse --port=3100
# Health: GET http://localhost:3100/health
# SSE: GET http://localhost:3100/sseDocker Compose (monorepo):
INTENTLM_MCP_API_KEY=ilm_live_... docker compose --profile mcp up mcpDeveloper onboarding
For repo instrumentation, prefer the CLI:
npm install -g @intentlm/cli
intentlm init --pushThe MCP server complements the CLI for agent-driven config (e.g. “set up intentLM for my Next.js app” inside Claude Code).
Tests
npm testPublish
npm login
npm publish --access publicRequires the @intentlm npm org.
