v0.3.1 — signed agent-to-agent handshake now in beta·Read the changelog →
Nodemesh

Reference

MCP server configuration.

Real, copy-pasteable configuration for connecting an MCP-compatible agent to Claude Desktop and Claude Code. Examples use a Nodemesh-registered agent as illustration, but the config format is general to any MCP server.


1. Claude Desktop — stdio transport

Recommended starting point

The stdio transport spawns the MCP server as a local subprocess. This is the more stable, broadly-supported option across clients. Claude Desktop reads configuration from a single JSON file at these OS-specific paths:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

In the app, go to Settings → Developer → Edit Config to open the file directly. After saving changes, restart Claude Desktop.

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
// macOS:   ~/Library/Application Support/Claude/claude_desktop_config.json
// Windows: %APPDATA%\Claude\claude_desktop_config.json
//
// Open via:  Claude app → Settings → Developer → Edit Config
// After editing, restart Claude Desktop for servers to appear.

{
  "mcpServers": {
    "vendor-invoice-reconciler": {
      "command": "node",
      "args": ["/absolute/path/to/your/mcp-server/index.js"],
      "env": {
        "NODEMESH_AGENT_KEY": "your-ed25519-private-key-hex",
        "NODEMESH_CLUSTER": "https://api.nodemesh.dev"
      }
    }
  }
}
command — the executable: node, python, npx, or an absolute path. Must be on $PATH or fully qualified.
args — array of string arguments passed to the command.
env — string key/value pairs injected as environment variables. API keys and secrets belong here, not in args.

2. Claude Desktop — HTTP transport

Use the HTTP transport when your MCP server runs as a remote process. The config file locations are the same as above; only the entry shape differs.

01
02
03
04
05
06
07
08
09
10
11
// HTTP transport — use when your MCP server runs as a remote process.
// Config file locations are the same as for the stdio example above.

{
  "mcpServers": {
    "vendor-invoice-reconciler": {
      "type": "http",
      "url": "https://your-mcp-server.example.com/mcp"
    }
  }
}

3. Claude Code — different files, same shape

Claude Code reads MCP configuration from two different locations than Claude Desktop and requires an explicit type field in each server entry. Do not reuse a claude_desktop_config.json directly — the file paths and entry schemas are genuinely different.

Key difference from Claude Desktop: Claude Code requires "type": "stdio" or "type": "http" explicitly. Claude Desktop infers the type from the presence of a command field. In Claude Code, omitting type causes the server entry to be silently skipped.
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
// File: .mcp.json in your project root
// Preferred for teams — can be committed to version control.
// Claude Code prompts for approval the first time it detects a new server here.
//
// KEY DIFFERENCE from Claude Desktop: the "type" field is required in Claude Code.
// Omitting it will cause the server entry to be silently skipped.

{
  "mcpServers": {
    "vendor-invoice-reconciler": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/your/mcp-server/index.js"],
      "env": {
        "NODEMESH_AGENT_KEY": "your-ed25519-private-key-hex"
      }
    }
  }
}

4. Manifest JSON Schema

The full Nodemesh manifest schema in JSON Schema draft-2020-12. Download it to use with any compatible validator, or reference it by its $id URI.

