@fractary/codex-mcp 0.10.6 → 0.10.8
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/README.md +65 -45
- package/dist/cli.cjs +16 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +16 -0
- package/dist/index.cjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
# @fractary/codex-mcp
|
|
1
|
+
# @fractary/codex-mcp
|
|
2
2
|
|
|
3
3
|
MCP (Model Context Protocol) server for Fractary Codex knowledge management.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Standalone MCP server that exposes Fractary Codex functionality as tools for AI agents. Supports stdio (default) and HTTP/SSE transports.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
#
|
|
13
|
-
|
|
12
|
+
# Direct usage (recommended)
|
|
13
|
+
npx @fractary/codex-mcp
|
|
14
14
|
|
|
15
|
-
#
|
|
16
|
-
|
|
15
|
+
# Global install
|
|
16
|
+
npm install -g @fractary/codex-mcp
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Quick Start
|
|
20
20
|
|
|
21
|
-
### Claude Code Integration
|
|
21
|
+
### Claude Code / MCP Client Integration
|
|
22
22
|
|
|
23
|
-
Add to `.
|
|
23
|
+
Add to `.mcp.json` in your project root:
|
|
24
24
|
|
|
25
25
|
```json
|
|
26
26
|
{
|
|
27
27
|
"mcpServers": {
|
|
28
28
|
"fractary-codex": {
|
|
29
29
|
"command": "npx",
|
|
30
|
-
"args": ["-y", "@fractary/codex-mcp
|
|
30
|
+
"args": ["-y", "@fractary/codex-mcp", "--config", ".fractary/config.yaml"]
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
### Stdio Mode
|
|
36
|
+
### Stdio Mode (default)
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
39
|
fractary-codex-mcp --config .fractary/config.yaml
|
|
@@ -49,62 +49,82 @@ fractary-codex-mcp --port 3000 --host localhost
|
|
|
49
49
|
|
|
50
50
|
| Tool | Description |
|
|
51
51
|
|------|-------------|
|
|
52
|
-
| `codex_document_fetch` | Fetch document by URI |
|
|
53
|
-
| `codex_search` | Search documents |
|
|
52
|
+
| `codex_document_fetch` | Fetch a document by codex:// URI |
|
|
54
53
|
| `codex_cache_list` | List cached documents |
|
|
55
|
-
| `codex_cache_clear` | Clear cache by pattern |
|
|
54
|
+
| `codex_cache_clear` | Clear cache entries by pattern |
|
|
55
|
+
| `codex_cache_stats` | Get cache statistics |
|
|
56
|
+
| `codex_cache_health` | Run health diagnostics |
|
|
57
|
+
| `codex_file_sources_list` | List file plugin sources |
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
### codex_document_fetch
|
|
58
60
|
|
|
59
|
-
|
|
61
|
+
Fetch a document by its codex:// URI with automatic caching.
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
|
|
63
|
+
**Parameters:**
|
|
64
|
+
- `uri` (string, required) - Codex URI (e.g., `codex://org/project/docs/file.md`)
|
|
65
|
+
- `bypass_cache` (boolean, optional) - Skip cache and fetch from source
|
|
66
|
+
- `ttl` (number, optional) - Override TTL in seconds
|
|
67
|
+
|
|
68
|
+
### codex_cache_list
|
|
69
|
+
|
|
70
|
+
List documents currently in the cache.
|
|
71
|
+
|
|
72
|
+
**Parameters:**
|
|
73
|
+
- `status` (string, optional) - Filter: `fresh`, `stale`, `expired`, `all`
|
|
74
|
+
- `limit` (number, optional) - Max entries to return
|
|
75
|
+
|
|
76
|
+
### codex_cache_clear
|
|
77
|
+
|
|
78
|
+
Clear cache entries.
|
|
79
|
+
|
|
80
|
+
**Parameters:**
|
|
81
|
+
- `pattern` (string, optional) - Glob pattern to match URIs
|
|
82
|
+
- `all` (boolean, optional) - Clear entire cache
|
|
83
|
+
|
|
84
|
+
### codex_cache_stats
|
|
85
|
+
|
|
86
|
+
Get cache statistics (entry count, total size, hit rates). No parameters.
|
|
87
|
+
|
|
88
|
+
### codex_cache_health
|
|
89
|
+
|
|
90
|
+
Run diagnostics on the codex setup. No parameters.
|
|
91
|
+
|
|
92
|
+
### codex_file_sources_list
|
|
93
|
+
|
|
94
|
+
List file plugin sources configured in `.fractary/config.yaml`. No parameters.
|
|
66
95
|
|
|
67
96
|
## Configuration
|
|
68
97
|
|
|
69
98
|
Uses `.fractary/config.yaml`:
|
|
70
99
|
|
|
71
100
|
```yaml
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
providers:
|
|
80
|
-
- type: local
|
|
81
|
-
basePath: ./knowledge
|
|
82
|
-
- type: github
|
|
101
|
+
codex:
|
|
102
|
+
schema_version: "2.0"
|
|
103
|
+
organization: myorg
|
|
104
|
+
project: myproject
|
|
105
|
+
codex_repo: codex.myorg.com
|
|
106
|
+
remotes:
|
|
107
|
+
myorg/codex.myorg.com:
|
|
83
108
|
token: ${GITHUB_TOKEN}
|
|
84
109
|
```
|
|
85
110
|
|
|
111
|
+
See the [Configuration Guide](../../docs/configuration.md) for the full reference.
|
|
112
|
+
|
|
113
|
+
## Environment Variables
|
|
114
|
+
|
|
115
|
+
| Variable | Description |
|
|
116
|
+
|----------|-------------|
|
|
117
|
+
| `GITHUB_TOKEN` | GitHub API token for private repository access |
|
|
118
|
+
|
|
86
119
|
## Development
|
|
87
120
|
|
|
88
121
|
```bash
|
|
89
|
-
# Build
|
|
90
122
|
npm run build
|
|
91
|
-
|
|
92
|
-
# Watch mode
|
|
93
|
-
npm run dev
|
|
94
|
-
|
|
95
|
-
# Test
|
|
123
|
+
npm run dev # watch mode
|
|
96
124
|
npm test
|
|
97
|
-
|
|
98
|
-
# Type check
|
|
99
125
|
npm run typecheck
|
|
100
126
|
```
|
|
101
127
|
|
|
102
128
|
## License
|
|
103
129
|
|
|
104
130
|
MIT
|
|
105
|
-
|
|
106
|
-
## Related
|
|
107
|
-
|
|
108
|
-
- [@fractary/codex](https://www.npmjs.com/package/@fractary/codex) - Core SDK
|
|
109
|
-
- [@fractary/codex-cli](https://www.npmjs.com/package/@fractary/codex-cli) - CLI tool
|
|
110
|
-
- [MCP Specification](https://modelcontextprotocol.io)
|
package/dist/cli.cjs
CHANGED
|
@@ -12745,6 +12745,22 @@ var init_built_in = __esm2({
|
|
|
12745
12745
|
defaultTtl: TTL.TWO_WEEKS,
|
|
12746
12746
|
archiveAfterDays: null,
|
|
12747
12747
|
archiveStorage: null
|
|
12748
|
+
},
|
|
12749
|
+
memory: {
|
|
12750
|
+
name: "memory",
|
|
12751
|
+
description: "Institutional memory entries (troubleshooting, decisions, patterns)",
|
|
12752
|
+
patterns: [
|
|
12753
|
+
"memory/**",
|
|
12754
|
+
".fractary/codex/memory/**",
|
|
12755
|
+
"**/knowledge-base/**"
|
|
12756
|
+
],
|
|
12757
|
+
defaultTtl: TTL.ONE_MONTH,
|
|
12758
|
+
archiveAfterDays: 365,
|
|
12759
|
+
archiveStorage: "cloud",
|
|
12760
|
+
syncPatterns: [
|
|
12761
|
+
"memory/**",
|
|
12762
|
+
".fractary/codex/memory/**"
|
|
12763
|
+
]
|
|
12748
12764
|
}
|
|
12749
12765
|
};
|
|
12750
12766
|
DEFAULT_TYPE = {
|