Skip to main content

Using Siren MCP with Other Clients

The Siren MCP server is compatible with any client that supports the Model Context Protocol standard. Here are configuration examples for popular MCP-compatible platforms:

5ire Desktop

Configure in 5ire’s MCP settings:
{
  "servers": {
    "siren": {
      "command": "npx",
      "args": ["-y", "@trysiren/mcp", "--tools=all", "--api-key=YOUR_SIREN_API_KEY"]
    }
  }
}

FLUJO

Add to FLUJO’s workflow configuration:
{
  "mcp_servers": {
    "siren": {
      "command": "npx -y @trysiren/mcp --tools=all --api-key=YOUR_SIREN_API_KEY"
    }
  }
}

Zed Editor

Configure in Zed’s assistant settings:
{
  "assistant": {
    "mcp_servers": {
      "siren": {
        "command": "npx",
        "args": ["-y", "@trysiren/mcp", "--tools=all", "--api-key=YOUR_SIREN_API_KEY"]
      }
    }
  }
}
    func=lambda x: siren_mcp("messaging.send", **x),
    description="Send messages via Siren"
)

# Initialize the agent
llm = ChatOpenAI(temperature=0)
tools = [siren_tool]
agent = initialize_agent(tools, llm, agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION, verbose=True)

# Use the agent
agent.run("Send a test email to test@example.com")

3. Custom Implementation

Here’s a basic example of how to implement an MCP client in Python:
import requests
import json

class SirenMCPClient:
    def __init__(self, api_key: str, base_url: str = "https://api.trysiren.io/v1/mcp"):
        self.base_url = base_url
        self.headers = {
            "Authorization": f"Bearer {api_key}",
            "Content-Type": "application/json"
        }
    
    def call_tool(self, tool_name: str, **params):
        response = requests.post(
            f"{self.base_url}/tools/{tool_name}",
            headers=self.headers,
            json=params
        )
        response.raise_for_status()
        return response.json()

# Example usage
client = SirenMCPClient(api_key="YOUR_SIREN_API_KEY")
result = client.call_tool(
    "messaging.send",
    channel="email",
    to="user@example.com",
    subject="Hello",
    body="This is a test message"
)
print(result)

Authentication

Siren MCP uses API key authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_SIREN_API_KEY

Rate Limiting

  • Default rate limit: 60 requests per minute
  • Response headers include rate limit information:
    • X-RateLimit-Limit: Maximum requests allowed
    • X-RateLimit-Remaining: Remaining requests in the window
    • X-RateLimit-Reset: Time when the limit resets (UTC timestamp)

Error Handling

Handle these common HTTP status codes:
  • 200 OK: Request successful
  • 400 Bad Request: Invalid request parameters
  • 401 Unauthorized: Invalid or missing API key
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Resource not found
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: Server error

Best Practices

  1. Error Handling: Implement retry logic for transient failures
  2. Timeouts: Set appropriate timeouts for API calls
  3. Logging: Log all API interactions for debugging
  4. Security: Never expose API keys in client-side code
  5. Monitoring: Track API usage and error rates