MCP Inspector#
GraphQL MCP includes a built-in web-based inspector for testing and debugging your MCP tools.

What is the MCP Inspector?#
The MCP Inspector is a GraphiQL-integrated interface that lets you:
- ๐ Discover Tools - Browse all available MCP tools generated from your schema
- ๐งช Test Tools - Execute tools with custom parameters and see results
- ๐ Add Authentication - Test with Bearer tokens, API keys, or custom headers
- ๐ Track History - Review previous tool executions
- ๐ View Schemas - Inspect parameter and output schemas for each tool
- โก Real-time Status - Monitor connection status and availability
Enabling the Inspector#
Enable the inspector by setting graphql_http=True when creating your server. Works with any GraphQL library:
from graphql_mcp.server import GraphQLMCP
# With any GraphQL schema (Strawberry, Ariadne, Graphene, etc.)
server = GraphQLMCP(
schema=your_graphql_schema,
name="My API",
graphql_http=True # This enables both GraphQL and MCP Inspector
)
app = server.http_app()Example with Strawberry:
import strawberry
from graphql_mcp.server import GraphQLMCP
@strawberry.type
class Query:
@strawberry.field
def hello(self, name: str = "World") -> str:
return f"Hello, {name}!"
schema = strawberry.Schema(query=Query)
server = GraphQLMCP(schema=schema._schema, graphql_http=True)Accessing the Inspector#
Once your server is running, access the inspector by visiting your GraphQL endpoint in a web browser:
http://localhost:8000/graphqlThe inspector interface will automatically appear alongside the GraphiQL interface.
Using the Inspector#
1. Discover Available Tools#
The left panel shows all MCP tools generated from your GraphQL schema:
- Tool names (converted to snake_case)
- Tool descriptions from GraphQL docstrings
- Parameter information
2. Configure Authentication#
If your API requires authentication, use the authentication panel:
Bearer Token: your_token_hereOr add custom headers:
X-API-Key: your_key
Authorization: Bearer token3. Execute Tools#
- Select a tool from the list
- Fill in the parameters (JSON format)
- Click “Execute”
- View the results in the output panel
Example parameters:
{
"name": "Alice",
"age": 30
}4. Review Call History#
The inspector maintains a history of your tool calls:
- Timestamp of execution
- Tool name and parameters
- Results or errors
- Response time
Click on any previous call to:
- View the full request/response
- Re-execute with the same parameters
- Copy parameters for modification
5. Inspect Schemas#
Click the schema icon next to any tool to view:
- Input Schema - Required and optional parameters with types
- Output Schema - Expected return type structure
- Documentation - Description from GraphQL schema
Authentication Testing#
The inspector supports various authentication methods:
Bearer Tokens#
Bearer Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...API Keys#
Add as custom header:
X-API-Key: your_api_key_hereCustom Headers#
Any additional headers your API requires:
X-Custom-Auth: value
X-Request-ID: 123Example Workflow#
Here’s a typical testing workflow with the inspector:
Start Server with inspector enabled
server = GraphQLMCP(schema=your_schema, graphql_http=True) app = server.http_app()Open Browser to
http://localhost:8000/graphqlBrowse Tools in the inspector panel
Add Authentication if required
Test a Query Tool
- Select
get_user - Parameters:
{"id": "123"} - Click Execute
- View results
- Select
Test a Mutation Tool
- Select
create_user - Parameters:
{"name": "Alice", "email": "alice@example.com"} - Click Execute
- Verify creation
- Select
Review History to compare results
Export Parameters for use in your application
Inspector vs GraphiQL#
The inspector complements GraphiQL:
| Feature | GraphiQL | MCP Inspector |
|---|---|---|
| Purpose | Test GraphQL queries | Test MCP tools |
| Input Format | GraphQL query language | JSON parameters |
| Schema View | GraphQL SDL | MCP tool schemas |
| History | Query history | Tool call history |
| Use Case | GraphQL development | MCP integration testing |
You can use both simultaneously to test your API from both perspectives.
Disabling in Production#
For production deployments, disable the GraphQL HTTP endpoint:
server = GraphQLMCP(
schema=your_schema,
graphql_http=False # No GraphiQL or inspector in production
)This removes both GraphiQL and the MCP Inspector, leaving only the MCP endpoints.
Debugging Tips#
Tool Not Appearing#
- Check that the field is properly defined in your GraphQL schema
- Ensure the field has a description/docstring in the schema
- Verify mutations are enabled (
allow_mutations=True)
Authentication Errors#
- Verify token format (include “Bearer " prefix if required)
- Check token hasn’t expired
- Ensure auth configuration matches your API
Type Errors#
- Check parameter types match the schema
- Use proper JSON format for complex types
- Review the schema panel for expected types
Connection Issues#
- Verify server is running
- Check the correct port and path
- Look for CORS errors in browser console
Next Steps#
- Configuration - Configure inspector behavior
- Examples - See inspector in real workflows
- API Reference - Learn about MCP tool APIs