1. Conduid
  2. Commerce
  3. And AI Agent Bookstore
MCP server · Commerce

And AI Agent Bookstore

MCP Server for an Online Bookstore with Custom AI Agent - PoC.

53Fair

Scored 5 months ago · breakdown

About And AI Agent Bookstore

And AI Agent Bookstore is an MCP server published by aga87 in the Commerce category: mCP Server for an Online Bookstore with Custom AI Agent - PoC.

The repository has 1 stars and 0 forks, with the last commit 8 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/aga87/mcp-server-and-ai-agent-bookstore

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about And AI Agent Bookstore

Powered by Claude · Grounded in docs

I know everything about And AI Agent Bookstore. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 13 hours ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • !License declaredNo license file. Legally you have no right to use it in a product.
  • !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

Simple MCP Server for an Online Bookstore with Custom AI Agent - POC

👁️ Overview

This project is a proof-of-concept implementation of a Model Context Protocol (MCP) server and a custom AI-powered bookstore agent. It demonstrates how an LLM can call structured tools exposed by an MCP server (e.g., search books) and how a separate agent process can communicate with that server to provide conversational responses.

The repo contains:

  • An MCP server

    • Built using @modelcontextprotocol/sdk
    • Exposes a sample of bookstore-related tools (e.g., fetching books)
    • Includes a seeding script to populate mock bookstore data
  • A custom bookstore AI Agent

    • Connects to the MCP server as a client via a dedicated MCP client service:
      • Uses @modelcontextprotocol/sdk with an STDIO-based process transport to talk to the MCP server.
      • Discovers available MCP tools at runtime and invokes them dynamically
    • Uses OpenAI to answer user queries
    • Decides when to call MCP tools to fetch inventory data
    • Can respond normally or stream responses token-by-token
  • A lightweight Express API provides endpoints for:

    • non-streaming LLM answers
    • streaming LLM answers (chunked over HTTP)
    • Demonstrates how a backend service can expose the agent to external clients

🛠️ Tech Stack

  • Model Context Protocol (MCP) – structured tool calling using @modelcontextprotocol/sdk
  • OpenAI API – LLM responses + streaming output
  • Express 5 – simple HTTP layer
  • TypeScript – typed agent + server
  • Zod – schema validation
  • Firebase Firestore - for bookstore database

GitHub Branches

  • main – Production branch. This branch represents the stable and production-ready version of the code. It is used for deployments to the live environment.

  • dev – Development branch. This is the default branch for ongoing development work. It is where new features and bug fixes are implemented and tested before being merged into the main branch. It is used for deployments to the staging environment.

Development

Scripts

  • npm run dev:server – Run the MCP server in development mode with hot-reloading
  • npm run dev:agent – Run the Bookstore Agent in development mode with hot-reloading
  • npm run build – Compile the TypeScript code to JavaScript
  • npm run start:server – Start the MCP server in production mode
  • npm run start:agent – Start the Bookstore Agent in production mode
  • npm run seed:bookstore – Seed the Firestore database with mock bookstore data

Testing the MCP server locally using Claude Client

  1. Download Claud Desktop

  2. Locate the config file

From Claud App -> Settings > Developer -> Edit config

The path is probably:

code "$HOME/Library/Application Support/Claude/claude_desktop_config.json"
  1. Prepare the config file
# check the absolute path to the server
❯ pwd

Ensure Claude will run the correct version of Node:

which node
# should output smt like
> /Users/mistergreen/.nvm/versions/node/v22.17.0/bin/node

Use this path as command in the server config below (instead of using simply node)

Option A – Use the built JS file

If you run npm run build and want Claude to call the compiled JS:

{
  "mcpServers": {
    "demo-server": {
      "command": "/Users/mistergreen/.nvm/versions/node/v22.17.0/bin/node",
      "args": ["<ABSOLUTE-PATH>/dist/mcp-server/index.js"],
      "env": {
        "LOG_LEVEL": "info"
      }
    }
  }
}

Option B – Run TypeScript directly (good for dev)

If you don’t want to build every time, Claude can launch your server through tsx:

{
  "mcpServers": {
    "demo-server": {
      "command": "/Users/mistergreen/.nvm/versions/node/v22.17.0/bin/node",
      "args": ["<ABSOLUTE-PATH>/node_modules/tsx/dist/cli.js", "<ABSOLUTE-PATH>/src/mcp-server/index.ts"],
      "env": {
        "LOG_LEVEL": "info"
      }
    }
  }
}
  1. Test
  • Save the config.json.

  • Quit and restart Claude Desktop.

  • Testing tools: Start a new chat and try:

    • Use the add tool with a=2 and b=3
    • Claud should discover the add tool.
  1. Debug
  • From Claud App -> Settings > Developer -> Logs

Testing the agent API

  1. Start the MCP server
npm run dev:server
  1. Start the agent API
npm run dev:agent
  1. Send requests to the agent API

E.g. using curl:

curl -X POST http://localhost:5000/ask \
  -H "Content-Type: application/json" \
  -d '{"question": "Can you recommend me a sci-fi book?"}'

README fetched from the repository 13 hours ago. The original is authoritative.

Questions

About And AI Agent Bookstore

How do I install And AI Agent Bookstore?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is And AI Agent Bookstore safe to use with an AI agent?

Its trust score is 53 out of 100 (fair). It passes 3 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is And AI Agent Bookstore still maintained?

The last commit was 8 months ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.