Skip to main content
Add any MCP server to Airstore and use it as a CLI tool.

Add a tool

airstore mcp add \
  --name=my-tool \
  --command="npx @company/mcp-tool" \
  --env="API_KEY=xxx"
The tool appears at ~/airstore/tools/my-tool.

Configuration

Tools are configured in ~/.airstore/config.yaml:
mcp_servers:
  - name: my-tool
    command: npx @company/mcp-tool
    env:
      API_KEY: xxx
    args:
      - --verbose

Options

FieldDescription
nameTool identifier (used in path)
commandCommand to start the MCP server
envEnvironment variables
argsAdditional command arguments

Example: Custom notification tool

Create a tool that sends notifications to your internal system:
airstore mcp add \
  --name=notify \
  --command="node /path/to/notify-mcp.js" \
  --env="WEBHOOK_URL=https://internal.company.com/webhook"
Use it:
~/airstore/tools/notify send \
  --channel="alerts" \
  --message="Deployment complete"

Example: Database tool

Add a tool for database operations:
airstore mcp add \
  --name=db \
  --command="npx @company/db-mcp" \
  --env="DATABASE_URL=postgres://localhost/mydb"
Query your database:
~/airstore/tools/db query --sql="SELECT * FROM users LIMIT 10"

Building an MCP tool

MCP tools implement the Model Context Protocol. Here’s a minimal example:
// notify-mcp.ts
import { Server } from "@modelcontextprotocol/sdk/server";

const server = new Server({
  name: "notify",
  version: "1.0.0"
});

server.setRequestHandler("tools/list", async () => ({
  tools: [
    {
      name: "send",
      description: "Send a notification",
      inputSchema: {
        type: "object",
        properties: {
          channel: { type: "string", description: "Channel to notify" },
          message: { type: "string", description: "Message content" }
        },
        required: ["channel", "message"]
      }
    }
  ]
}));

server.setRequestHandler("tools/call", async (request) => {
  const { name, arguments: args } = request.params;
  
  if (name === "send") {
    // Send notification via webhook
    await fetch(process.env.WEBHOOK_URL, {
      method: "POST",
      body: JSON.stringify(args)
    });
    
    return { content: [{ type: "text", text: "Notification sent" }] };
  }
});

server.connect(process.stdin, process.stdout);

Managing tools

# List all tools
airstore mcp list

# Remove a tool
airstore mcp remove my-tool

# Test a tool
airstore mcp test my-tool

# View tool commands
~/airstore/tools/my-tool --help

Tool permissions

Control which tools are available:
# Disable a tool
airstore tools disable my-tool

# Re-enable
airstore tools enable my-tool
See Disabling Tools for more.

Debugging

Run with verbose output:
airstore mcp test my-tool --verbose
Check server logs:
# View MCP server output
airstore logs my-tool
Common issues:
  • Command not found: Verify the command path
  • Missing env vars: Check ~/.airstore/config.yaml
  • Server crashes: Run the command directly to see errors

Next steps