This guide provides detailed instructions for integrating AutoSpectra MCP Server with Smithery AI, allowing AI agents to leverage advanced browser automation and testing capabilities.
Smithery AI is a platform that allows the creation of AI agents with tool-use capabilities. By integrating AutoSpectra MCP Server, these agents gain access to visible browser automation, test generation, accessibility testing, and more.
First, ensure your AutoSpectra MCP Server is properly set up and working:
# Clone the repository (if you haven't already)
git clone https://github.com/autospectra/autospectra-mcp-server.git
cd autospectra-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
Before integrating with Smithery AI, verify that your server works correctly:
# Run the server
node build/index.js
The server should start without errors and be ready to handle MCP requests.
If you don’t already have one, create a Smithery AI account.
In the Smithery AI dashboard:
Name: autospectra
Display Name: AutoSpectra Browser Automation
Description: Browser automation and testing with visible feedback
There are two options for configuring the endpoint:
For local testing, you can expose your local server using a service like ngrok:
# Install ngrok if you don't have it
npm install -g ngrok
# Expose your local server
ngrok http 3000
Use the provided ngrok URL as your endpoint in Smithery AI.
For production use, deploy the AutoSpectra MCP Server to a cloud provider:
DEBUG=true
HEADLESS=false
SLOW_MO=500
For each tool you want to expose to your Smithery AI agent, define the input schema:
{
"name": "navigate",
"description": "Navigate to a URL",
"parameters": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "URL to navigate to"
}
},
"required": ["url"]
}
}
{
"name": "click",
"description": "Click on an element",
"parameters": {
"type": "object",
"properties": {
"selector": {
"type": "string",
"description": "CSS selector of the element"
}
},
"required": ["selector"]
}
}
{
"name": "type",
"description": "Type text into an input field",
"parameters": {
"type": "object",
"properties": {
"selector": {
"type": "string",
"description": "CSS selector of the input field"
},
"text": {
"type": "string",
"description": "Text to type"
},
"clearFirst": {
"type": "boolean",
"description": "Clear the field before typing"
}
},
"required": ["selector", "text"]
}
}
{
"name": "extract",
"description": "Extract data from an element",
"parameters": {
"type": "object",
"properties": {
"selector": {
"type": "string",
"description": "CSS selector of the element"
},
"attribute": {
"type": "string",
"description": "Attribute to extract (default: textContent)"
}
},
"required": ["selector"]
}
}
{
"name": "screenshot",
"description": "Take a screenshot",
"parameters": {
"type": "object",
"properties": {
"fullPage": {
"type": "boolean",
"description": "Whether to take a full page screenshot"
}
}
}
}
{
"name": "check_accessibility",
"description": "Run accessibility tests on the current page",
"parameters": {
"type": "object",
"properties": {
"rules": {
"type": "array",
"items": {
"type": "string"
},
"description": "Specific accessibility rules to check"
},
"includeHidden": {
"type": "boolean",
"description": "Whether to include hidden elements in the test"
}
}
}
}
{
"name": "api_request",
"description": "Make an HTTP request to an API endpoint",
"parameters": {
"type": "object",
"properties": {
"method": {
"type": "string",
"description": "HTTP method (GET, POST, PUT, DELETE, etc.)"
},
"url": {
"type": "string",
"description": "API endpoint URL"
},
"headers": {
"type": "object",
"description": "Request headers"
},
"data": {
"type": "object",
"description": "Request body data"
},
"params": {
"type": "object",
"description": "URL parameters"
},
"auth": {
"type": "object",
"description": "Authentication details"
},
"validateStatus": {
"type": "boolean",
"description": "Whether to validate the status code"
},
"timeout": {
"type": "number",
"description": "Request timeout in milliseconds"
}
},
"required": ["method", "url"]
}
}
{
"name": "validate_schema",
"description": "Validate an API response against a JSON schema",
"parameters": {
"type": "object",
"properties": {
"response": {
"type": "object",
"description": "API response to validate"
},
"schema": {
"type": "object",
"description": "JSON schema to validate against"
},
"schemaPath": {
"type": "string",
"description": "Path to schema file"
}
},
"required": ["response"]
}
}
{
"name": "create_mock",
"description": "Create a mock API endpoint for testing",
"parameters": {
"type": "object",
"properties": {
"endpoint": {
"type": "string",
"description": "Endpoint path to mock"
},
"method": {
"type": "string",
"description": "HTTP method"
},
"response": {
"type": "object",
"description": "Mock response"
},
"statusCode": {
"type": "number",
"description": "Response status code"
}
},
"required": ["endpoint", "method", "response"]
}
}
{
"name": "graphql_request",
"description": "Make a GraphQL request",
"parameters": {
"type": "object",
"properties": {
"endpoint": {
"type": "string",
"description": "GraphQL API endpoint"
},
"query": {
"type": "string",
"description": "GraphQL query"
},
"variables": {
"type": "object",
"description": "Query variables"
},
"headers": {
"type": "object",
"description": "Request headers"
},
"auth": {
"type": "object",
"description": "Authentication details"
}
},
"required": ["endpoint", "query"]
}
}
{
"name": "generate_tests",
"description": "Generate test cases for an application",
"parameters": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "URL of the application to analyze"
},
"framework": {
"type": "string",
"description": "Test framework to use (e.g., playwright, mocha, jest)"
},
"style": {
"type": "string",
"description": "Test style (e.g., bdd, tdd)"
},
"format": {
"type": "string",
"description": "Output format (e.g., javascript, typescript)"
},
"prompt": {
"type": "string",
"description": "Description of the test scenarios to generate"
}
},
"required": ["url", "prompt"]
}
}
Once configured, test the integration by asking your Smithery AI agent to perform a simple browser automation task:
Example prompt:
Navigate to https://example.com and take a screenshot
The agent should use the AutoSpectra tools to navigate to the URL and capture a screenshot, returning the results to you.
Smithery AI offers advanced configuration options that can enhance the AutoSpectra integration:
To maintain browser state between tool calls:
{
"sessionPersistence": true,
"sessionTimeout": 300
}
Restrict which tools the agent can use without user confirmation:
{
"toolPermissions": {
"navigate": "auto",
"screenshot": "auto",
"extract": "auto",
"click": "confirm",
"type": "confirm"
}
}
HEADLESS=false
is set in your environment variablesSLOW_MO
setting for better performance vs. visibility tradeoffIf you encounter issues with the integration, please:
When integrating with Smithery AI, consider the following security aspects:
After successfully integrating with Smithery AI, consider:
For more information, refer to the AutoSpectra full documentation and the Smithery AI API documentation.