AI Connections

Install AI Connections.

Add AI provider connections and MCP tools to your app. Use a coding agent or follow the manual steps.

With a coding agent

BYOK setup prompt
Add BYOK support to this app with AI Connections. Read https://seeker-studio.games/ai-connections/llms.txt first. Choose direct mode for my keys or full mode for each user's keys, connect the app's AI features, and verify with fixtures.
MCP setup prompt
Add MCP access to this app with AI Connections. Read https://seeker-studio.games/ai-connections/llms.txt first and use its pinned MCP preview. Connect tools to the app's existing services, identity and permissions. Verify the server and client configuration with fixtures.
BYOK and MCP setup prompt
Add BYOK and MCP support to this app with AI Connections. Read https://seeker-studio.games/ai-connections/llms.txt first. Use the published provider runtime and the pinned MCP preview, wire them into the app's existing services and permissions, and verify with fixtures.

Run your coding agent in the app's project folder. The prompts use the agent instructions.

Use Node.js 22 or later and your app's existing project folder. The MCP installer requires package.json.

Manual BYOK setup

Choose the path that matches who supplies the provider keys.

Your own keys

  1. Install the provider runtime in your project.

    npm install ai-connections
  2. Set your provider's key in the server environment. OpenRouter uses OPENROUTER_API_KEY. Keep real keys in a gitignored .env or secret store.

  3. Save this as example.mjs, then use the same API in your app's AI features.

    import { generateText, languageModel } from 'ai-connections/direct';
    
    const result = await generateText({
      model: languageModel('openrouter:deepseek/deepseek-chat'),
      prompt: 'Write a one-sentence greeting.',
    });
    console.log(result.text);
    node --env-file=.env example.mjs

    Running this example makes a provider call charged to your account. Your app must load its own environment variables.

Each user's keys

npm install ai-connections ai-connections-react
npx ai-connections-cli@0.4.3 init --dry-run
npx ai-connections-cli@0.4.3 init

The scaffold supports Next.js App Router and React projects. Follow the generated AI_CONNECTIONS.md to connect verified sign-in, encrypted storage and your app's AI features.

For other frameworks, use the runtime API on GitHub directly.

Manual MCP setup

Create an MCP server for your product. Its tools call your existing app services.

MCP preview

This preview is built from source commit 5aec076. It includes the CLI source and its MIT licence.

The package's internal version is 0.4.3; its MCP changes are distributed through this pinned download, ahead of the npm release.

Download the MCP preview · Build details and checksum

  1. Install the preview in your app's project folder.

    npm install --save-dev https://seeker-studio.games/ai-connections/downloads/ai-connections-cli-mcp-5aec076.tgz
  2. Review the generated-file plan, then create the server.

    npx --no-install ai-connections mcp --dry-run
    npx --no-install ai-connections mcp

    The installer preserves existing files and leaves your real agent settings unchanged.

  3. Install the server dependencies and check the connection.

    cd ai-connections/mcp
    npm install
    npm run verify

    The starter exposes product_status with ready: false. Passing verification proves the connection; product actions still need wiring.

  4. Edit the generated files to connect your product.

    FileYour integration
    actions.mjsAdd tool schemas and handlers that call existing app services. Return job IDs for queued work and public output fields.
    access.mjsDerive the owner and permissions from your product. HTTP authentication starts closed.
    product.jsonSet your product's name and server version.

    Use the trusted principal.ownerId for account-scoped work. Keep your existing spending limits, queues, reference checks and file ownership rules.

    The generated README.md explains the action contract. Add fixture tests for your actions before using paid providers.

Connect your agent

Merge the generated entry into your client's configuration. Keep its other servers.

These steps also apply to an existing product's MCP server. Use that product's own configuration or URL.

Generated examples live under ai-connections/mcp/clients/. They contain absolute paths to Node and stdio.mjs; update those paths if you move the project.

~ means your home folder. On Windows, use %USERPROFILE% in these paths.

ClientConfiguration
Claude Desktop

claude-desktop.json

Settings → Developer → Edit Config. Use the mcpServers entry.

Claude Code

claude-code.json

.mcp.json in your project, under mcpServers.

Codex

codex.toml

~/.codex/config.toml, under the generated mcp_servers table.

Cursor

cursor.json

.cursor/mcp.json in your project, under mcpServers.

Hermes

hermes.yaml

~/.hermes/config.yaml, under mcp_servers.

Restart or reload the client, enable your server, and ask it to call product_status. Review tool approvals before enabling spending or deletion actions.

For a CLI-based Codex setup, replace the sample path with your generated stdio.mjs path:

codex mcp add my-product -- node "/absolute/path/to/product/ai-connections/mcp/stdio.mjs"
codex mcp list

Use HTTP

For remote access, connect the server to your product's verified authentication and HTTPS first.

cd ai-connections/mcp
npm run http

The local endpoint is http://127.0.0.1:4318/mcp. It returns 401 until authenticateHttp in access.mjs verifies a session or token.

Use a matching example from clients/http/ and supply credentials through the client's secret settings. Configure exact allowed hosts and browser origins in the host integration.

Keep provider keys in your product. Use your product's authentication in the MCP client.

Tip on Ko-fi