MCP Setup for Cursor & Claude

AgentShelf runs as a Model Context Protocol (MCP) server, letting AI agents in Cursor and Claude Desktop call the same audit engine directly.

What is MCP?

MCP (Model Context Protocol) is a standard for AI agents to access tools and data sources. AgentShelf provides MCP tools for:

  • Auditing store URLs
  • Generating llms.txt files
  • Querying platform-specific APIs (Shopify, WordPress, Strapi, Contentful)
  • Listing platform capabilities and limits

Prerequisites

  • Node.js 18+ and npm
  • Cursor IDE or Claude Desktop
  • AgentShelf repository cloned locally

Installation

  1. Clone AgentShelf
git clone https://github.com/oivoodoo/agentshelf.git
cd agentshelf
npm install
  1. Test the MCP server
npm run mcp

You should see the MCP server start in stdio mode. Press Ctrl+C to stop.

Cursor Setup

  1. Open Cursor settings (or create if missing):
# macOS / Linux
~/.cursor/mcp.json

# Windows
%APPDATA%\Cursor\mcp.json
  1. Add AgentShelf to your MCP servers:
{
  "mcpServers": {
    "agentshelf": {
      "command": "npx",
      "args": ["tsx", "mcp/server.ts"],
      "cwd": "/absolute/path/to/agentshelf"
    }
  }
}

Replace /absolute/path/to/agentshelf with your actual path.

  1. Restart Cursor to load the MCP server.

  2. Test in Cursor:

Open a chat and ask:

"Use AgentShelf to audit https://demo.myshopify.com"

Claude Desktop Setup

  1. Find your Claude config:
# macOS
~/Library/Application Support/Claude/claude_desktop_config.json

# Linux
~/.config/Claude/claude_desktop_config.json

# Windows
%APPDATA%\Claude\claude_desktop_config.json
  1. Add AgentShelf:
{
  "mcpServers": {
    "agentshelf": {
      "command": "npx",
      "args": ["tsx", "mcp/server.ts"],
      "cwd": "/absolute/path/to/agentshelf"
    }
  }
}
  1. Restart Claude Desktop.

  2. Test:

In Claude, type:

"Audit my Shopify store at https://example.com using AgentShelf"

Available MCP Tools

Once configured, these tools are available:

audit_url

Full AI readability audit (same as web demo).

{
  "url": "https://example.com"
}

Returns score, platform, products, recommendations, and llms.txt.

generate_llms_txt

Generate only the llms.txt output.

{
  "url": "https://example.com"
}

list_platforms

List supported platforms, their capabilities, and credential requirements.

No arguments.

shopify_products

Fetch Shopify catalog directly.

{
  "shopUrl": "https://demo.myshopify.com"
}

wordpress_posts

Fetch WordPress posts via REST or HTML fallback.

{
  "siteUrl": "https://example.com"
}

strapi_entries

Query Strapi content types.

{
  "baseUrl": "https://example.com",
  "contentType": "products",
  "apiToken": "optional-token-if-public-locked"
}

contentful_entries

Fetch Contentful entries via Delivery API.

{
  "spaceId": "your-space-id",
  "accessToken": "your-cda-token",
  "contentType": "product"
}

Environment Variables for Credentials

For platforms requiring authentication, set environment variables in your MCP config:

{
  "mcpServers": {
    "agentshelf": {
      "command": "npx",
      "args": ["tsx", "mcp/server.ts"],
      "cwd": "/absolute/path/to/agentshelf",
      "env": {
        "STRAPI_API_TOKEN": "your-strapi-token",
        "CONTENTFUL_SPACE_ID": "your-space-id",
        "CONTENTFUL_ACCESS_TOKEN": "your-cda-token"
      }
    }
  }
}

AgentShelf never logs these credentials.

Troubleshooting

MCP server not showing up

  • Verify the cwd path is absolute and correct
  • Check that npm install completed successfully in the AgentShelf directory
  • Restart Cursor or Claude Desktop after editing the config
  • Check console/logs for MCP connection errors

Tool calls failing

  • Ensure the target URL is public (not behind authentication)
  • For platform-specific tools (Strapi, Contentful), verify credentials are set
  • Check network connectivity to the target site

"tsx not found" error

Run npm install in the AgentShelf directory to ensure tsx is available.

HTTP JSON-RPC Alternative

AgentShelf also supports HTTP-based MCP for web integrations:

# In Next.js dev mode
npm run dev

# Call MCP tools via HTTP
curl -X POST http://localhost:3000/api/mcp \
  -H "Content-Type: application/json" \
  -d '{"tool": "audit_url", "arguments": {"url": "https://example.com"}}'

See the main README for full API documentation.


Next: Platform Details → or Back to User Guide