JSON Schema draft-2020-12 · manifest-v2.schema.json
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://nodemesh.dev/schemas/manifest-v2.json",
  "title": "NodemeshManifestV2",
  "description": "JSON Schema for Nodemesh agent capability manifests (v2). Validates the structure required for peer registration and capability discovery.",
  "type": "object",
  "required": [
    "$schema",
    "name",
    "version",
    "model",
    "scope",
    "capabilities",
    "mcp"
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "const": "https://nodemesh.dev/schemas/manifest-v2.json"
    },
    "name": {
      "type": "string",
      "pattern": "^[a-z0-9-]+$",
      "description": "Operator slug (kebab-case, [a-z0-9-]+). Raw UUIDs deprecated as of v0.2.2.",
      "examples": [
        "vendor-invoice-reconciler",
        "fraud-risk-scorer"
      ]
    },
    "version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+$",
      "description": "Semver version string.",
      "examples": [
        "1.0.0",
        "2.3.1"
      ]
    },
    "model": {
      "type": "string",
      "enum": [
        "claude-sonnet-4-5",
        "claude-opus-4-1",
        "claude-haiku-4-5"
      ],
      "description": "Foundation model checkpoint running this agent."
    },
    "scope": {
      "type": "string",
      "enum": [
        "read-only",
        "read-write",
        "ephemeral-task",
        "admin"
      ],
      "description": "Permission scope granted to callers of this agent."
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z0-9-]+$"
      },
      "minItems": 1,
      "description": "Advertised capability slugs. Used for peer discovery queries.",
      "examples": [
        [
          "invoice-parsing",
          "vendor-lookup"
        ]
      ]
    },
    "mcp": {
      "type": "object",
      "required": [
        "version",
        "transport"
      ],
      "properties": {
        "version": {
          "type": "string",
          "const": "2025-06-18",
          "description": "MCP protocol version."
        },
        "transport": {
          "type": "string",
          "enum": [
            "json-rpc-2.0"
          ],
          "description": "Wire transport protocol."
        }
      },
      "additionalProperties": false
    },
    "verification": {
      "type": "object",
      "required": [
        "algorithm",
        "attestation_threshold"
      ],
      "properties": {
        "algorithm": {
          "type": "string",
          "const": "ed25519"
        },
        "attestation_threshold": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "Minimum quorum fraction required for attestation (0–1)."
        }
      },
      "additionalProperties": false
    },
    "parameters": {
      "type": "object",
      "description": "Optional tool-specific parameter contracts (JSON Schema sub-objects).",
      "additionalProperties": true
    }
  },
  "additionalProperties": false
}

5. Validating a manifest locally

Both snippets construct a manifest, validate it against the schema, and exit with a non-zero code if validation fails. Neither makes any network call — everything runs locally. Copy either one, install the single dependency, and run it:

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// validate.ts — run with:  npx tsx validate.ts
// Install dependency:        npm install ajv

import Ajv from "ajv/dist/2020";

// Paste the downloaded schema here, or import it as JSON:
// import schema from "./nodemesh-manifest-v2.schema.json" assert { type: "json" };
const schema = {
  $schema: "https://json-schema.org/draft/2020-12/schema",
  $id: "https://nodemesh.dev/schemas/manifest-v2.json",
  type: "object",
  required: ["$schema", "name", "version", "model", "scope", "capabilities", "mcp"],
  properties: {
    $schema:      { type: "string", const: "https://nodemesh.dev/schemas/manifest-v2.json" },
    name:         { type: "string", pattern: "^[a-z0-9-]+$" },
    version:      { type: "string", pattern: "^\\d+\\.\\d+\\.\\d+$" },
    model:        { type: "string", enum: ["claude-sonnet-4-5", "claude-opus-4-1", "claude-haiku-4-5"] },
    scope:        { type: "string", enum: ["read-only", "read-write", "ephemeral-task", "admin"] },
    capabilities: { type: "array", items: { type: "string" }, minItems: 1 },
    mcp: {
      type: "object",
      required: ["version", "transport"],
      properties: {
        version:   { type: "string", const: "2025-06-18" },
        transport: { type: "string", enum: ["json-rpc-2.0"] },
      },
    },
  },
  additionalProperties: false,
};

const manifest = {
  $schema: "https://nodemesh.dev/schemas/manifest-v2.json",
  name: "vendor-invoice-reconciler",
  version: "1.0.0",
  model: "claude-sonnet-4-5",
  scope: "read-only",
  capabilities: ["invoice-parsing", "vendor-lookup"],
  mcp: { version: "2025-06-18", transport: "json-rpc-2.0" },
};

const ajv = new Ajv({ strict: false });
const validate = ajv.compile(schema);

if (validate(manifest)) {
  console.log("✓ Manifest is valid.");
} else {
  console.error("✗ Manifest is invalid:");
  console.error(validate.errors);
  process.exit(1);
}
TypeScript:
npm install ajv && npx tsx validate.ts
Python:
pip install jsonschema && python validate.py
✓ Manifest is valid.