Skip to content

Commit ff184ee

Browse files
committed
Organize MCP server files into embedded folder structure
- Move all MCP server files to mcp/ folder for better organization - Update mcp-server.txt with new folder paths and setup instructions - Update install-mcp.sh to work from mcp folder with correct paths - Update mcp-server.js to search documentation from parent directory - Update README with new folder structure and installation steps - All paths now reference docs/mcp/ for better distribution
1 parent edb3e55 commit ff184ee

File tree

7 files changed

+51
-22
lines changed

7 files changed

+51
-22
lines changed

developers/modules/interchaintxs/explanation.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,15 @@ These fees are managed by the Fee Refunder module, which ensures that relayers a
191191

192192
### Registration Fee Implementation
193193

194-
As of Neutron V2, a minimum fee is required for registering new interchain accounts:
194+
A minimum fee is required for registering interchain accounts:
195195

196-
- **Purpose:** Prevents spam by requiring payment to register interchain accounts
197-
- **Beneficiary:** Fees are paid to the `FeeCollector` (currently the Neutron DAO)
198-
- **Backward Compatibility:** Contracts deployed before V2 are exempt from this fee requirement
196+
- **Purpose:** Prevents spam by requiring payment to register interchain accounts
197+
- **Fee Collection:** Fees are sent to a configurable fee collector address
198+
- **Threshold Mechanism:** The module includes logic to exempt contracts below a certain code ID threshold, though the specific threshold configuration depends on chain deployment
199199

200-
The fee threshold is determined by a stored code ID value - contracts with code IDs below this threshold are exempt from the registration fee.
200+
<Info>
201+
The actual fee collection address and code ID threshold values are set during chain deployment/upgrades and may vary by network. Check your specific network's parameters for current values.
202+
</Info>
201203

202204
## Port ID Format and Account Derivation
203205

