A Smithery-compatible MCP (Model Context Protocol) server that exposes Relevance AI tools to MCP clients.
This server allows you to use your Relevance AI tools through any MCP-compatible client. Simply configure it with your Relevance AI credentials and the tool IDs you want to expose, and the server will dynamically register them as MCP tools.
- Dynamic Tool Registration: Automatically fetches and registers Relevance AI tools based on configuration
- Type-Safe Configuration: Uses Zod schemas for robust configuration validation
- Async Tool Execution: Handles Relevance AI's async job execution pattern
- Error Handling: Comprehensive error handling for API failures and timeouts
- Unit Tests: Includes Jest-based unit tests for configuration and server logic
- Node.js >= 18
- A Relevance AI account
- Relevance AI API credentials:
- API Key
- Region (e.g., "us", "au")
- Project UUID
- Tool IDs you want to expose
npm installThe server requires the following configuration parameters:
- apiKey: Your Relevance AI API key (found in Account > Integrations > Relevance API keys)
- region: Your Relevance AI region (e.g., "us", "au")
- project: Your Relevance AI project UUID
- toolIds: Array of Relevance AI tool IDs to expose as MCP tools
Run the server in development mode with Smithery:
npm run devThis will start the server and make it available through the Smithery Playground.
Run the unit tests:
npm testBuild the server for production:
npm run build- Create a GitHub repository and push your code:
git remote add origin https://github.com/YOUR_USERNAME/relevance_mcp.git
git push -u origin main- Go to Smithery and click "Deploy"
- Connect your GitHub repository
- Configure your Relevance AI credentials in the deployment settings
- Configuration: The server reads your Relevance AI credentials and tool IDs from the configuration
- Tool Discovery: On startup, it fetches metadata for each configured tool from the Relevance AI API
- Schema Mapping: It converts Relevance AI parameter schemas to MCP-compatible Zod schemas
- Tool Registration: Each Relevance AI tool is registered as an MCP tool
- Execution: When a tool is called:
- The server triggers the Relevance AI tool with the provided parameters
- It polls the job status until completion (max 60 seconds)
- The output is returned in MCP format
The RelevanceClient class handles all interactions with the Relevance AI API:
listTools(): Lists all available tools in your projectretrieveTool(toolId): Retrieves metadata for a specific toolexecuteTool(toolId, params): Triggers async execution of a toolgetJobStatus(toolId, jobId): Checks the status of a jobwaitForJobCompletion(toolId, jobId, timeout): Waits for a job to complete
src/
├── index.ts # Main MCP server implementation
├── relevance-client.ts # Relevance AI API client
test/
├── config.test.ts # Configuration schema tests
├── server.test.ts # Server logic tests
Make sure the tool ID exists in your Relevance AI project and is accessible with your API key.
Verify that your API key, region, and project UUID are correct. You can find these in your Relevance AI account under Account > Integrations.
The default timeout is 60 seconds. If your tool takes longer to execute, you may need to modify the timeout in relevance-client.ts.
Contributions are welcome! Please feel free to submit a Pull Request.
ISC