Skip to main content

Documentation Index

Fetch the complete documentation index at: https://noorle.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Noorle implements the Model Context Protocol (MCP) for exposing tools to LLMs and agents.

What is MCP?

Model Context Protocol is a standardized interface for:
  • Tool discovery - List available capabilities
  • Tool execution - Call tools with parameters
  • Resource access - Read/write files and data
  • Prompt templates - Access agent instructions

Gateway Connection

Connect to your MCP gateway:
https://mcp-{gateway-id}.noorle.com

Supported Transports

TransportURLUse Case
Streamable HTTP/sse (GET) + /messages (POST)Stateful sessions, streaming
HTTP/ (POST)Stateless, firewall-friendly

Authentication

All requests require OAuth token or API key:
# Bearer token
curl -H "Authorization: Bearer eyJhbGc..." \
  https://mcp-{gateway-id}.noorle.com/

# Query parameter (limited, for browsers)
curl https://mcp-{gateway-id}.noorle.com/?access_token=eyJhbGc...
Authentication Guide →

Protocol Methods

Tool Discovery

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list",
  "params": {}
}
Returns available tools with JSON Schema definitions. tools/list reference →

Tool Execution

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "my_plugin_greet",
    "arguments": {"name": "Alice"}
  }
}
Execute a tool and return result. tools/call reference →

Resource Access

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "resources/list",
  "params": {}
}
List and access resources (files, databases, etc.). resources reference →

Prompt Templates

{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "prompts/list",
  "params": {}
}
Access prompt templates for agents. prompts reference →

Request-Response Flow

Tool Availability

Tools are automatically exposed from capabilities: Tool names follow pattern: {plugin}__{tool_name} or {builtin}_{tool_name}

Example: Complete Flow

1. Connect and List Tools

curl -X POST https://mcp-{gateway-id}.noorle.com/ \
  -H "Authorization: Bearer eyJhbGc..." \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {}
  }'
Response:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "tools": [
      {
        "name": "my_plugin_greet",
        "description": "Greet a person",
        "inputSchema": {
          "type": "object",
          "properties": {
            "name": {"type": "string"}
          }
        }
      }
    ]
  }
}

2. Call a Tool

curl -X POST https://mcp-{gateway-id}.noorle.com/ \
  -H "Authorization: Bearer eyJhbGc..." \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "my_plugin_greet",
      "arguments": {"name": "Alice"}
    }
  }'
Response:
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Hello, Alice!"
      }
    ]
  }
}

3. Handle Errors

{
  "jsonrpc": "2.0",
  "id": 2,
  "error": {
    "code": -32602,
    "message": "Invalid params",
    "data": {
      "reason": "Missing required parameter: name"
    }
  }
}

Error Handling

MCP uses JSON-RPC 2.0 error codes:
CodeMeaning
-32700Parse error
-32600Invalid Request
-32601Method not found
-32602Invalid params
-32603Internal error
Error Reference →

Gateway Features

Session State

Streamable HTTP maintains session state:
# Establish session
curl -N -H "Authorization: Bearer ..." \
  https://mcp-{gateway-id}.noorle.com/sse

# Send requests in same session
# Resources and session data preserved across calls

Resource Files

Access files uploaded to the gateway:
{
  "method": "resources/read",
  "params": {
    "uri": "file:///workspace/input.txt"
  }
}

Timeouts

Tool execution timeout: Default 30 seconds (configurable per plugin)
{
  "error": {
    "code": -32603,
    "message": "Tool execution timeout after 30 seconds"
  }
}

Limits

ResourceLimit
Request size1MB
Response size10MB
Tool timeout30s (configurable)
Concurrent requests10 per session

SDKs and Libraries

Official SDKs for MCP integration:
  • Python: mcp-python-sdk
  • TypeScript: @modelcontextprotocol/sdk
  • Rust: mcp-rust
from mcp import MCPClient

client = MCPClient(
    url="https://mcp-{gateway-id}.noorle.com",
    token="eyJhbGc..."
)

# List tools
tools = client.tools_list()

# Call tool
result = client.tools_call("my_plugin_greet", {"name": "Alice"})

Next Steps