developers/modules/interchaintxs/reference.mdx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,13 +327,17 @@ type Params struct {
327327

328328
The module stores minimal state in the blockchain:
329329

330-
#### ICA Registration Fee First Code ID
330+
#### ICA Registration Fee Code ID Threshold
331331

332-
Stores the code ID starting from which fees are charged for ICA registration (for backward compatibility with V1 contracts).
332+
Stores the code ID threshold for determining fee requirements during ICA registration.
333333

334-
**Key:** `ICARegistrationFeeFirstCodeID`
334+
**Key:** `ICARegistrationFeeFirstCodeID`
335335
**Value:** `uint64` (code ID threshold)
336336

337+
<Info>
338+
The actual threshold value and its initialization depend on specific chain deployment configuration.
339+
</Info>
340+
337341
<Info>
338342
The module itself does not store port-to-owner mappings, channel mappings, or interchain account addresses. This state is managed by the underlying IBC Interchain Accounts (ICA) controller keeper. Interchain account addresses and channel information can be queried through the ICA controller queries.
339343
</Info>
@@ -342,9 +346,9 @@ The module itself does not store port-to-owner mappings, channel mappings, or in
342346

343347
The Interchain Transactions module performs minimal state transitions:
344348

345-
#### ICA Registration Fee Initialization
349+
#### Code ID Threshold Management
346350

347-
When the module is first deployed, the `ICARegistrationFeeFirstCodeID` is set to determine the threshold for fee charging (V1 vs V2 behavior).
351+
The `ICARegistrationFeeFirstCodeID` threshold is managed during chain deployment/upgrades to determine which contracts are subject to registration fees.
348352

349353
#### Transaction Processing
350354

install-mcp.sh renamed to mcp/install-mcp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ echo ' "mcpServers": {'
4141
echo ' "neutron-docs": {'
4242
echo ' "command": "node",'
4343
echo ' "args": ["'$(pwd)'/mcp-server.js"],'
44-
echo ' "cwd": "'$(pwd)'"'
44+
echo ' "cwd": "'$(dirname $(pwd))'"'
4545
echo ' }'
4646
echo ' }'
4747
echo '}'

mcp-server-README.md renamed to mcp/mcp-server-README.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,27 @@ This MCP server enables AI assistants to search through Neutron's comprehensive
2121

2222
## Installation
2323

24-
1. **Install Dependencies**:
24+
1. **Clone the repository**:
25+
```bash
26+
git clone https://github.com/clydenewt/docs
27+
cd docs/mcp
28+
```
29+
30+
2. **Install Dependencies**:
2531
```bash
2632
npm install
2733
```
2834

29-
2. **Make the Server Executable**:
35+
3. **Make the Server Executable**:
3036
```bash
3137
chmod +x mcp-server.js
3238
```
3339

40+
Or use the automated installer:
41+
```bash
42+
./install-mcp.sh
43+
```
44+
3445
## Usage
3546

3647
### Direct Usage
@@ -48,7 +59,8 @@ Add to your MCP client configuration:
4859
"mcpServers": {
4960
"neutron-docs": {
5061
"command": "node",
51-
"args": ["mcp-server.js"],
62+
"args": ["mcp/mcp-server.js"],
63+
"cwd": "/path/to/docs",
5264
"env": {
5365
"NODE_ENV": "production"
5466
}
@@ -69,8 +81,8 @@ Add to your Claude Desktop configuration file:
6981
"mcpServers": {
7082
"neutron-docs": {
7183
"command": "node",
72-
"args": ["/path/to/neutron-docs/mcp-server.js"],
73-
"cwd": "/path/to/neutron-docs"
84+
"args": ["/path/to/docs/mcp/mcp-server.js"],
85+
"cwd": "/path/to/docs"
7486
}
7587
}
7688
}
@@ -145,9 +157,13 @@ Results include:
145157
### Project Structure
146158

147159
```
148-
neutron-docs/
149-
├── mcp-server.js # Main MCP server implementation
150-
├── mcp-server-config.json # Server configuration
160+
docs/
161+
├── mcp/ # MCP server folder
162+
│ ├── mcp-server.js # Main MCP server implementation
163+
│ ├── mcp-server-config.json # Server configuration
164+
│ ├── mcp-server-README.md # This README file
165+
│ ├── mcp-server.txt # Quick distribution guide
166+
│ └── install-mcp.sh # Installation script
151167
├── package.json # Dependencies and scripts
152168
├── developers/ # Developer documentation
153169
├── operators/ # Operator guides
@@ -159,9 +175,16 @@ neutron-docs/
159175
### Running in Development
160176

161177
```bash
178+
cd mcp
162179
npm run mcp-server
163180
```
164181

182+
or
183+
184+
```bash
185+
node mcp/mcp-server.js
186+
```
187+
165188
### Debugging
166189

167190
The server outputs debug information to stderr, which won't interfere with the MCP protocol communication on stdout.
File renamed without changes.

mcp-server.js renamed to mcp/mcp-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import path from 'path';
1111
import { fileURLToPath } from 'url';
1212

1313
const __filename = fileURLToPath(import.meta.url);
14-
const __dirname = path.dirname(__filename);
14+
const __dirname = path.dirname(path.dirname(__filename)); // Go up one level to docs root
1515

1616
class NeutronDocsMCPServer {
1717
constructor() {

mcp-server.txt renamed to mcp/mcp-server.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Access comprehensive guides, tutorials, module references, and APIs.
77
QUICK SETUP
88
-----------
99
git clone https://github.com/clydenewt/docs
10-
cd docs && ./install-mcp.sh
10+
cd docs/mcp && ./install-mcp.sh
1111

1212
CLAUDE DESKTOP CONFIG
1313
---------------------
@@ -19,7 +19,7 @@ Add to config file:
1919
"mcpServers": {
2020
"neutron-docs": {
2121
"command": "node",
22-
"args": ["/absolute/path/to/docs/mcp-server.js"],
22+
"args": ["/absolute/path/to/docs/mcp/mcp-server.js"],
2323
"cwd": "/absolute/path/to/docs"
2424
}
2525
}

0 commit comments

Comments
 (0)