# Monocle MCP server

**Monocle** is a community-driven OSS framework for tracing GenAI app code governed as a [Linux Foundation AI & Data project](https://lfaidata.foundation/projects/monocle/) that helps developers and platform engineers building or managing GenAI apps monitor these in prod by making it easy to instrument their code to capture traces that are compliant with open-source cloud-native observability ecosystem.

## What is Monocle MCP server
The MCP server provided by monocle includes curated prompts and tools that help you enable Monocle tracing in your application and analyze the traces generated by Monocle.

## Use Monocle MCP

First install monocle-apptrace: pip install monocle-mcp

Open bash and run the following command to run the monocle mcp server with stdio:
monocle_apptrace

If you are using VS Code you can add following entry to your .vscode/mcp.json

```json
"monocle-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
         "monocle_apptrace"
      ],
      "env": {}
   }
```


