Skip to content

Quickstart

Three steps to a working agent. Pick your language once — the tabs stay in sync across the page.

  1. Install the package.

    Terminal window
    npm install toolnexus
  2. Create a toolkit and a client. The toolkit starts with 10 built-in tools (bash / read / write / edit / grep / glob / …). Point the client at any OpenAI- or Anthropic-style endpoint.

    import { createToolkit, createClient } from "toolnexus"
    const tk = await createToolkit()
    const agent = createClient({
    baseUrl: "https://openrouter.ai/api/v1",
    style: "openai",
    model: "openai/gpt-4o-mini",
    })
  3. Run. Tools are called for you and the loop runs to a final answer.

    const { text } = await agent.run("What files are in this folder?", { toolkit: tk })
    console.log(text)

Give the toolkit an mcp.json and a skills/ folder and every server tool + a skill tool appear in the same registry:

const tk = await createToolkit({
mcpConfig: "./mcp.json", // local stdio + remote streamable-HTTP servers
skillsDir: "./skills", // every SKILL.md becomes loadable via one `skill` tool
})

Go deeper on each source: MCP servers · Agent skills.