MCP Server · NestJS · Claude AI
OpenPlatform
A production-ready NestJS server that exposes Claude AI capabilities through the Model Context Protocol — connect any MCP client in seconds.
Getting Started
Connect in 3 steps
OpenPlatform is a hosted service. You don't install anything — you just get an API key and point your MCP client to the server.
Request your API key
Contact the administrator to get your personal API key. It looks like op_a3f9c2e1... and grants you access to all MCP tools.
Add the server to your MCP client
Open your MCP client config and add OpenPlatform using your key. See the configuration examples below for Claude Desktop and Cursor.
Start using Claude tools
Restart your client. OpenPlatform will appear in the tools list — you can now call openplatform and openplatform_with_context directly from your AI assistant.
Configuration
Client Setup
Replace YOUR_API_KEY with the key you received. No installation required on your machine.
Don't have a key yet?
Contact the administrator to get your personal API key. Without it, all requests to /mcp/* will return 401 Unauthorized.
Claude.ai Web
The fastest way — no config files needed. The API key goes directly in the URL.
Open the connectors page
Click the + button to add a connector
A dialog opens asking for a name and a server URL.
Fill in the fields
Set Name to OpenPlatform and paste the URL below as Remote MCP server URL. Your API key is included in the URL — no OAuth needed.
__SERVER_URL__/mcp?api_key=YOUR_API_KEY
Save and start chatting
OpenPlatform will appear in your connectors list. Open a new conversation and the MCP tools will be available.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"openplatform": {
"url": "__SERVER_URL__/mcp",
"headers": {
"x-api-key": "YOUR_API_KEY"
}
}
}
}
Cursor
Open Settings → MCP and add a new server, or create the file .cursor/mcp.json in your project root:
{
"mcpServers": {
"openplatform": {
"url": "__SERVER_URL__/mcp",
"headers": {
"x-api-key": "YOUR_API_KEY"
}
}
}
}
Error responses
401
Missing API key — add x-api-key to your headers
403
Invalid or revoked key — contact the administrator
MCP Tools
Available Tools
OpenPlatform exposes five tools that Claude can call via MCP or the REST proxy.
openplatform
Send any message to Claude AI and receive a complete response. Best for questions, analysis, code generation, and general tasks.
openplatform_with_context
Send a message with a custom system prompt. Use when you need Claude to act in a specific role, with constraints, or domain-specific context.
create_economic_project
Create a structured economic project with investment dates, operational period, implementation year, and total CAPEX. Works in wizard mode: if any parameter is missing, the tool lists exactly what to ask the user for.
list_economic_projects
List all economic projects created by the current user. Returns a formatted markdown table (AI response) or a JSON array (API response).
delete_economic_project
Delete an economic project by ID. The tool shows project details and asks for explicit confirmation before permanently removing it.
REST API
HTTP Endpoints
The server exposes both the MCP protocol endpoint (used by Claude.ai, Claude Desktop, Cursor) and a lightweight REST API for direct HTTP calls.
POST /mcp MCP Streamable HTTP — primary endpoint for all MCP clients. +
Auth
?api_key= query param.
Request body — JSON-RPC 2.0
"2.0"
initialize · tools/list · tools/call
Example — tools/call
curl -X POST __SERVER_URL__/mcp \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "openplatform",
"arguments": { "message": "Hello!" }
},
"id": 1
}'
GET /mcp MCP SSE stream — server-to-client notifications channel. +
Auth
Response
text/event-stream — Server-Sent Events
Example
curl -N "__SERVER_URL__/mcp?api_key=YOUR_API_KEY"
POST /mcp/message REST shortcut — simpler than raw JSON-RPC. Supports plain JSON and SSE streaming. +
Auth
?api_key= query param.
Request body
openplatform. Also accepts openplatform_with_context
openplatform_with_context
true to receive an SSE stream instead of a JSON response. Default: false
Response (stream: false)
SSE events (stream: true)
{ type, model }
{ type, text } delta chunks
{ type, usage: { inputTokens, outputTokens }, timestamp }
{ type, error }
Example
curl -X POST __SERVER_URL__/mcp/message \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"tool": "openplatform_with_context",
"message": "Review this code for security issues",
"systemPrompt": "You are a senior security engineer.",
"stream": false
}'
GET /mcp/tools List all available MCP tools and their schemas. +
Auth
Response
name and description
Example
curl __SERVER_URL__/mcp/tools \
-H "x-api-key: YOUR_API_KEY"
GET /mcp/status Health check — returns server status, model, and available tools. +
Auth
Response
"running" if the server is up
claude-opus-4-6)
Example
curl __SERVER_URL__/mcp/status \
-H "x-api-key: YOUR_API_KEY"
tool create_economic_project Create a structured economic project — wizard mode asks for any missing parameters. +
Auth
Parameters — all required (wizard response if any are missing)
Response — success
{
"tool": "create_economic_project",
"output": "✅ Economic project created successfully!\n\n**ID**: `3f2a1b4c-...`\n**Name**: Solar Plant\n...",
"isError": false
}
Response — wizard (missing fields)
{
"tool": "create_economic_project",
"output": "The following parameters are missing:\n\n- **total_capex**: ...",
"isError": false
}
Example
curl -X POST __SERVER_URL__/mcp/message \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"tool": "create_economic_project",
"project_name": "Impianto Solare Nord",
"investment_start_date": "2025-01-01",
"investment_end_date": "2027-12-31",
"exercise_start_date": "2028-01-01",
"exercise_end_date": "2048-12-31",
"implementation_year": 2025,
"total_capex": 2500000
}'
tool list_economic_projects List all economic projects for the current user as a formatted table. +
Auth
Parameters
Response
{
"tool": "list_economic_projects",
"output": "## Economic Projects — acme\n\nTotal: **2** project(s)\n\n| # | Name | Year | Investment | ...\n...",
"isError": false
}
Example
curl -X POST __SERVER_URL__/mcp/message \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{ "tool": "list_economic_projects" }'
tool delete_economic_project Delete an economic project by ID — requires explicit confirmation. +
Auth
Parameters
list_economic_projects)
true — if omitted, the tool returns project details and asks for confirmation
Response — confirmation prompt (confirm omitted)
{
"tool": "delete_economic_project",
"output": "⚠️ You are about to delete: **Solar Plant** ...\nCall again with confirm: true to proceed.",
"isError": false
}
Response — deleted
{
"tool": "delete_economic_project",
"output": "🗑️ Project **Solar Plant** (`3f2a1b4c-...`) has been permanently deleted.",
"isError": false
}
Example
curl -X POST __SERVER_URL__/mcp/message \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"tool": "delete_economic_project",
"project_id": "3f2a1b4c-d5e6-7890-abcd-ef1234567890",
"confirm": true
}'
Tech Stack