miadi 1.0.14
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/.env.example +28 -0
- package/ARCHITECTURE.md +290 -0
- package/CLAUDE.md +269 -0
- package/GEMINI.md +80 -0
- package/MCP_CONNECTOR_READY.md +219 -0
- package/MCP_LEARNING_NOTES.md +178 -0
- package/MCP_REBUILD_PLAN.md +159 -0
- package/MCP_REMOTE_SERVER_SPEC.md +373 -0
- package/MIA.md +344 -0
- package/MIETTE.md +195 -0
- package/README.md +264 -0
- package/REMOTE_MCP_TRANSFORMATION_GUIDE.md +384 -0
- package/STATUS.md +191 -0
- package/TOOL_SELECTION_PLAN.md +340 -0
- package/WAKE_UP_SUMMARY.md +102 -0
- package/__PUBLISH.sh +1 -0
- package/book/_/ledgers/ledger_miadi_mcp_analysis_250730.md +0 -0
- package/conversations/2507301433.claude.issue.11.2025-07-30-this-mcp-is-not-working-another-instance-of-yours.txt +756 -0
- package/conversations/2507301601.cursor.reverse_engineer_mcp_service_for.md +808 -0
- package/conversations/2508050125.llmcon.claude.MIADI_TOOLS-implement-what-is-in-toolselectionplanmd.txt +1235 -0
- package/conversations/2508051939.llmcon.claude.issue-14.TransitionToPlanningIT.implement-what-is-in-toolselectionplanmd.txt +1424 -0
- package/conversations/2508082352.llmcon.claude.MCP-Remote-Take-II.txt +1658 -0
- package/dist/index-remote.js +54736 -0
- package/dist/index.js +32363 -0
- package/mcp.sample.json +14 -0
- package/openapi.yml +2161 -0
- package/package.json +56 -0
- package/research/MCP_Research_Perplexity_2508060045.md +410 -0
- package/samples/README.md +2 -0
- package/scripts/ngrokserve.sh +6 -0
- package/scripts/start-remote.sh +141 -0
- package/scripts/start-with-ngrok.sh +140 -0
- package/src/api-client.ts +254 -0
- package/src/index-remote.ts +406 -0
- package/src/index-simple.ts +232 -0
- package/src/index.ts +510 -0
- package/src/tool-registry.ts +223 -0
- package/src/tools/ai-tools.ts +69 -0
- package/src/tools/capability-tools.ts +79 -0
- package/src/tools/forge-tools.ts +51 -0
- package/src/tools/memory-tools.ts +137 -0
- package/src/tools/session-tools.ts +135 -0
- package/src/tools/workflow-tools.ts +65 -0
- package/src/types.ts +291 -0
- package/src/utils.ts +279 -0
- package/tests/quick-test.sh +116 -0
- package/tests/run-all-tests.sh +167 -0
- package/tests/test-agent-capabilities.sh +364 -0
- package/tests/test-connectivity.sh +90 -0
- package/tests/test-memory-operations.sh +236 -0
- package/tests/test-session-management.sh +320 -0
- package/tests/test-tool-discovery.sh +151 -0
- package/tsconfig.json +24 -0
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "miadi",
|
|
3
|
+
"version": "1.0.14",
|
|
4
|
+
"description": "MCP server for Miadi Three-Pathway Agent System API",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"miadi-mcp-server": "dist/index.js",
|
|
8
|
+
"miadi-mcp-server-remote": "dist/index-remote.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"start": "node dist/index.js",
|
|
12
|
+
"start:remote": "node dist/index-remote.js",
|
|
13
|
+
"prestart": "npm run build",
|
|
14
|
+
"prestart:remote": "npm run build:remote",
|
|
15
|
+
"build:std": "esbuild src/index.ts --bundle --platform=node --outfile=dist/index.js --external:@modelcontextprotocol/sdk",
|
|
16
|
+
"build:remote": "esbuild src/index-remote.ts --bundle --platform=node --outfile=dist/index-remote.js --external:@modelcontextprotocol/sdk",
|
|
17
|
+
"build": "npm run build:std && npm run build:remote",
|
|
18
|
+
"dev": "nodemon --exec ts-node src/index.ts",
|
|
19
|
+
"dev:remote": "nodemon --exec ts-node src/index-remote.ts",
|
|
20
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"mcp",
|
|
24
|
+
"miadi",
|
|
25
|
+
"agent",
|
|
26
|
+
"api",
|
|
27
|
+
"server"
|
|
28
|
+
],
|
|
29
|
+
"author": "Generated via Gemini MCP",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@modelcontextprotocol/sdk": "^1.17.0",
|
|
33
|
+
"axios": "^1.6.0",
|
|
34
|
+
"cors": "^2.8.5",
|
|
35
|
+
"dotenv": "^16.3.0",
|
|
36
|
+
"express": "^4.18.2",
|
|
37
|
+
"jsonwebtoken": "^9.0.2",
|
|
38
|
+
"passport": "^0.7.0",
|
|
39
|
+
"passport-jwt": "^4.0.1",
|
|
40
|
+
"uuid": "^9.0.1",
|
|
41
|
+
"zod": "^3.22.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/cors": "^2.8.17",
|
|
45
|
+
"@types/express": "^4.17.21",
|
|
46
|
+
"@types/jsonwebtoken": "^9.0.5",
|
|
47
|
+
"@types/node": "^20.10.0",
|
|
48
|
+
"@types/passport": "^1.0.16",
|
|
49
|
+
"@types/passport-jwt": "^4.0.1",
|
|
50
|
+
"@types/uuid": "^9.0.7",
|
|
51
|
+
"esbuild": "^0.25.8",
|
|
52
|
+
"nodemon": "^3.0.0",
|
|
53
|
+
"ts-node": "^10.9.0",
|
|
54
|
+
"typescript": "^5.3.0"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
<img src="https://r2cdn.perplexity.ai/pplx-full-logo-primary-dark%402x.png" style="height:64px;margin-right:32px"/>
|
|
2
|
+
|
|
3
|
+
# MCP Miadi3w ๐ง Complete Research Review \& Implementation Guide
|
|
4
|
+
|
|
5
|
+
## Executive Summary
|
|
6
|
+
|
|
7
|
+
The Model Context Protocol (MCP) has reached a critical maturity point in 2025, evolving from experimental protocol to enterprise-ready infrastructure. This comprehensive research review synthesizes current developments in MCP server implementation, OAuth authentication, deployment strategies, and the emerging Software 3.0 paradigm that positions natural language as the primary interface for AI-driven development.
|
|
8
|
+
|
|
9
|
+
## MCP Protocol Evolution: From STDIO to Production-Ready HTTP
|
|
10
|
+
|
|
11
|
+
### Transport Layer Revolution
|
|
12
|
+
|
|
13
|
+
The MCP specification has undergone a fundamental shift from Server-Sent Events (SSE) to **Streamable HTTP** (specification 2025-03-26)[^1][^2][^3]. This evolution represents more than a technical upgradeโit's a paradigm shift toward production-ready, scalable AI tool integration.
|
|
14
|
+
|
|
15
|
+
**Streamable HTTP Key Advantages:**
|
|
16
|
+
|
|
17
|
+
- **Single Endpoint Architecture**: Replaces dual endpoints (/sse + /messages) with unified /mcp endpoint[^1]
|
|
18
|
+
- **Bidirectional Communication**: Enables true server-client interaction beyond traditional HTTP request/response[^2]
|
|
19
|
+
- **Dynamic Connection Upgrades**: Automatically adapts from standard HTTP to streaming based on task complexity[^3]
|
|
20
|
+
- **Simplified Implementation**: Reduces developer overhead and connection management complexity[^1]
|
|
21
|
+
|
|
22
|
+
The transition eliminates the resource-intensive long-lived connections of SSE while maintaining real-time capabilities essential for AI agent interactions[^3].
|
|
23
|
+
|
|
24
|
+
## OAuth 2.0 Integration: Enterprise Security Standards
|
|
25
|
+
|
|
26
|
+
### Resource Server Compliance
|
|
27
|
+
|
|
28
|
+
The June 18, 2025 MCP specification update[^4][^5][^6] formally establishes MCP servers as OAuth 2.0 Resource Servers, introducing mandatory security requirements:
|
|
29
|
+
|
|
30
|
+
**Core Requirements:**
|
|
31
|
+
|
|
32
|
+
- Serve `.well-known/oauth-protected-resource` metadata document[^4]
|
|
33
|
+
- Validate access tokens according to OAuth 2.0 specification[^5]
|
|
34
|
+
- Require resource parameter in token requests (RFC 8707)[^6]
|
|
35
|
+
- Implement proper scope-based authorization[^4]
|
|
36
|
+
|
|
37
|
+
**Enterprise Integration Architecture:**
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Claude (MCP Client) โ Auth Gateway โ Authorization Server โ MCP Server
|
|
41
|
+
(Asgardeo/Stytch) (Resource Server)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Production Authentication Providers
|
|
46
|
+
|
|
47
|
+
Research reveals robust enterprise integration options[^7][^8][^4]:
|
|
48
|
+
|
|
49
|
+
- **Azure API Management**: Production OAuth 2.0 gateway with Entra ID[^7]
|
|
50
|
+
- **Stytch/Auth0**: Dedicated MCP authentication services[^8][^4]
|
|
51
|
+
- **OpenMCPAuthProxy**: Open-source authentication proxy for MCP compliance[^8]
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## Deployment Infrastructure: From Development to Production
|
|
55
|
+
|
|
56
|
+
### ngrok for Rapid Development
|
|
57
|
+
|
|
58
|
+
**ngrok** emerges as the preferred solution for exposing local MCP servers[^9][^10][^11]:
|
|
59
|
+
|
|
60
|
+
- **Instant HTTPS tunneling**: `ngrok http <port>` creates secure public endpoints[^9]
|
|
61
|
+
- **Request inspection**: Built-in debugging interface at `http://127.0.0.1:4040`[^9]
|
|
62
|
+
- **Authentication support**: Basic auth and OAuth integration capabilities[^11]
|
|
63
|
+
- **Reserved domains**: Custom subdomains for consistent webhook URLs[^9]
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Cloud-Native Production Deployment
|
|
67
|
+
|
|
68
|
+
**Enterprise Deployment Options:**[^7][^8][^12]
|
|
69
|
+
|
|
70
|
+
- **Azure API Management**: Full OAuth gateway with enterprise identity providers[^7]
|
|
71
|
+
- **Heroku Remote MCP**: Managed hosting with built-in OAuth 2.0 flows[^12]
|
|
72
|
+
- **Cloudflare Workers**: OAuth Provider Library for serverless MCP deployment[^7]
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## Automation Framework: From OpenAPI to MCP
|
|
76
|
+
|
|
77
|
+
### AutoMCP: Automated Server Generation
|
|
78
|
+
|
|
79
|
+
Recent research demonstrates significant automation potential[^13][^14][^15]:
|
|
80
|
+
|
|
81
|
+
- **AutoMCP Tool**: Generates complete MCP servers from OpenAPI 2.0/3.0 specifications[^13]
|
|
82
|
+
- **Success Metrics**: 76.5% out-of-box success rate, 99.9% after minor specification fixes[^13]
|
|
83
|
+
- **Scale Testing**: Evaluated on 50 real-world APIs spanning 5,066 endpoints[^13]
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### FastMCP Framework Adoption
|
|
87
|
+
|
|
88
|
+
**FastMCP** has become the standard Python framework for MCP development[^16][^17][^18]:
|
|
89
|
+
|
|
90
|
+
- **Decorator-Based Tools**: Simple `@mcp.tool()` decorators for function exposure[^16]
|
|
91
|
+
- **OpenAPI Integration**: Direct conversion from API specifications to MCP tools[^14]
|
|
92
|
+
- **Multiple Transports**: Support for STDIO, SSE, and HTTP Stream transports[^17]
|
|
93
|
+
- **Production Readiness**: Integration into official MCP SDK[^18]
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## Software 3.0: Natural Language as Programming Interface
|
|
97
|
+
|
|
98
|
+
### Paradigm Evolution
|
|
99
|
+
|
|
100
|
+
The research validates Andrej Karpathy's Software 3.0 framework[^19][^20][^21]:
|
|
101
|
+
|
|
102
|
+
- **Software 1.0**: Traditional hand-coded programming (C++, Python)[^20]
|
|
103
|
+
- **Software 2.0**: Neural network weights as "code" through training[^20]
|
|
104
|
+
- **Software 3.0**: LLMs as programmable systems via natural language prompts[^21]
|
|
105
|
+
|
|
106
|
+
**Key Implications for MCP:**
|
|
107
|
+
|
|
108
|
+
- **Democratized Development**: Non-technical users can create MCP tools through natural language[^19]
|
|
109
|
+
- **Changed Developer Role**: Shift from manual coding to prompt crafting and AI guidance[^21]
|
|
110
|
+
- **Natural Language Specifications**: MCP tool descriptions become executable interfaces[^20]
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### Prompt Engineering Research Findings
|
|
114
|
+
|
|
115
|
+
Studies demonstrate significant effectiveness in prompt-driven development[^22][^23][^24]:
|
|
116
|
+
|
|
117
|
+
- **GitHub Copilot Performance**: 35% faster task completion, 50% more solution progress[^25]
|
|
118
|
+
- **Code Generation Success**: 91.5% valid code generation rate[^26]
|
|
119
|
+
- **Productivity Gains**: 33-36% time reduction in coding-related tasks[^27]
|
|
120
|
+
|
|
121
|
+
**Advanced Prompting Techniques:**[^23][^28]
|
|
122
|
+
|
|
123
|
+
- **Chain-of-Thought (CoT)**: Step-by-step reasoning for complex code generation[^24]
|
|
124
|
+
- **Recursive Criticism and Improvement (RCI)**: Iterative refinement reducing security vulnerabilities[^23]
|
|
125
|
+
- **Knowledge-Driven Prompting**: Domain-specific context integration[^29]
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## MCP Ecosystem Maturation
|
|
129
|
+
|
|
130
|
+
### Adoption Metrics and Security
|
|
131
|
+
|
|
132
|
+
The MCP ecosystem has achieved significant scale[^30][^31][^32]:
|
|
133
|
+
|
|
134
|
+
- **Server Population**: 10,000+ deployed MCP servers[^30]
|
|
135
|
+
- **GitHub Activity**: 22,000+ MCP-tagged repositories[^13]
|
|
136
|
+
- **Enterprise Integration**: Native support in Claude Desktop, API, and major development tools[^32]
|
|
137
|
+
|
|
138
|
+
**Security Infrastructure:**[^33][^31]
|
|
139
|
+
|
|
140
|
+
- **MCP Safety Scanner**: Automated vulnerability assessment for MCP servers[^33]
|
|
141
|
+
- **Security Research**: 40% vulnerability rate in unsecured implementations[^23]
|
|
142
|
+
- **Enterprise Standards**: OAuth 2.1 compliance requirements[^4]
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
## Strategic Implementation Roadmap
|
|
146
|
+
|
|
147
|
+
### Phase 1: Core Infrastructure (High Priority)
|
|
148
|
+
|
|
149
|
+
1. **HTTP Transport Migration**: Implement Streamable HTTP (MCP 2025-03-26)[^1][^2]
|
|
150
|
+
2. **OAuth 2.0 Compliance**: Deploy Resource Server specification[^4][^5]
|
|
151
|
+
3. **Production Deployment**: Configure Azure APIM or Heroku hosting[^7][^12]
|
|
152
|
+
4. **FastMCP Integration**: Implement Python framework for rapid development[^16][^17]
|
|
153
|
+
|
|
154
|
+
### Phase 2: Documentation \& Automation (Medium Priority)
|
|
155
|
+
|
|
156
|
+
1. **Markdown MCP Specification**: Document 100+ Miadi operations in natural language[^34][^30]
|
|
157
|
+
2. **OpenAPI Integration**: Deploy AutoMCP for specification-driven development[^13][^14]
|
|
158
|
+
3. **Security Implementation**: Integrate MCP Safety Scanner[^33][^31]
|
|
159
|
+
|
|
160
|
+
### Phase 3: Research \& Innovation (Future)
|
|
161
|
+
|
|
162
|
+
1. **Software 3.0 Research**: Investigate natural language-driven development patterns[^19][^20]
|
|
163
|
+
2. **Agent Navigation System**: Build LLM guidance for codebase interaction[^35][^36]
|
|
164
|
+
|
|
165
|
+
## Conclusion: MCP as AI Infrastructure Layer
|
|
166
|
+
|
|
167
|
+
The research conclusively demonstrates that MCP has evolved beyond a protocol specification into a foundational infrastructure layer for AI-driven software development. The convergence of mature OAuth authentication, production-ready HTTP transport, automated server generation, and Software 3.0 paradigms positions MCP as the "USB-C of AI integration."
|
|
168
|
+
|
|
169
|
+
For Miadi development, this means transitioning from local STDIO servers to production HTTP endpoints with enterprise authentication represents not just a technical upgrade, but alignment with the future of AI-driven software development. The extensive automation frameworks (AutoMCP, FastMCP) and enterprise security standards (OAuth 2.0 Resource Server compliance) provide the foundation for scalable, secure AI tool integration.
|
|
170
|
+
|
|
171
|
+
The emergence of natural language as a programming interface through Software 3.0 suggests that MCP specifications themselves will become executableโwhere tool descriptions in Markdown format become the primary interface between human intent and AI capability. This recursive spiral from code to specification to natural language represents the true potential of the MCP Miadi3w emergence.
|
|
172
|
+
|
|
173
|
+
<div style="text-align: center">โ</div>
|
|
174
|
+
|
|
175
|
+
[^1]: https://simplescraper.io/blog/how-to-mcp
|
|
176
|
+
|
|
177
|
+
[^2]: https://mcp-framework.com/docs/Transports/transports-overview/
|
|
178
|
+
|
|
179
|
+
[^3]: https://blog.fka.dev/blog/2025-06-06-why-mcp-deprecated-sse-and-go-with-streamable-http/
|
|
180
|
+
|
|
181
|
+
[^4]: https://stytch.com/blog/MCP-authentication-and-authorization-guide/
|
|
182
|
+
|
|
183
|
+
[^5]: https://blog.logto.io/mcp-auth-implementation-guide-2025-06-18
|
|
184
|
+
|
|
185
|
+
[^6]: https://blog.logto.io/mcp-auth-spec-review-2025-03-26
|
|
186
|
+
|
|
187
|
+
[^7]: https://devblogs.microsoft.com/blog/claude-ready-secure-mcp-apim
|
|
188
|
+
|
|
189
|
+
[^8]: https://wso2.com/library/blogs/building-a-secure-enterprise-mcp-server-claude-integration/
|
|
190
|
+
|
|
191
|
+
[^9]: https://www.outrightcrm.com/blog/ngrok-securely-share-localhost/
|
|
192
|
+
|
|
193
|
+
[^10]: https://pinggy.io/blog/best_ngrok_alternatives/
|
|
194
|
+
|
|
195
|
+
[^11]: https://ngrok.com/docs/
|
|
196
|
+
|
|
197
|
+
[^12]: https://devcenter.heroku.com/articles/heroku-remote-mcp-server
|
|
198
|
+
|
|
199
|
+
[^13]: https://www.semanticscholar.org/paper/0381055cdaa98d2c600595330e04bf3a60153ff4
|
|
200
|
+
|
|
201
|
+
[^14]: https://www.magicslides.app/mcps/rmasters-openapi
|
|
202
|
+
|
|
203
|
+
[^15]: https://platform.openai.com/docs/mcp
|
|
204
|
+
|
|
205
|
+
[^16]: https://pypi.org/project/fastmcp/0.3.0/
|
|
206
|
+
|
|
207
|
+
[^17]: https://www.kagent.dev/docs/kmcp/develop/fastmcp-python
|
|
208
|
+
|
|
209
|
+
[^18]: https://en.kelen.cc/posts/fastmcp
|
|
210
|
+
|
|
211
|
+
[^19]: https://www.nextbigfuture.com/2025/06/software-3-0-by-karpathy.html
|
|
212
|
+
|
|
213
|
+
[^20]: https://stackspot.com/en/blog/evolution-of-software-development
|
|
214
|
+
|
|
215
|
+
[^21]: https://www.university-365.com/post/software-development-3-0-ai-andrej-karpathy
|
|
216
|
+
|
|
217
|
+
[^22]: https://dl.acm.org/doi/10.1145/3643991.3645069
|
|
218
|
+
|
|
219
|
+
[^23]: https://arxiv.org/abs/2407.07064
|
|
220
|
+
|
|
221
|
+
[^24]: https://arxiv.org/abs/2305.08360
|
|
222
|
+
|
|
223
|
+
[^25]: https://arxiv.org/html/2506.10051v1
|
|
224
|
+
|
|
225
|
+
[^26]: https://hackernoon.com/how-effective-is-github-copilot
|
|
226
|
+
|
|
227
|
+
[^27]: https://arxiv.org/pdf/2406.17910.pdf
|
|
228
|
+
|
|
229
|
+
[^28]: https://arxiv.org/html/2407.07064v2
|
|
230
|
+
|
|
231
|
+
[^29]: https://ieeexplore.ieee.org/document/10298349/
|
|
232
|
+
|
|
233
|
+
[^30]: https://www.semanticscholar.org/paper/202ed1e8df676c3aa2b9d627863a5d8cb19cc23a
|
|
234
|
+
|
|
235
|
+
[^31]: https://arxiv.org/abs/2504.19997
|
|
236
|
+
|
|
237
|
+
[^32]: https://dev.to/kevinz103/the-complete-mcp-guide-for-developers2025-edition-ana
|
|
238
|
+
|
|
239
|
+
[^33]: https://arxiv.org/abs/2504.03767
|
|
240
|
+
|
|
241
|
+
[^34]: https://arxiv.org/abs/2505.02279
|
|
242
|
+
|
|
243
|
+
[^35]: https://arxiv.org/abs/2505.18829
|
|
244
|
+
|
|
245
|
+
[^36]: https://arxiv.org/abs/2504.14411
|
|
246
|
+
|
|
247
|
+
[^37]: https://arxiv.org/abs/2504.08999
|
|
248
|
+
|
|
249
|
+
[^38]: https://medwinpublishers.com/OAJDA/server-migration-with-multipath-quic.pdf
|
|
250
|
+
|
|
251
|
+
[^39]: https://ieeexplore.ieee.org/document/10885716/
|
|
252
|
+
|
|
253
|
+
[^40]: https://onlinelibrary.wiley.com/doi/10.1002/tee.70015
|
|
254
|
+
|
|
255
|
+
[^41]: https://ieeexplore.ieee.org/document/11023326/
|
|
256
|
+
|
|
257
|
+
[^42]: http://arxiv.org/pdf/1310.2748.pdf
|
|
258
|
+
|
|
259
|
+
[^43]: https://arxiv.org/pdf/1812.03210.pdf
|
|
260
|
+
|
|
261
|
+
[^44]: https://arxiv.org/pdf/1212.1929.pdf
|
|
262
|
+
|
|
263
|
+
[^45]: https://arxiv.org/pdf/1902.06121.pdf
|
|
264
|
+
|
|
265
|
+
[^46]: https://arxiv.org/pdf/2405.01279.pdf
|
|
266
|
+
|
|
267
|
+
[^47]: http://arxiv.org/pdf/2409.07360.pdf
|
|
268
|
+
|
|
269
|
+
[^48]: http://arxiv.org/pdf/2406.15686.pdf
|
|
270
|
+
|
|
271
|
+
[^49]: https://arxiv.org/pdf/2409.07138.pdf
|
|
272
|
+
|
|
273
|
+
[^50]: https://arxiv.org/pdf/2102.07527.pdf
|
|
274
|
+
|
|
275
|
+
[^51]: https://zenodo.org/records/7919771/files/Migration_Paper.pdf
|
|
276
|
+
|
|
277
|
+
[^52]: https://mcp-framework.com/docs/Transports/http-stream-transport/
|
|
278
|
+
|
|
279
|
+
[^53]: https://milvus.io/ai-quick-reference/how-does-oauth-work-within-the-context-of-model-context-protocol-mcp
|
|
280
|
+
|
|
281
|
+
[^54]: https://www.walturn.com/insights/claude-mcp-a-new-standard-for-ai-integration
|
|
282
|
+
|
|
283
|
+
[^55]: https://developers.cloudflare.com/agents/model-context-protocol/authorization/
|
|
284
|
+
|
|
285
|
+
[^56]: https://intuitionlabs.ai/articles/mcp-servers-claude-code-internet-search
|
|
286
|
+
|
|
287
|
+
[^57]: https://workos.com/blog/mcp-authorization-in-5-easy-oauth-specs
|
|
288
|
+
|
|
289
|
+
[^58]: https://www.reddit.com/r/ClaudeAI/comments/1jf4hnt/setting_up_mcp_servers_in_claude_code_a_tech/
|
|
290
|
+
|
|
291
|
+
[^59]: https://auth0.com/blog/an-introduction-to-mcp-and-authorization/
|
|
292
|
+
|
|
293
|
+
[^60]: https://www.unleash.so/post/claude-mcp-the-complete-guide-to-model-context-protocol-integration-and-enterprise-security
|
|
294
|
+
|
|
295
|
+
[^61]: https://developers.cloudflare.com/agents/model-context-protocol/transport/
|
|
296
|
+
|
|
297
|
+
[^62]: https://auth0.com/blog/mcp-specs-update-all-about-auth/
|
|
298
|
+
|
|
299
|
+
[^63]: https://modelcontextprotocol.io/quickstart/user
|
|
300
|
+
|
|
301
|
+
[^64]: https://learn.microsoft.com/en-us/azure/api-management/expose-existing-mcp-server
|
|
302
|
+
|
|
303
|
+
[^65]: https://techcommunity.microsoft.com/blog/appsonazureblog/smart-ai-integration-with-the-model-context-protocol-mcp-part-5/4433422
|
|
304
|
+
|
|
305
|
+
[^66]: https://www.anthropic.com/engineering/desktop-extensions
|
|
306
|
+
|
|
307
|
+
[^67]: https://platform.openai.com/docs/guides/tools-remote-mcp
|
|
308
|
+
|
|
309
|
+
[^68]: https://aaronparecki.com/2025/04/03/15/oauth-for-model-context-protocol
|
|
310
|
+
|
|
311
|
+
[^69]: http://arxiv.org/pdf/2302.05311.pdf
|
|
312
|
+
|
|
313
|
+
[^70]: http://arxiv.org/pdf/2503.14959.pdf
|
|
314
|
+
|
|
315
|
+
[^71]: https://arxiv.org/abs/2203.02142
|
|
316
|
+
|
|
317
|
+
[^72]: http://arxiv.org/pdf/1306.4083.pdf
|
|
318
|
+
|
|
319
|
+
[^73]: http://arxiv.org/pdf/2312.03305.pdf
|
|
320
|
+
|
|
321
|
+
[^74]: https://zenodo.org/record/8354790/files/5GASP_s_Mesh_VPN_as_a_Service_final.pdf
|
|
322
|
+
|
|
323
|
+
[^75]: https://www.mdpi.com/1424-8220/22/22/9021/pdf?version=1669033411
|
|
324
|
+
|
|
325
|
+
[^76]: https://dl.acm.org/doi/pdf/10.1145/3629140
|
|
326
|
+
|
|
327
|
+
[^77]: https://arxiv.org/pdf/2312.17271.pdf
|
|
328
|
+
|
|
329
|
+
[^78]: https://arxiv.org/pdf/2502.03378.pdf
|
|
330
|
+
|
|
331
|
+
[^79]: http://arxiv.org/pdf/2409.14518.pdf
|
|
332
|
+
|
|
333
|
+
[^80]: https://arxiv.org/pdf/2301.04841.pdf
|
|
334
|
+
|
|
335
|
+
[^81]: https://arxiv.org/html/2504.01882v1
|
|
336
|
+
|
|
337
|
+
[^82]: https://arxiv.org/html/2405.04415v1
|
|
338
|
+
|
|
339
|
+
[^83]: http://arxiv.org/pdf/2411.13668.pdf
|
|
340
|
+
|
|
341
|
+
[^84]: https://arxiv.org/pdf/2310.06293.pdf
|
|
342
|
+
|
|
343
|
+
[^85]: https://arxiv.org/pdf/2305.05455.pdf
|
|
344
|
+
|
|
345
|
+
[^86]: https://petsymposium.org/popets/2024/popets-2024-0027.pdf
|
|
346
|
+
|
|
347
|
+
[^87]: https://www.mdpi.com/1424-8220/24/2/438/pdf?version=1704899416
|
|
348
|
+
|
|
349
|
+
[^88]: https://ngrok.com/docs/universal-gateway/http/
|
|
350
|
+
|
|
351
|
+
[^89]: https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server
|
|
352
|
+
|
|
353
|
+
[^90]: https://arxiv.org/html/2507.15003v1
|
|
354
|
+
|
|
355
|
+
[^91]: https://ngrok.com/our-product/secure-tunnels
|
|
356
|
+
|
|
357
|
+
[^92]: https://docs.anthropic.com/en/docs/claude-code/mcp
|
|
358
|
+
|
|
359
|
+
[^93]: https://sfrpl.in/blog/2025-08-01-software-3-0-is-here-software-in-the-age-of-ai
|
|
360
|
+
|
|
361
|
+
[^94]: https://ngrok.com/docs/getting-started/
|
|
362
|
+
|
|
363
|
+
[^95]: https://apidog.com/blog/claude-ai-remote-mcp-server/
|
|
364
|
+
|
|
365
|
+
[^96]: https://pub.towardsai.net/software-3-0-the-ai-revolution-in-development-5676f396a93f
|
|
366
|
+
|
|
367
|
+
[^97]: https://ngrok.com
|
|
368
|
+
|
|
369
|
+
[^98]: https://www.youtube.com/watch?v=i8Qw1MkGSFM
|
|
370
|
+
|
|
371
|
+
[^99]: http://nrpcomp.ukma.edu.ua/article/view/329682
|
|
372
|
+
|
|
373
|
+
[^100]: https://ijaem.net/issue_dcp/Design%20and%20Development%20of%20an%20Online%20Recruitment%20Systems%20for%20Small%20And%20Medium%20Sized%20Enterprises%20In%20Zambia.pdf
|
|
374
|
+
|
|
375
|
+
[^101]: https://www.semanticscholar.org/paper/ab798a2345ce06c894f9fe470702914f323e2281
|
|
376
|
+
|
|
377
|
+
[^102]: https://downloads.hindawi.com/journals/scn/2022/1943426.pdf
|
|
378
|
+
|
|
379
|
+
[^103]: http://arxiv.org/pdf/1907.08896.pdf
|
|
380
|
+
|
|
381
|
+
[^104]: https://www.mdpi.com/1424-8220/23/24/9766/pdf?version=1702307667
|
|
382
|
+
|
|
383
|
+
[^105]: https://www.mdpi.com/2076-3417/14/8/3187/pdf?version=1712756122
|
|
384
|
+
|
|
385
|
+
[^106]: https://downloads.hindawi.com/journals/wcmc/2023/6086686.pdf
|
|
386
|
+
|
|
387
|
+
[^107]: https://onlinelibrary.wiley.com/doi/pdfdirect/10.1002/dac.3929
|
|
388
|
+
|
|
389
|
+
[^108]: https://arxiv.org/pdf/2310.05222.pdf
|
|
390
|
+
|
|
391
|
+
[^109]: https://downloads.hindawi.com/journals/scn/2020/2523834.pdf
|
|
392
|
+
|
|
393
|
+
[^110]: https://arxiv.org/pdf/2503.18255.pdf
|
|
394
|
+
|
|
395
|
+
[^111]: https://arxiv.org/pdf/2504.08623.pdf
|
|
396
|
+
|
|
397
|
+
[^112]: https://arxiv.org/ftp/arxiv/papers/2307/2307.03291.pdf
|
|
398
|
+
|
|
399
|
+
[^113]: http://arxiv.org/pdf/2403.13020.pdf
|
|
400
|
+
|
|
401
|
+
[^114]: https://arxiv.org/pdf/2503.23278.pdf
|
|
402
|
+
|
|
403
|
+
[^115]: https://www.mdpi.com/2073-431X/12/1/2/pdf?version=1672244279
|
|
404
|
+
|
|
405
|
+
[^116]: https://www.mdpi.com/2076-3417/13/19/10871/pdf?version=1696061166
|
|
406
|
+
|
|
407
|
+
[^117]: https://www.youtube.com/watch?v=TMbyv_RGEAk
|
|
408
|
+
|
|
409
|
+
[^118]: https://tyk.io/docs/ai-management/mcps/api-to-mcp/
|
|
410
|
+
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Start Remote Miadi MCP Server with ngrok tunnel for Claude.ai
|
|
4
|
+
# Uses HTTP transport for remote Claude.ai connections
|
|
5
|
+
# Usage: ./scripts/start-remote.sh [port]
|
|
6
|
+
|
|
7
|
+
set -e
|
|
8
|
+
|
|
9
|
+
PORT=${1:-3330}
|
|
10
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
|
+
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
12
|
+
. .env &>/dev/null||true
|
|
13
|
+
|
|
14
|
+
echo "๐ Starting Remote Miadi MCP Server (For Claude.ai Remote Connections)"
|
|
15
|
+
echo "๐ Project directory: $PROJECT_DIR"
|
|
16
|
+
echo "๐ Port: $PORT"
|
|
17
|
+
|
|
18
|
+
# Load environment variables with fallback strategy
|
|
19
|
+
load_environment() {
|
|
20
|
+
# First check if already set
|
|
21
|
+
if [[ -n "$EH_TOKEN" && -n "$EH_API_URL" ]]; then
|
|
22
|
+
echo "โ
Using existing environment variables"
|
|
23
|
+
return 0
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
# Try to source $HOME/.env if it exists
|
|
27
|
+
if [[ -f "$HOME/.env" ]]; then
|
|
28
|
+
echo "๐ Loading environment from $HOME/.env"
|
|
29
|
+
set -a # Automatically export all variables
|
|
30
|
+
source "$HOME/.env"
|
|
31
|
+
set +a # Turn off automatic export
|
|
32
|
+
|
|
33
|
+
# Check again after sourcing
|
|
34
|
+
if [[ -n "$EH_TOKEN" && -n "$EH_API_URL" ]]; then
|
|
35
|
+
echo "โ
Environment variables loaded from $HOME/.env"
|
|
36
|
+
return 0
|
|
37
|
+
fi
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Final validation
|
|
41
|
+
if [[ -z "$EH_TOKEN" ]]; then
|
|
42
|
+
echo "โ Error: EH_TOKEN environment variable is required"
|
|
43
|
+
echo "๐ก Either export EH_TOKEN or add it to $HOME/.env"
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
if [[ -z "$EH_API_URL" ]]; then
|
|
48
|
+
echo "โ Error: EH_API_URL environment variable is required"
|
|
49
|
+
echo "๐ก Either export EH_API_URL or add it to $HOME/.env"
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
# Load environment variables
|
|
55
|
+
load_environment
|
|
56
|
+
|
|
57
|
+
# Build the remote server
|
|
58
|
+
echo "๐จ Building remote MCP server..."
|
|
59
|
+
cd "$PROJECT_DIR"
|
|
60
|
+
npm run build:remote
|
|
61
|
+
|
|
62
|
+
# Start the remote server in background
|
|
63
|
+
echo "๐ฅ๏ธ Starting remote MCP server on port $PORT..."
|
|
64
|
+
export MCP_PORT="$PORT"
|
|
65
|
+
node dist/index-remote.js &
|
|
66
|
+
SERVER_PID=$!
|
|
67
|
+
|
|
68
|
+
# Wait for server to start
|
|
69
|
+
sleep 3
|
|
70
|
+
|
|
71
|
+
# Check if server is running
|
|
72
|
+
if ! curl -s "http://localhost:$PORT/health" > /dev/null; then
|
|
73
|
+
echo "โ Error: Remote server failed to start"
|
|
74
|
+
kill $SERVER_PID 2>/dev/null || true
|
|
75
|
+
exit 1
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
echo "โ
Remote server started successfully"
|
|
79
|
+
|
|
80
|
+
# Start ngrok tunnel
|
|
81
|
+
echo "๐ Starting ngrok tunnel..."
|
|
82
|
+
if [[ -n "$NGROK_DOMAIN" ]]; then
|
|
83
|
+
echo "๐ Using dedicated domain: $NGROK_DOMAIN"
|
|
84
|
+
ngrok http --url="$NGROK_DOMAIN" $PORT --log=stdout --log-level=info &
|
|
85
|
+
else
|
|
86
|
+
echo "๐ Using random domain"
|
|
87
|
+
ngrok http $PORT --log=stdout --log-level=info &
|
|
88
|
+
fi
|
|
89
|
+
NGROK_PID=$!
|
|
90
|
+
|
|
91
|
+
# Wait for ngrok to start
|
|
92
|
+
sleep 5
|
|
93
|
+
|
|
94
|
+
# Get ngrok public URL
|
|
95
|
+
if [[ -n "$NGROK_DOMAIN" ]]; then
|
|
96
|
+
NGROK_URL="https://$NGROK_DOMAIN"
|
|
97
|
+
else
|
|
98
|
+
NGROK_URL=$(curl -s http://localhost:4040/api/tunnels | jq -r '.tunnels[0].public_url' 2>/dev/null || echo "")
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
if [[ -z "$NGROK_URL" || "$NGROK_URL" == "null" ]]; then
|
|
102
|
+
echo "โ Error: Failed to get ngrok tunnel URL"
|
|
103
|
+
echo "๐ Check ngrok web interface at: http://localhost:4040"
|
|
104
|
+
echo "๐ก Local server: http://localhost:$PORT"
|
|
105
|
+
else
|
|
106
|
+
echo ""
|
|
107
|
+
echo "๐ Remote Miadi MCP Server is ready!"
|
|
108
|
+
echo "๐ก Local URL: http://localhost:$PORT"
|
|
109
|
+
echo "๐ Public URL: $NGROK_URL"
|
|
110
|
+
echo "๐ Ngrok Dashboard: http://localhost:4040"
|
|
111
|
+
echo ""
|
|
112
|
+
echo "๐ Claude.ai Connector Configuration:"
|
|
113
|
+
echo " Base URL: $NGROK_URL"
|
|
114
|
+
echo " (No authentication setup needed - using HTTP transport)"
|
|
115
|
+
echo ""
|
|
116
|
+
echo "๐งช Test endpoints:"
|
|
117
|
+
echo " Health: $NGROK_URL/health"
|
|
118
|
+
echo " MCP Endpoint: $NGROK_URL/mcp"
|
|
119
|
+
echo " Server Info: $NGROK_URL/"
|
|
120
|
+
echo ""
|
|
121
|
+
echo "โจ Using HTTP transport for Claude.ai remote connections"
|
|
122
|
+
fi
|
|
123
|
+
|
|
124
|
+
# Cleanup function
|
|
125
|
+
cleanup() {
|
|
126
|
+
echo ""
|
|
127
|
+
echo "๐ Shutting down..."
|
|
128
|
+
kill $SERVER_PID 2>/dev/null || true
|
|
129
|
+
kill $NGROK_PID 2>/dev/null || true
|
|
130
|
+
wait $SERVER_PID 2>/dev/null || true
|
|
131
|
+
wait $NGROK_PID 2>/dev/null || true
|
|
132
|
+
echo "โ
Cleanup complete"
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
# Handle shutdown signals
|
|
136
|
+
trap cleanup SIGINT SIGTERM
|
|
137
|
+
|
|
138
|
+
echo "๐ Server running. Press Ctrl+C to stop..."
|
|
139
|
+
|
|
140
|
+
# Keep script running
|
|
141
|
+
wait $SERVER_PID
|