Sign In

@inferlane/mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inferlane/mcp-server

MCP server for InferLane — smart model routing and cost optimization for AI agents. Works with Claude Code, Claude Desktop, Goose, Cursor, and any MCP client. Includes stdio and HTTP transports.

latest
Source
npmnpm
Version
1.3.0
Version published
Weekly downloads
2
-50%
Maintainers
1
Weekly downloads
 
Created
Source

@inferlane/mcp-server

MCP server for InferLane — smart model routing and cost optimization tools for AI agents. Works with Claude Code, Claude Desktop, Goose, Cursor, and any MCP-compatible client.

What you get

The server exposes tools that let agents:

  • il_suggest_model — pick the optimal model for a task (task type, quality tier, budget)
  • il_compare_models — side-by-side comparison of models in the same capability tier
  • il_estimate_cost — estimate the cost of a workload on specific models
  • il_check_promotions — active discounts across providers (requires API key)
  • il_get_spend — session/today/week/month spend summaries (requires API key)
  • il_route_request — dispatch a prompt through the smart router (requires API key)

Offline tools (il_estimate_cost, il_compare_models, il_suggest_model) work without an InferLane account.

Install — Claude Code

claude mcp add inferlane -- npx -y @inferlane/mcp-server

Or add to ~/.claude/mcp.json:

{
  "mcpServers": {
    "inferlane": {
      "command": "npx",
      "args": ["-y", "@inferlane/mcp-server"],
      "env": {
        "INFERLANE_API_KEY": "il_..."
      }
    }
  }
}

Install — Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "inferlane": {
      "command": "npx",
      "args": ["-y", "@inferlane/mcp-server"],
      "env": { "INFERLANE_API_KEY": "il_..." }
    }
  }
}

Install — Goose

Add to ~/.config/goose/config.yaml under extensions::

extensions:
  inferlane:
    name: InferLane
    type: stdio
    enabled: true
    cmd: npx
    args: ["-y", "@inferlane/mcp-server"]
    envs:
      INFERLANE_API_KEY: "il_..."
    timeout: 60
    bundled: false
    available_tools: []

Environment variables

VariablePurpose
INFERLANE_API_KEYYour InferLane API key. Get one at https://inferlane.dev/dashboard/settings. Optional — the server runs in offline mode without it and exposes the three offline tools.
INFERLANE_BASE_URLOverride the InferLane API base URL (default: https://inferlane.dev). Useful for self-hosted deployments.

HTTP transport (for Managed Agents / remote clients)

For cloud-hosted agent runtimes (Anthropic Managed Agents, hosted Claude Code, remote IDEs) that can't connect via stdio, run the HTTP server:

npx @inferlane/mcp-server inferlane-mcp-http
# or after install:
inferlane-mcp-http

The server listens on http://127.0.0.1:3030/mcp by default. Every session must authenticate with Authorization: Bearer <INFERLANE_API_KEY>.

VariableDefaultPurpose
PORT3030HTTP port
HOST127.0.0.1Bind address. Set to 0.0.0.0 to expose on all interfaces (production containers).
MCP_PATH/mcpMCP endpoint path
INFERLANE_ALLOW_ENV_FALLBACK(unset)Set to 1 to let requests without a Bearer token fall back to the process-level INFERLANE_API_KEY. Only safe in trusted single-tenant deployments — leaves the server's configured key accessible to any reachable client.

Health check at GET /health.

Programmatic use (embed in your own server)

import { createInferLaneServer } from '@inferlane/mcp-server';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';

const server = createInferLaneServer({
  apiKey: process.env.INFERLANE_API_KEY,
  // baseUrl: 'https://your-selfhost.example.com', // optional
});

await server.connect(new StdioServerTransport());

License

MIT

Keywords

mcp

FAQs

Package last updated on 16 Apr 2026

Did you know?

Socket

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.

Install

Related posts