@fractary/codex-mcp 0.10.7 → 0.10.9

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 CHANGED
@@ -1,39 +1,39 @@
1
- # @fractary/codex-mcp-server
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
- This package provides a standalone MCP server that exposes Fractary Codex functionality as tools for AI agents. Supports both stdio and HTTP/SSE transports.
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
- # Global
13
- npm install -g @fractary/codex-mcp-server
12
+ # Direct usage (recommended)
13
+ npx @fractary/codex-mcp
14
14
 
15
- # Direct usage
16
- npx @fractary/codex-mcp-server
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 `.claude/settings.json`:
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-server", "--config", ".fractary/config.yaml"]
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,88 @@ 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
- ## Documentation
59
+ ### codex_document_fetch
58
60
 
59
- **Full documentation**: [docs/mcp-server/](../../docs/mcp-server/)
61
+ Fetch a document by its codex:// URI with automatic caching.
60
62
 
61
- - [Configuration](../../docs/mcp-server/#configuration)
62
- - [Archive Configuration](../../docs/mcp-server/#archive-configuration)
63
- - [Tools Reference](../../docs/mcp-server/#available-tools)
64
- - [Programmatic Usage](../../docs/mcp-server/#programmatic-usage)
65
- - [Troubleshooting](../../docs/mcp-server/#troubleshooting)
63
+ **Parameters:**
64
+ - `uri` (string, required) - Codex URI (e.g., `codex://org/project/docs/file.md`)
65
+ - `noCache` (boolean, optional) - Bypass cache and fetch fresh content
66
+ - `branch` (string, optional) - Git branch to fetch from (default: `main`)
67
+
68
+ ### codex_cache_list
69
+
70
+ List documents currently in the cache.
71
+
72
+ **Parameters:**
73
+ - `org` (string, optional) - Filter by organization
74
+ - `project` (string, optional) - Filter by project
75
+ - `includeExpired` (boolean, optional) - Include expired cache entries
76
+
77
+ ### codex_cache_clear
78
+
79
+ Clear cache entries matching a pattern.
80
+
81
+ **Parameters:**
82
+ - `pattern` (string, required) - URI pattern to invalidate (supports regex)
83
+
84
+ ### codex_cache_stats
85
+
86
+ Get cache statistics (entry count, total size, hit rates).
87
+
88
+ **Parameters:**
89
+ - `json` (boolean, optional) - Return raw JSON stats object
90
+
91
+ ### codex_cache_health
92
+
93
+ Run diagnostics on the codex setup.
94
+
95
+ **Parameters:**
96
+ - `json` (boolean, optional) - Return raw JSON health check results
97
+
98
+ ### codex_file_sources_list
99
+
100
+ List file plugin sources configured in `.fractary/config.yaml`. No parameters.
66
101
 
67
102
  ## Configuration
68
103
 
69
104
  Uses `.fractary/config.yaml`:
70
105
 
71
106
  ```yaml
72
- organizationSlug: fractary
73
-
74
- cache:
75
- dir: .fractary/codex/cache
76
- defaultTtl: 3600
77
-
78
- storage:
79
- providers:
80
- - type: local
81
- basePath: ./knowledge
82
- - type: github
107
+ codex:
108
+ schema_version: "2.0"
109
+ organization: myorg
110
+ project: myproject
111
+ codex_repo: codex.myorg.com
112
+ remotes:
113
+ myorg/codex.myorg.com:
83
114
  token: ${GITHUB_TOKEN}
84
115
  ```
85
116
 
117
+ See the [Configuration Guide](../../docs/configuration.md) for the full reference.
118
+
119
+ ## Environment Variables
120
+
121
+ | Variable | Description |
122
+ |----------|-------------|
123
+ | `GITHUB_TOKEN` | GitHub API token for private repository access |
124
+
86
125
  ## Development
87
126
 
88
127
  ```bash
89
- # Build
90
128
  npm run build
91
-
92
- # Watch mode
93
- npm run dev
94
-
95
- # Test
129
+ npm run dev # watch mode
96
130
  npm test
97
-
98
- # Type check
99
131
  npm run typecheck
100
132
  ```
101
133
 
102
134
  ## License
103
135
 
104
136
  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 = {