MCP Server

The Middleware MCP Server lets you access and interact with your Middleware observability data directly from AI assistants and vibe coding tools such as Claude, Cursor, VS Code, and other MCP-compatible clients.

Instead of switching between your IDE and the Middleware dashboard, you can use natural language to query metrics, investigate errors, analyze logs and traces, monitor frontend sessions, and manage dashboards.

The MCP Server connects your AI assistant to Middleware through the Model Context Protocol (MCP), allowing it to retrieve observability data and perform supported actions on your behalf.

With Middleware MCP Server, you can:

  • Query logs, metrics, and traces using natural language.
  • Investigate application errors and incidents.
  • Discover available metrics and monitored resources.
  • Analyze log patterns and retrieve related log samples.
  • Monitor RUM applications, sessions, and frontend errors.
  • Create, update, and manage dashboards and widgets.
  • Access Middleware data directly from your IDE or AI assistant.

How Middleware MCP Server Works#

Middleware MCP Server is a remotely hosted MCP server that connects supported AI assistants to your Middleware account.

When you ask a question, your AI assistant identifies the appropriate MCP tool, sends a structured request to Middleware, and returns the result.

AI Assistant / IDE ↓ Natural Language Request ↓ Middleware MCP Server ↓ Authenticate and Identify Project ↓ Middleware API ↓ Logs / Metrics / Traces / RUM / Dashboards ↓ Return Results to AI Assistant

The MCP Server exposes tools with defined names and input parameters, allowing AI assistants to make structured requests to Middleware.

Each request is authenticated using your access token and routed to the Middleware project selected during sign-in.

Supported AI Assistants and IDEs#

Connect Middleware MCP Server#

Middleware provides a hosted MCP endpoint, so you do not need to deploy or maintain your own MCP server.

MCP Server URL:#

https://mcp.middleware.io/mcp

To connect:

  1. Open your preferred MCP-compatible AI assistant or IDE.
  2. Add Middleware as an MCP server using the endpoint above.
  3. Complete the authentication process in your browser.
  4. Sign in to your Middleware account.
  5. Select the Middleware project you want to access.
  6. Return to your AI assistant and start querying your observability data.

Once connected, your assistant can use the available Middleware MCP tools to retrieve data and perform supported operations.

For client-specific installation instructions, see Middleware MCP Server Setup.

What You Can Do with Middleware MCP Server#

Middleware MCP Server provides 24 tools across six areas, allowing AI assistants to interact with your observability data.

1. Query Metrics, Logs, and Traces#

Use natural language to query telemetry collected from your applications and infrastructure.

You can discover available metrics and resources, retrieve logs, and query application traces without manually navigating the Middleware UI.

Example questions:

  • Show me errors from the last hour.
  • Query CPU usage for the checkout service.
  • What metrics are available for my application?
  • Show traces related to my backend service.

The AI assistant selects the appropriate Middleware MCP tool and retrieves the requested data.

2. Investigate Errors and Incidents#

Use MCP tools to retrieve application errors and incidents from Middleware.

You can list detected errors, open incident details, and review available information to understand the problem.

Example questions:

  • List recent application errors.
  • Show details of the latest incident.
  • Which errors were detected in my application?
  • Show me the details of a specific error.

This helps developers access error information directly from their development environment.

3. Analyze Log Patterns#

Middleware MCP Server provides tools to group logs into patterns and retrieve sample log entries.

Use these tools to identify recurring log messages and investigate related activity over a selected time window.

Example questions:

  • Show the most common log patterns from the last hour.
  • Find recurring error logs.
  • Retrieve sample logs for a specific pattern.
  • What log patterns appeared during the incident?

Results can include deep links to Middleware, allowing you to open the relevant data for further investigation.

4. Monitor Frontend Applications with RUM#

Access Real User Monitoring data directly from your AI assistant.

Middleware MCP Server supports retrieving:

  • RUM applications
  • User sessions
  • Frontend errors
  • Session replay links

Example questions:

  • List my RUM applications.
  • Show recent frontend errors.
  • Find sessions associated with an application.
  • Show user sessions related to an error.

When available, session replay links let you open the relevant session in Middleware for further investigation.

5. Manage Dashboards#

Use MCP tools to manage Middleware dashboards directly from your AI assistant.

Supported operations include:

  • List dashboards
  • Read dashboard information
  • Create dashboards
  • Update dashboards
  • Delete dashboards
  • Clone dashboards
  • Favorite dashboards

Example questions:

  • List all my dashboards.
  • Create a dashboard for infrastructure monitoring.
  • Clone an existing dashboard.
  • Update a dashboard configuration.

This allows you to manage supported dashboard operations through natural language instead of manually configuring each action in the Middleware UI.

6. Manage Dashboard Widgets#

Middleware MCP Server also provides tools to manage dashboard widgets.

You can:

  • List widgets
  • Create widgets
  • Update widgets
  • Delete widgets
  • Retrieve widget data
  • Adjust widget layout

Example questions:

  • Show the widgets in my dashboard.
  • Add a widget to my dashboard.
  • Fetch data for a specific widget.
  • Update the layout of dashboard widgets.

For the complete list of supported tools and their parameters, see Middleware MCP Tools.

Example: Investigate an Application Error from Your IDE#

Suppose your application starts returning errors and you want to investigate them without leaving your development environment.

  1. Open your AI assistant with Middleware MCP Server connected.
  2. Ask: Show me application errors from the last hour.
  3. The assistant calls the relevant Middleware MCP tool to retrieve error information.
  4. Review the returned errors and identify the affected application.
  5. Ask a follow-up question: Show me logs and traces related to this error.
  6. Review the available telemetry to continue troubleshooting.

This workflow helps you access production observability data while working in your IDE.

Authentication and Project Access#

Middleware MCP Server uses authentication to control access to your observability data.

When connecting a client:

  1. You authenticate through your Middleware account.
  2. Select the project you want to access.
  3. The MCP Server uses your access token to authenticate requests.
  4. Requests are routed to the selected project.
  5. The server returns data associated with your authorized account and project.

This keeps MCP requests scoped to your Middleware data.

Next Steps#

Need assistance or want to learn more about Middleware? Get in touch with us via our Contact Us or join our Slack channel.

What did you think of this content?