Skip to content

Latest commit

 

History

History
140 lines (97 loc) · 3.76 KB

File metadata and controls

140 lines (97 loc) · 3.76 KB

Roast My Post MCP Server

A Model Context Protocol (MCP) server for fast database access to the Roast My Post system.

Features

This MCP server provides direct database access to Roast My Post, enabling fast queries and analytics without writing scripts.

For detailed documentation of all available tools and their parameters, see FEATURES.md.

Quick Setup

Run this single command to set up everything:

cd mcp-server
npm run setup

This will:

  1. Install dependencies
  2. Build the server
  3. Configure Claude Desktop automatically

After running setup, restart Claude Desktop to load the MCP server.

Manual Setup (if needed)

1. Install Dependencies

cd mcp-server
npm install

2. Build the Server

npm run build

3. Configure Claude Desktop

npm run configure

Or manually add to your Claude Desktop configuration:

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

{
  "mcpServers": {
    "roast-my-post": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-server/dist/index.js"],
      "env": {
        "DATABASE_URL": "your-database-url",
        "ROAST_MY_POST_MCP_USER_API_KEY": "rmp_your-api-key-here"
      }
    }
  }
}

Setting Up API Key Authentication

To enable mutation operations (creating agent versions and spawning batch jobs), you need to create an API key:

  1. Log into the RoastMyPost web interface
  2. Navigate to your user settings or API keys page
  3. Create a new API key with a descriptive name
  4. Copy the API key (you won't be able to see it again)
  5. Add it to your Claude Desktop configuration as shown above

The API key gives the MCP server the same permissions as your user account.

Usage Examples

Once configured, you can use these tools in Claude:

"Show me all active agents"
"Get failed evaluations for agent-123"
"What's the performance of the ASSESSOR agents over the last 30 days?"
"Search for documents by ozzie"
"Search for 'machine learning' in document content"

New Search Feature

The MCP server now includes a powerful search_documents tool that uses the server's search API:

  • Fast metadata search: Searches in titles, authors, platforms, URLs using the optimized searchableText field
  • Optional content search: Enable searchContent: true to search within document content
  • Pagination support: Use limit and offset for paginated results
  • No direct database access: Uses the server's /api/documents/search endpoint for consistency

Development

Running in Development Mode

npm run dev

This watches for changes and rebuilds automatically.

Adding New Tools

  1. Add the tool definition in the ListToolsRequestSchema handler
  2. Add the argument schema using Zod
  3. Implement the tool logic in the CallToolRequestSchema handler
  4. The tool will be automatically available in Claude after rebuilding

Testing the Server

You can test the server manually:

echo '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}' | node dist/index.js

Troubleshooting

  1. Database Connection Issues: Ensure DATABASE_URL is correct and the database is accessible
  2. Prisma Client Errors: The MCP server uses the parent project's Prisma client - rebuild if you see import errors
  3. Server Not Available in Claude: Check the config file path and restart Claude Desktop
  4. Permission Errors: Ensure the built file has execute permissions

Future Enhancements

  • Add write operations (update agent instructions, archive agents)
  • Implement caching for frequently accessed data
  • Add more analytical tools (trend analysis, comparison tools)
  • Support for batch operations
  • Real-time monitoring capabilities