npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@answerai/answeragent-mcp

v1.0.1

Published

A lightweight Model Context Protocol (MCP) server for Answer AI chatflow and document store management

Readme

@answerai/answeragent-mcp

npm version

A lightweight Model Context Protocol (MCP) server for Answer AI chatflow and document store management. This server exposes Answer AI's powerful features through standardized MCP tools and prompts, allowing you to manage chatflows, document stores, assistants, and more directly from your MCP-compatible AI clients.

Installation

Install globally via npm:

npm install -g @answerai/answeragent-mcp

Or use with npx (no installation required):

npx @answerai/answeragent-mcp

Quick Start

  1. Get Your Answer AI Credentials:

    • API Base URL (e.g., https://your-instance.studio.theanswer.ai)
    • API Token (JWT token from your Answer AI instance)
  2. Test the Server:

    npx @modelcontextprotocol/inspector @answerai/answeragent-mcp

Client Configuration

Cursor IDE

Add this configuration to your ~/.cursor/mcp.json file:

{
  "mcpServers": {
    "answerai-mcp": {
      "command": "node",
      "args": [
        "/path/to/your/project/dist/index.js"
      ],
      "env": {
        "ANSWERAGENT_AI_API_BASE_URL": "https://your-instance.studio.theanswer.ai",
        "ANSWERAGENT_AI_API_TOKEN": "your-jwt-token-here"
      }
    }
  }
}

For NPM installed version:

{
  "mcpServers": {
    "answerai-mcp": {
      "command": "npx",
      "args": ["@answerai/answeragent-mcp"],
      "env": {
        "ANSWERAGENT_AI_API_BASE_URL": "https://your-instance.studio.theanswer.ai",
        "ANSWERAGENT_AI_API_TOKEN": "your-jwt-token-here"
      }
    }
  }
}

Claude Desktop

Add this to your Claude Desktop MCP settings file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "answerai": {
      "command": "npx",
      "args": ["@answerai/answeragent-mcp"],
      "env": {
        "ANSWERAGENT_AI_API_BASE_URL": "https://your-instance.studio.theanswer.ai",
        "ANSWERAGENT_AI_API_TOKEN": "your-jwt-token-here"
      }
    }
  }
}

Other MCP Clients (Cline, etc.)

Most MCP clients follow the same pattern:

{
  "command": "npx",
  "args": ["@answerai/answeragent-mcp"],
  "env": {
    "ANSWERAGENT_AI_API_BASE_URL": "https://your-instance.studio.theanswer.ai",
    "ANSWERAGENT_AI_API_TOKEN": "your-jwt-token-here"
  }
}

Configuration

The server requires two environment variables:

  • ANSWERAGENT_AI_API_BASE_URL: Your Answer AI instance base URL (without /api/v1)
  • ANSWERAGENT_AI_API_TOKEN: Your Answer AI JWT authentication token

Important:

  • Don't include /api/v1 in the base URL - the server adds this automatically
  • Make sure you're using a JWT token, not an API key
  • The token must have appropriate permissions for the operations you want to perform

Available Tools

Chatflow Management

  • create_chatflow - Create new chatflows
  • get_chatflow - Retrieve chatflow details
  • update_chatflow - Update existing chatflows
  • delete_chatflow - Remove chatflows
  • list_chatflows - List all chatflows

Document Store Management

  • create_document_store - Create document stores
  • get_document_store - Get store details
  • delete_document_store - Remove document stores
  • list_document_stores - List all stores
  • query_vector_store - Query document stores
  • upsert_document - Add/update documents
  • refresh_document_store - Refresh store contents

Assistant Management

  • create_assistant - Create AI assistants
  • get_assistant - Get assistant details
  • update_assistant - Update assistants
  • delete_assistant - Remove assistants
  • list_assistants - List all assistants

Tool Management

  • create_tool - Create custom tools
  • get_tool - Get tool details
  • update_tool - Update tools
  • delete_tool - Remove tools
  • list_tools - List all tools

Document Loader Management

  • get_loader_chunks - Get document chunks
  • update_loader_chunk - Update chunks
  • delete_loader_chunk - Remove chunks
  • delete_loader - Remove loaders

Intelligent Prompts

The server provides AI-powered prompts for advanced analysis and management:

analyze_chatflow

Analyzes chatflow configuration and provides optimization recommendations.

Arguments:

  • chatflowId (required): The chatflow ID to analyze
  • focusAreas (optional): Array of specific areas to focus on

analyze_document_store

Analyzes document store configuration, loaders, and usage patterns.

Arguments:

  • documentStoreId (required): The document store ID to analyze
  • focusAreas (optional): Array of specific areas to focus on

manage_document_store

Provides step-by-step guidance for document store operations.

Arguments:

  • action (required): One of "setup", "optimize", "troubleshoot", "migrate"
  • documentStoreId (optional): Target document store ID
  • context (optional): Additional context for the operation

Usage Examples

With Cursor IDE

After configuring in Cursor, you can use natural language commands:

  1. List your chatflows:

    "Show me all my Answer AI chatflows"

  2. Analyze a specific chatflow:

    "Analyze the 'RDS Call Analysis' chatflow and suggest optimizations"

  3. Create a document store:

    "Create a new document store called 'Customer Support KB' for storing help articles"

  4. Query documents:

    "Search my 'Contracts' document store for information about payment terms"

With Claude Desktop

After adding to your Claude Desktop configuration:

  1. Analyze a chatflow:

    "Please analyze my chatflow with ID 'df23d39c-a25b-4842-8997-dce3afed88f4' and focus on performance optimization"

  2. Document store management:

    "Help me troubleshoot my document store that's not syncing properly"

  3. Assistant management:

    "Show me details about my 'Document Reader' assistant and suggest improvements"

With MCP Inspector

Test and explore the server capabilities:

npx @modelcontextprotocol/inspector @answerai/answeragent-mcp

Troubleshooting

Common Issues

  1. 401 Unauthorized Error:

    • Check that your JWT token is valid and not expired
    • Ensure you're using a JWT token, not an API key
    • Verify the token has the necessary permissions
  2. Connection Issues:

    • Confirm your base URL is correct (without /api/v1)
    • Check that your Answer AI instance is accessible
    • Verify environment variables are set correctly
  3. Tool Not Found:

    • Restart your MCP client after configuration changes
    • Check the server logs for any startup errors
    • Verify the package is properly installed

Requirements

  • Node.js 18+
  • Valid Answer AI JWT token with appropriate permissions
  • MCP-compatible client (Claude Desktop, Cursor, Cline, etc.)

Support

For issues and feature requests, visit our GitHub repository.

License

ISC