Skip to main content
Airstore supports any MCP (Model Context Protocol) server. Add custom servers to extend your sources and tools.

Add an MCP server

airstore mcp add --name=my-server --command="npx my-mcp-server"
The server appears in your filesystem based on what it provides:
  • Resources → appear under sources/
  • Tools → appear under tools/

Configuration options

airstore mcp add \
  --name=my-server \
  --command="npx @company/mcp-server" \
  --env="API_KEY=xxx" \
  --env="BASE_URL=https://api.example.com"
OptionDescription
--nameIdentifier for the server (used in paths)
--commandCommand to start the server
--envEnvironment variables (can specify multiple)
--argsAdditional arguments to pass

Config file

MCP servers are stored in ~/.airstore/config.yaml:
mcp_servers:
  - name: my-server
    command: npx @company/mcp-server
    env:
      API_KEY: xxx
      BASE_URL: https://api.example.com
  
  - name: local-db
    command: /usr/local/bin/db-mcp
    args:
      - --connection-string
      - postgres://localhost/mydb
Edit this file directly or use airstore mcp add.

Example: Custom CRM

Add a CRM MCP server:
airstore mcp add \
  --name=salesforce \
  --command="npx @salesforce/mcp-server" \
  --env="SF_TOKEN=xxx"
Now query it like any other source:
airstore create sources/salesforce/hot-leads \
  --query "leads with score > 80 from the last week"

ls ~/airstore/sources/salesforce/hot-leads/
# lead-001-acme-corp.json
# lead-002-globex.json

Example: Internal API

Wrap an internal API with an MCP server:
airstore mcp add \
  --name=internal-api \
  --command="node /path/to/internal-mcp.js" \
  --env="API_URL=https://internal.company.com"

Managing MCP servers

# List configured servers
airstore mcp list

# Remove a server
airstore mcp remove my-server

# Test a server
airstore mcp test my-server

Building MCP servers

MCP servers follow the Model Context Protocol specification. A minimal server:
import { Server } from "@modelcontextprotocol/sdk/server";

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

// Add resources (become sources)
server.setRequestHandler("resources/list", async () => ({
  resources: [
    { uri: "myapp://data", name: "My Data" }
  ]
}));

// Add tools (become executables)
server.setRequestHandler("tools/list", async () => ({
  tools: [
    { name: "create-item", description: "Create a new item" }
  ]
}));

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

Troubleshooting

Server won’t start Check the command works standalone:
npx my-mcp-server
Resources not appearing Verify the server implements resources/list:
airstore mcp test my-server --verbose
Environment variables not set Use --env for each variable or set them in config.yaml.

Next steps