@contextos/mcp 0.1.0
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.
- package/.turbo/turbo-build.log +12 -0
- package/README.md +121 -0
- package/dist/index.js +741 -0
- package/package.json +34 -0
- package/src/definitions.ts +166 -0
- package/src/index.ts +253 -0
- package/src/provider.ts +458 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
> @contextos/mcp@0.1.0 build C:\Users\ixayl\Desktop\ContextOS-main\ContextOS\packages\mcp
|
|
3
|
+
> tsup src/index.ts --format esm --clean
|
|
4
|
+
|
|
5
|
+
[34mCLI[39m Building entry: src/index.ts
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v8.5.1
|
|
8
|
+
[34mCLI[39m Target: es2022
|
|
9
|
+
[34mCLI[39m Cleaning output folder
|
|
10
|
+
[34mESM[39m Build start
|
|
11
|
+
[32mESM[39m [1mdist\index.js [22m[32m19.58 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 168ms
|
package/README.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# ContextOS MCP Server
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) server that enables AI tools like **Claude Code**, **Cursor**, **Windsurf** to access optimized context from ContextOS.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
### 🔧 Tools
|
|
8
|
+
AI can perform these actions:
|
|
9
|
+
|
|
10
|
+
| Tool | Description |
|
|
11
|
+
|------|-------------|
|
|
12
|
+
| `contextos_build` | Build optimized context for a goal |
|
|
13
|
+
| `contextos_analyze` | Deep RLM-powered analysis |
|
|
14
|
+
| `contextos_find` | Find files by pattern |
|
|
15
|
+
| `contextos_deps` | Get file dependencies |
|
|
16
|
+
| `contextos_explain` | Get file explanation |
|
|
17
|
+
| `contextos_status` | Check ContextOS status |
|
|
18
|
+
|
|
19
|
+
### 📚 Resources
|
|
20
|
+
AI can read these data sources:
|
|
21
|
+
|
|
22
|
+
| Resource | Description |
|
|
23
|
+
|----------|-------------|
|
|
24
|
+
| `contextos://context/current` | Last built context |
|
|
25
|
+
| `contextos://project/info` | Project configuration |
|
|
26
|
+
| `contextos://project/constraints` | Coding rules |
|
|
27
|
+
| `contextos://project/structure` | Directory tree |
|
|
28
|
+
|
|
29
|
+
### 💬 Prompts
|
|
30
|
+
Pre-built prompt templates:
|
|
31
|
+
|
|
32
|
+
| Prompt | Description |
|
|
33
|
+
|--------|-------------|
|
|
34
|
+
| `code_with_context` | Start coding with context |
|
|
35
|
+
| `review_code` | Review file with deps |
|
|
36
|
+
| `debug_issue` | Debug with context |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Installation
|
|
41
|
+
|
|
42
|
+
### For Claude Desktop
|
|
43
|
+
|
|
44
|
+
Add to your Claude Desktop config (`claude_desktop_config.json`):
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"contextos": {
|
|
50
|
+
"command": "npx",
|
|
51
|
+
"args": ["@contextos/mcp"],
|
|
52
|
+
"cwd": "/path/to/your/project"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### For Cursor
|
|
59
|
+
|
|
60
|
+
Add to Cursor settings:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mcp.servers": {
|
|
65
|
+
"contextos": {
|
|
66
|
+
"command": "npx @contextos/mcp",
|
|
67
|
+
"cwd": "${workspaceFolder}"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Global Installation
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npm install -g @contextos/mcp
|
|
77
|
+
contextos-mcp
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Usage
|
|
83
|
+
|
|
84
|
+
Once configured, the AI tool will automatically have access to ContextOS features.
|
|
85
|
+
|
|
86
|
+
### Example: Building Context
|
|
87
|
+
|
|
88
|
+
The AI can call:
|
|
89
|
+
```
|
|
90
|
+
Use the contextos_build tool with goal "Add authentication to UserController"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
And receive optimized context automatically.
|
|
94
|
+
|
|
95
|
+
### Example: Reading Project Info
|
|
96
|
+
|
|
97
|
+
The AI can read:
|
|
98
|
+
```
|
|
99
|
+
Read the contextos://project/info resource
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Development
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Install dependencies
|
|
108
|
+
pnpm install
|
|
109
|
+
|
|
110
|
+
# Build
|
|
111
|
+
pnpm build
|
|
112
|
+
|
|
113
|
+
# Run locally
|
|
114
|
+
pnpm start
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## License
|
|
120
|
+
|
|
121
|
+
MIT
|