Metadata-Version: 2.4
Name: langobs-mcp
Version: 0.2.0
Summary: MCP server for LangObs — zero-code observability for MCP-native AI agents
Project-URL: Homepage, https://github.com/langobs/langobs
Project-URL: Repository, https://github.com/langobs/langobs
Project-URL: Documentation, https://github.com/langobs/langobs#readme
Project-URL: Bug Tracker, https://github.com/langobs/langobs/issues
Author: LangObs Contributors
License: MIT
Keywords: agents,ai,debugging,llm,mcp,model-context-protocol,observability
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: python-ulid>=2.7.0
Description-Content-Type: text/markdown

# langobs-mcp

MCP server for [LangObs](https://github.com/langobs/langobs) — zero-code observability for any MCP-compatible agent (Claude Desktop, Cursor, Windsurf, etc.).

Any agent that supports MCP can send traces to LangObs without installing the Python or TypeScript SDK.

## Install

```bash
pip install langobs-mcp
```

## Prerequisites

Start the LangObs server:

```bash
pip install langobs-server
langobs-server
```

## Configure in your MCP client

### Claude Desktop (`~/Library/Application Support/Claude/claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "langobs": {
      "command": "langobs-mcp"
    }
  }
}
```

### Cursor / Windsurf

Add to your MCP server config:

```json
{
  "langobs": {
    "command": "langobs-mcp"
  }
}
```

## Tools Exposed

Once connected, your MCP agent can call these tools:

| Tool | Description |
|------|-------------|
| `langobs_start_session` | Start a new debugging session. Returns a `session_id` to use in subsequent calls. |
| `langobs_report_trace` | Report a trace event (LLM call, tool call, decision, memory op, error). |
| `langobs_report_memory` | Report a memory state change (created, updated, accessed, deleted). |

## How It Works

The MCP server receives tool calls from your agent and forwards them to the LangObs HTTP server (`http://localhost:8766`). Events appear in the dashboard in real-time.

```
Agent → MCP call → langobs-mcp server → HTTP POST → LangObs server → Dashboard
```

## Example Usage (inside a Claude conversation)

Once the MCP server is connected, Claude can instrument its own tasks:

```
1. Call langobs_start_session → get session_id
2. For each tool call: langobs_report_trace(session_id, event_type="tool_call", ...)
3. For each LLM decision: langobs_report_trace(session_id, event_type="decision", ...)
```

Open `http://localhost:5173` to watch the trace build in real time.

## License

MIT
