UNPKG

@toriihq/torii-mcp

Version:

Model Context Protocol server for Torii API

129 lines (95 loc) 2.61 kB
# Torii MCP Server This is a Model Context Protocol (MCP) server for https://toriihq.com. It provides a set of tools that can be used by AI assistants to interact with the Torii platform. ## Example for questions Here are some example questions you can ask an AI assistant that's connected to this MCP server: - Show me all the apps in my Torii instance - List users who have admin access - What contracts are expiring in the next 30 days? - Show me contracts with renewal dates in Q4 - List all apps that were added last month The AI assistant will use the appropriate MCP tools to fetch this information from your Torii instance and provide detailed responses. ## Setting up in AI Assistants ### Cursor 1. Open Cursor Settings 2. Go to the MCP tab 3. Click "Add new global MCP Server" 4. Select type "command" 5. Update the file with: ```json { "mcpServers": { "Torii MCP": { "command": "env", "args": [ "TORII_API_KEY=YOUR_API_KEY", "npx", "@toriihq/torii-mcp" ] } } } ``` 6. Click "Save" 7. You should now see the Torii API tools available in Cursor ### Claude Desktop 1. Open Claude Desktop Settings 2. Navigate to the "Developer" section 3. Click "Edit Config" 4. Update the claude_desktop_config.json with: ```json { "mcpServers": { "torii": { "command": "npx", "args": [ "@toriihq/torii-mcp" ], "env": { "TORII_API_KEY": "YOUR_API_KEY" } } } } ``` 5. Restart Calude Desktop 6. The Torii API tools should now be available in your Claude Desktop conversations # Developing ## Prerequisites - Node.js (v16 or higher) - A Torii API key - yarn package manager ## Installation 1. Clone this repository 2. Install dependencies: ```bash yarn install ``` 3. Build the project: ```bash yarn build ``` ## Configuration Set your Torii API key as an environment variable: ```bash export TORII_API_KEY=your_api_key_here ``` ## Usage Start the MCP server: ```bash yarn start ``` Or run it in development mode: ```bash yarn dev ``` The server will start and listen for MCP requests on stdin and respond on stdout. ## Development The server is built using the MCP SDK and follows the Torii API structure as defined in the Swagger documentation. ## Troubleshooting If you encounter any issues: 1. Ensure your API key is correctly set 2. Verify the absolute path to the `dist/index.js` file is correct 3. Check that the Node.js version requirement is met 4. Make sure the build process completed successfully ## License NONE