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.


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.

1

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.

2

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.

3

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.


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.

The fastest way — no config files needed. The API key goes directly in the URL.

1

Open the connectors page

Go to claude.ai/customize/connectors ↗

2

Click the + button to add a connector

A dialog opens asking for a name and a server URL.

3

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.

Remote MCP server URL
__SERVER_URL__/mcp?api_key=YOUR_API_KEY
4

Save and start chatting

OpenPlatform will appear in your connectors list. Open a new conversation and the MCP tools will be available.

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

claude_desktop_config.json
{
  "mcpServers": {
    "openplatform": {
      "url": "__SERVER_URL__/mcp",
      "headers": {
        "x-api-key": "YOUR_API_KEY"
      }
    }
  }
}

Open Settings → MCP and add a new server, or create the file .cursor/mcp.json in your project root:

.cursor/mcp.json
{
  "mcpServers": {
    "openplatform": {
      "url": "__SERVER_URL__/mcp",
      "headers": {
        "x-api-key": "YOUR_API_KEY"
      }
    }
  }
}
401 Missing API key — add x-api-key to your headers
403 Invalid or revoked key — contact the administrator

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.

message
string required The message to send
max_tokens
number Max response tokens (default 16000)
🎯

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.

message
string required The message to send
system_prompt
string required System-level context or role
max_tokens
number Max response tokens (default 16000)
📊

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.

project_name
string required Project name
investment_start_date
string required Investment start date (YYYY-MM-DD)
investment_end_date
string required Investment end date (YYYY-MM-DD)
exercise_start_date
string required Operational period start (YYYY-MM-DD)
exercise_end_date
string required Operational period end (YYYY-MM-DD)
implementation_year
integer required Implementation year (e.g. 2025)
total_capex
number required Total CAPEX in EUR (e.g. 150000)
📋

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).

no parameters
User is derived automatically from the API key
🗑️

delete_economic_project

Delete an economic project by ID. The tool shows project details and asks for explicit confirmation before permanently removing it.

project_id
string required Full UUID of the project to delete
confirm
boolean required Must be true to confirm deletion

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. +
x-api-key header required Your API key. Alternatively pass as ?api_key= query param.
jsonrpc string required Must be "2.0"
method string required initialize · tools/list · tools/call
params object optional Method-specific parameters (handled automatically by MCP clients)
id string | number optional Request ID for correlation
curl
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. +
api_key query param required Your API key. GET requests can't set custom headers, so the key goes in the URL.
Content-Type header text/event-stream — Server-Sent Events
curl
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. +
x-api-key header required Your API key. Alternatively pass as ?api_key= query param.
message string required The message to send to Claude
tool string optional Tool to use. Default: openplatform. Also accepts openplatform_with_context
systemPrompt string optional Required when tool is openplatform_with_context
stream boolean optional Set to true to receive an SSE stream instead of a JSON response. Default: false
success boolean Whether the request succeeded
response string Claude's full reply
tool string Tool that was used
model string Model ID used for this request
timestamp string ISO 8601 UTC timestamp
start event First event — contains { type, model }
text event Repeated — contains { type, text } delta chunks
done event Final event — contains { type, usage: { inputTokens, outputTokens }, timestamp }
error event On failure — contains { type, error }
curl
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. +
x-api-key header required Your API key
tools array List of tool objects with name and description
count number Total number of available tools
timestamp string ISO 8601 UTC timestamp
curl
curl __SERVER_URL__/mcp/tools \
  -H "x-api-key: YOUR_API_KEY"
GET /mcp/status Health check — returns server status, model, and available tools. +
x-api-key header required Your API key
status string Always "running" if the server is up
mcpServerRunning boolean Whether the stdio MCP server is active
model string Active Claude model ID (e.g. claude-opus-4-6)
maxTokens number Maximum tokens configured for responses
availableTools string[] Names of all registered MCP tools
timestamp string ISO 8601 UTC timestamp
curl
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. +
x-api-key header required API key — determines the user label for storage
project_name string required Project name
investment_start_date string required Investment start date (YYYY-MM-DD)
investment_end_date string required Investment end date (YYYY-MM-DD)
exercise_start_date string required Operational period start (YYYY-MM-DD)
exercise_end_date string required Operational period end (YYYY-MM-DD)
implementation_year integer required Implementation year (e.g. 2025)
total_capex number required Total CAPEX in EUR (e.g. 150000)
JSON
{
  "tool": "create_economic_project",
  "output": "✅ Economic project created successfully!\n\n**ID**: `3f2a1b4c-...`\n**Name**: Solar Plant\n...",
  "isError": false
}
JSON
{
  "tool": "create_economic_project",
  "output": "The following parameters are missing:\n\n- **total_capex**: ...",
  "isError": false
}
curl
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. +
x-api-key header required API key — filters projects for the associated user
no parameters User is derived automatically from the API key
JSON
{
  "tool": "list_economic_projects",
  "output": "## Economic Projects — acme\n\nTotal: **2** project(s)\n\n| # | Name | Year | Investment | ...\n...",
  "isError": false
}
curl
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. +
x-api-key header required API key — identifies the user; only that user's projects can be deleted
project_id string required Full UUID of the project to delete (get it from list_economic_projects)
confirm boolean required Must be true — if omitted, the tool returns project details and asks for confirmation
JSON
{
  "tool": "delete_economic_project",
  "output": "⚠️ You are about to delete: **Solar Plant** ...\nCall again with confirm: true to proceed.",
  "isError": false
}
JSON
{
  "tool": "delete_economic_project",
  "output": "🗑️ Project **Solar Plant** (`3f2a1b4c-...`) has been permanently deleted.",
  "isError": false
}
curl
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
  }'

Built with

NestJS TypeScript @anthropic-ai/sdk @modelcontextprotocol/sdk claude-opus-4-6 @vercel/blob Zod Node.js SSE Streaming