021-mcp 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,155 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ /lib/
18
+ /lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # PyInstaller
28
+ *.manifest
29
+ *.spec
30
+
31
+ # Installer logs
32
+ pip-log.txt
33
+ pip-delete-this-directory.txt
34
+
35
+ # Unit test / coverage reports
36
+ htmlcov/
37
+ .tox/
38
+ .coverage
39
+ .coverage.*
40
+ .cache
41
+ nosetests.xml
42
+ coverage.xml
43
+ *.cover
44
+ .hypothesis/
45
+ .pytest_cache/
46
+
47
+ # Translations
48
+ *.mo
49
+ *.pot
50
+
51
+ # Django stuff:
52
+ *.log
53
+ local_settings.py
54
+
55
+ # Flask stuff:
56
+ instance/
57
+ .webassets-cache
58
+
59
+ # Scrapy stuff:
60
+ .scrapy
61
+
62
+ # Sphinx documentation
63
+ docs/_build/
64
+
65
+ # PyBuilder
66
+ target/
67
+
68
+ # Jupyter Notebook
69
+ .ipynb_checkpoints
70
+
71
+ # pyenv
72
+ .python-version
73
+
74
+ # celery beat schedule file
75
+ celerybeat-schedule
76
+
77
+ # SageMath parsed files
78
+ *.sage.py
79
+
80
+ # Environments
81
+ .env
82
+ .venv
83
+ env/
84
+ venv/
85
+ ENV/
86
+ env.bak/
87
+ venv.bak/
88
+
89
+ # Spyder project settings
90
+ .spyderproject
91
+ .spyproject
92
+
93
+ # Rope project settings
94
+ .ropeproject
95
+
96
+ # mkdocs documentation
97
+ /site
98
+
99
+ # mypy
100
+ .mypy_cache/
101
+
102
+ # IDE
103
+ .idea/
104
+ .vscode/
105
+ *.swp
106
+ *.swo
107
+ *~
108
+
109
+ # Project specific
110
+ logs/
111
+ checkpoints/
112
+ *.log
113
+ config.json
114
+
115
+ # SQLite databases
116
+ *.db
117
+ *.sqlite
118
+ *.sqlite3
119
+
120
+ # Docker
121
+ docker/logs/
122
+ docker/checkpoints/
123
+
124
+ # Weights & Biases
125
+ wandb/
126
+
127
+ # TensorBoard
128
+ /runs/
129
+
130
+ # API keys (never commit these!)
131
+ .env.local
132
+ .env.*.local
133
+ secrets.json
134
+ credentials.json
135
+
136
+ # OS
137
+ .DS_Store
138
+ Thumbs.db
139
+
140
+ # Temporary files
141
+ tmp/
142
+ temp/
143
+ *.tmp
144
+
145
+ # Config with secrets
146
+ configs/default.json
147
+ infrastructure/supabase/volumes/
148
+
149
+ # Node modules
150
+ node_modules/
151
+ web/frontend/node_modules/
152
+ data/
153
+
154
+ # Claude Code local preferences
155
+ CLAUDE.local.md
021_mcp-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,185 @@
1
+ Metadata-Version: 2.4
2
+ Name: 021-mcp
3
+ Version: 0.1.0
4
+ Summary: MCP server for interacting with LLM traces - search, analyze, and debug your AI agent executions
5
+ Author: 021 Labs
6
+ License: MIT
7
+ Keywords: ai-agents,debugging,llm,mcp,observability,traces
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Software Development :: Debuggers
16
+ Classifier: Topic :: System :: Monitoring
17
+ Requires-Python: >=3.10
18
+ Requires-Dist: httpx>=0.27.0
19
+ Requires-Dist: mcp>=1.0.0
20
+ Requires-Dist: pydantic>=2.5.0
21
+ Provides-Extra: dev
22
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
23
+ Requires-Dist: pytest>=7.4.0; extra == 'dev'
24
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
25
+ Description-Content-Type: text/markdown
26
+
27
+ # 021-mcp
28
+
29
+ MCP server for interacting with LLM traces. Search, analyze, and debug your AI agent executions through any MCP-compatible client.
30
+
31
+ ## Installation
32
+
33
+ ```bash
34
+ pip install 021-mcp
35
+ ```
36
+
37
+ Or with [uvx](https://docs.astral.sh/uv/):
38
+
39
+ ```bash
40
+ uvx 021-mcp
41
+ ```
42
+
43
+ ## Configuration
44
+
45
+ ### Environment Variables
46
+
47
+ | Variable | Required | Description |
48
+ |----------|----------|-------------|
49
+ | `TRACES_API_KEY` | Yes | Your API key for authentication |
50
+ | `TRACES_BASE_URL` | No | Base URL of the traces API (default: `https://api.021.dev`) |
51
+
52
+ ### Claude Desktop
53
+
54
+ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
55
+
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "traces": {
60
+ "command": "uvx",
61
+ "args": ["021-mcp"],
62
+ "env": {
63
+ "TRACES_API_KEY": "your-api-key-here"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ ```
69
+
70
+ ### Manus
71
+
72
+ Add to your Manus MCP configuration:
73
+
74
+ ```json
75
+ {
76
+ "servers": {
77
+ "traces": {
78
+ "command": "uvx",
79
+ "args": ["021-mcp"],
80
+ "env": {
81
+ "TRACES_API_KEY": "your-api-key-here"
82
+ }
83
+ }
84
+ }
85
+ }
86
+ ```
87
+
88
+ ### Cursor / Other MCP Clients
89
+
90
+ Most MCP clients support a similar configuration format. The key elements are:
91
+
92
+ - **command**: `uvx` (or `python -m mcp_traces.server` if installed via pip)
93
+ - **args**: `["021-mcp"]`
94
+ - **env**: Must include `TRACES_API_KEY`
95
+
96
+ ## Available Tools
97
+
98
+ ### `list_traces`
99
+
100
+ List traces with optional filters.
101
+
102
+ **Parameters:**
103
+ - `status` - Filter by status: SUCCESS, ERROR, or RUNNING
104
+ - `search` - Full-text search query
105
+ - `start_time` - Filter traces after this ISO timestamp
106
+ - `end_time` - Filter traces before this ISO timestamp
107
+ - `session_id` - Filter by session ID
108
+ - `user_id` - Filter by user ID
109
+ - `project_id` - Filter by project ID
110
+ - `limit` - Maximum results (1-100, default 20)
111
+
112
+ **Example usage:**
113
+ > "Show me the last 10 traces that failed"
114
+ > "Find traces from yesterday that mention 'database'"
115
+
116
+ ### `get_trace`
117
+
118
+ Get detailed information about a specific trace.
119
+
120
+ **Parameters:**
121
+ - `trace_id` - The trace ID to fetch
122
+ - `include_io` - Include full input/output data (default: false)
123
+
124
+ **Example usage:**
125
+ > "Get details for trace abc123"
126
+ > "Show me trace xyz789 with all the LLM inputs and outputs"
127
+
128
+ ### `get_span`
129
+
130
+ Get full details for a specific span including input/output.
131
+
132
+ **Parameters:**
133
+ - `span_id` - The span ID to fetch
134
+
135
+ **Example usage:**
136
+ > "What was the input to span def456?"
137
+ > "Show me the LLM response in span ghi789"
138
+
139
+ ### `get_analytics`
140
+
141
+ Get analytics summary for traces.
142
+
143
+ **Parameters:**
144
+ - `start_time` - Start of time range
145
+ - `end_time` - End of time range
146
+ - `granularity` - hour, day, or week (default: day)
147
+ - `project_id` - Filter by project ID
148
+
149
+ **Example usage:**
150
+ > "Show me trace analytics for the last week"
151
+ > "What's the error rate for project X?"
152
+
153
+ ### `search_errors`
154
+
155
+ Find recent traces that ended in errors.
156
+
157
+ **Parameters:**
158
+ - `limit` - Maximum results (default: 10)
159
+ - `start_time` - Filter errors after this timestamp
160
+ - `project_id` - Filter by project ID
161
+
162
+ **Example usage:**
163
+ > "Find recent errors"
164
+ > "What failed in the last hour?"
165
+
166
+ ## Development
167
+
168
+ ```bash
169
+ # Clone and install
170
+ git clone https://github.com/021labs/rl.git
171
+ cd rl/packages/mcp
172
+
173
+ # Install dependencies
174
+ uv sync
175
+
176
+ # Run locally
177
+ uv run 021-mcp
178
+
179
+ # Run tests
180
+ uv run pytest
181
+ ```
182
+
183
+ ## License
184
+
185
+ MIT
@@ -0,0 +1,159 @@
1
+ # 021-mcp
2
+
3
+ MCP server for interacting with LLM traces. Search, analyze, and debug your AI agent executions through any MCP-compatible client.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install 021-mcp
9
+ ```
10
+
11
+ Or with [uvx](https://docs.astral.sh/uv/):
12
+
13
+ ```bash
14
+ uvx 021-mcp
15
+ ```
16
+
17
+ ## Configuration
18
+
19
+ ### Environment Variables
20
+
21
+ | Variable | Required | Description |
22
+ |----------|----------|-------------|
23
+ | `TRACES_API_KEY` | Yes | Your API key for authentication |
24
+ | `TRACES_BASE_URL` | No | Base URL of the traces API (default: `https://api.021.dev`) |
25
+
26
+ ### Claude Desktop
27
+
28
+ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "traces": {
34
+ "command": "uvx",
35
+ "args": ["021-mcp"],
36
+ "env": {
37
+ "TRACES_API_KEY": "your-api-key-here"
38
+ }
39
+ }
40
+ }
41
+ }
42
+ ```
43
+
44
+ ### Manus
45
+
46
+ Add to your Manus MCP configuration:
47
+
48
+ ```json
49
+ {
50
+ "servers": {
51
+ "traces": {
52
+ "command": "uvx",
53
+ "args": ["021-mcp"],
54
+ "env": {
55
+ "TRACES_API_KEY": "your-api-key-here"
56
+ }
57
+ }
58
+ }
59
+ }
60
+ ```
61
+
62
+ ### Cursor / Other MCP Clients
63
+
64
+ Most MCP clients support a similar configuration format. The key elements are:
65
+
66
+ - **command**: `uvx` (or `python -m mcp_traces.server` if installed via pip)
67
+ - **args**: `["021-mcp"]`
68
+ - **env**: Must include `TRACES_API_KEY`
69
+
70
+ ## Available Tools
71
+
72
+ ### `list_traces`
73
+
74
+ List traces with optional filters.
75
+
76
+ **Parameters:**
77
+ - `status` - Filter by status: SUCCESS, ERROR, or RUNNING
78
+ - `search` - Full-text search query
79
+ - `start_time` - Filter traces after this ISO timestamp
80
+ - `end_time` - Filter traces before this ISO timestamp
81
+ - `session_id` - Filter by session ID
82
+ - `user_id` - Filter by user ID
83
+ - `project_id` - Filter by project ID
84
+ - `limit` - Maximum results (1-100, default 20)
85
+
86
+ **Example usage:**
87
+ > "Show me the last 10 traces that failed"
88
+ > "Find traces from yesterday that mention 'database'"
89
+
90
+ ### `get_trace`
91
+
92
+ Get detailed information about a specific trace.
93
+
94
+ **Parameters:**
95
+ - `trace_id` - The trace ID to fetch
96
+ - `include_io` - Include full input/output data (default: false)
97
+
98
+ **Example usage:**
99
+ > "Get details for trace abc123"
100
+ > "Show me trace xyz789 with all the LLM inputs and outputs"
101
+
102
+ ### `get_span`
103
+
104
+ Get full details for a specific span including input/output.
105
+
106
+ **Parameters:**
107
+ - `span_id` - The span ID to fetch
108
+
109
+ **Example usage:**
110
+ > "What was the input to span def456?"
111
+ > "Show me the LLM response in span ghi789"
112
+
113
+ ### `get_analytics`
114
+
115
+ Get analytics summary for traces.
116
+
117
+ **Parameters:**
118
+ - `start_time` - Start of time range
119
+ - `end_time` - End of time range
120
+ - `granularity` - hour, day, or week (default: day)
121
+ - `project_id` - Filter by project ID
122
+
123
+ **Example usage:**
124
+ > "Show me trace analytics for the last week"
125
+ > "What's the error rate for project X?"
126
+
127
+ ### `search_errors`
128
+
129
+ Find recent traces that ended in errors.
130
+
131
+ **Parameters:**
132
+ - `limit` - Maximum results (default: 10)
133
+ - `start_time` - Filter errors after this timestamp
134
+ - `project_id` - Filter by project ID
135
+
136
+ **Example usage:**
137
+ > "Find recent errors"
138
+ > "What failed in the last hour?"
139
+
140
+ ## Development
141
+
142
+ ```bash
143
+ # Clone and install
144
+ git clone https://github.com/021labs/rl.git
145
+ cd rl/packages/mcp
146
+
147
+ # Install dependencies
148
+ uv sync
149
+
150
+ # Run locally
151
+ uv run 021-mcp
152
+
153
+ # Run tests
154
+ uv run pytest
155
+ ```
156
+
157
+ ## License
158
+
159
+ MIT
@@ -0,0 +1,52 @@
1
+ [project]
2
+ name = "021-mcp"
3
+ version = "0.1.0"
4
+ description = "MCP server for interacting with LLM traces - search, analyze, and debug your AI agent executions"
5
+ readme = "README.md"
6
+ license = { text = "MIT" }
7
+ requires-python = ">=3.10"
8
+ authors = [{ name = "021 Labs" }]
9
+ keywords = ["mcp", "traces", "llm", "observability", "debugging", "ai-agents"]
10
+ classifiers = [
11
+ "Development Status :: 4 - Beta",
12
+ "Intended Audience :: Developers",
13
+ "License :: OSI Approved :: MIT License",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3.10",
16
+ "Programming Language :: Python :: 3.11",
17
+ "Programming Language :: Python :: 3.12",
18
+ "Topic :: Software Development :: Debuggers",
19
+ "Topic :: System :: Monitoring",
20
+ ]
21
+
22
+ dependencies = [
23
+ "mcp>=1.0.0",
24
+ "httpx>=0.27.0",
25
+ "pydantic>=2.5.0",
26
+ ]
27
+
28
+ [project.optional-dependencies]
29
+ dev = [
30
+ "pytest>=7.4.0",
31
+ "pytest-asyncio>=0.21.0",
32
+ "ruff>=0.1.0",
33
+ ]
34
+
35
+ [project.scripts]
36
+ 021-mcp = "mcp_traces.server:main"
37
+
38
+ [build-system]
39
+ requires = ["hatchling"]
40
+ build-backend = "hatchling.build"
41
+
42
+ [tool.hatch.build.targets.wheel]
43
+ packages = ["src/mcp_traces"]
44
+
45
+ [tool.hatch.build.targets.sdist]
46
+ include = ["src/mcp_traces"]
47
+
48
+ [tool.ruff]
49
+ line-length = 100
50
+
51
+ [tool.ruff.lint]
52
+ select = ["E", "F", "W", "I", "N", "UP"]
@@ -0,0 +1,6 @@
1
+ """MCP server for LLM trace interaction."""
2
+
3
+ from mcp_traces.server import mcp, main
4
+
5
+ __version__ = "0.1.0"
6
+ __all__ = ["mcp", "main"]