@bguiz/ainj packages those pieces into a single install,
so you can set them up once and start building faster.
In this tutorial you will:
- Install AInj
- Install globally via
npm - Configure AInj and your preferred harness with
ainj install - Verify your setup with
ainj statusandainj skills
- Install globally via
- Run an Injective CLI command
- Invoke an Injective agent skill
- Run both Injective MCP servers
Prerequisites
| Tool | Minimum version | How to check | Install link |
|---|---|---|---|
| Node.js | 24.0.0 | node --version | Node.js |
| npm | 11.0.0 | npm --version | npm |
| Git | 2.53.0 | git --version | Git |
| Codex | 0.139.0 | codex --version | Codex |
| Claude Code | 2.1.81 | claude --version | Claude Code |
- A terminal session with permission to install a global
npmpackage - A local project or working directory where your harness can read configuration files
Get started
The Injective AI SDK is open source at bguiz/ainj. This contains the source code for the package you are about to install.If you would like to develop or contribute to AInj:However, note that this tutorial will focus on using AInj, rather than on contributing to it.
What does ainj install configure?
ainj install writes AInj state, configures MCP entries for supported harnesses,
and installs bundled skills so your AI tooling can use Injective-aware prompts and transports without manual wiring.
In practice, the setup flow does three useful jobs:
- It saves AInj state, including scope, ports, and default harness.
- It adds MCP entries for both stdio and HTTP transports to your harness configurations.
- It installs the agent skills so a harness can invoke them.
You must run
ainj install once.
It includes interactive prompts, which are used to configure the installation.Installing and configuring AInj
- Run
ainj installin your terminal. - Select the options from the installation wizard
- Choose
global(recommended).- Unless you want the configuration to apply only within the current directory.
- Keep the default ports
3001and3002for the MCP servers (or choose others). - Select the harnesses you want AInj to configure, such as
CodexorClaude Code. - Select which agent skills you wish to install.
- Choose
AInj configured in the terminal.
Checking your AInj setup
- Run
ainj status - Inspect the installed version, configured scope, selected ports, default harness, and agent skills.
- Confirm that all of these values match your expectations
- If any of them are incorrect, simply re-run
ainj install.
- If any of them are incorrect, simply re-run
Note that
ainj status only shows the number of available agent skills.
To see the full list of available skills, run ainj skills.Running Injective CLI commands
- Run
ainj cli versionto confirm that AInj can resolve the bundledinjectivedbinary. - Run
ainj cli --helpif you want to inspect the CLI surface before moving on to chain-specific commands.
Note that
ainj injectived is an alias for ainj cli.Running an Injective agent skill from your harness
- Start your preferred harness (e.g. Codex or Claude Code).
- Enter a prompt that references a previously installed agent skill
- For example, if you want to build a smart contract or dApp on Injective:
- In Codex, use
$injective-evm-developer (... your smart contract/ dApp idea) - In Claude Code, use
/injective-evm-developer (... your smart contract/ dApp idea)
- Thereafter the agent skill will be loaded into the context window, and you can interact with it.
Note that your harness should provide tab completion for skill names,
e.g. when you type
$inj (Codex) or /inj (Claude Code) there should be several injective-related
agent skills listed for you to choose from.If you do this, and skills with matching names do not appear,
you likely have not installed them yet.
Re-run ainj install to trigger a reinstallation of the agent skills.Starting the documentation MCP server
- Run
ainj mcp docs httpin a dedicated terminal window.- Keep this terminal open while the server is running.
- Connect an MCP client to
http://localhost:3002/mcp.- Change the port number if you have configured a non-default value.
- Issue some MCP tool calls.
Alternatively, if you do not already have an MCP client,
you can point an inspector at the same URL to inspect the available tools, and manually issue tool calls.See the “Inspecting MCP servers” section in the README.
Starting the main Injective MCP server
- Run
ainj mcp main http.- Open another terminal window so you can keep the docs server running (if you want both MCP servers at the same time).
- Keep this terminal open while the server is running.
- Connect an MCP client to
http://localhost:3001/mcp- Change the port number if you have configured a non-default value.
- Issue some MCP tool calls
Next steps
You now have AInj installed, configured, and running across workflows spanning CLI, agent skills, and MCP servers. Here is what you learnt:- how to install AInj as a single entry point for Injective AI development
- how to configure harness integrations and MCP ports with
ainj install - how to verify the setup with
ainj statusandainj skills - how to use the CLI, agent skills, and both MCP servers
