MCP Server

Create and manage architecture diagrams from Claude Code, Cursor, Windsurf, or any MCP-compatible client.

Claude Code Cursor Windsurf Any MCP client

Setup

1 Get your API key

Sign in at netfilia.app, open AI Settings (top-right menu), and click Generate MCP Key. The key starts with nf_ and is shown only once — copy it.

2 Install the MCP server

No global install needed. npx downloads and runs it on demand:

terminal
npx -y netfilia-mcp

3 Add to your client config

Claude Code — add to ~/.claude.json:

~/.claude.json
{ "mcpServers": { "netfilia": { "command": "npx", "args": ["-y", "netfilia-mcp"], "env": { "NETFILIA_API_URL": "https://netfilia.app", "NETFILIA_TOKEN": "nf_your_key_here" } } } }

Cursor — Settings → MCP Servers → Add:

Cursor MCP config
{ "command": "npx", "args": ["-y", "netfilia-mcp"], "env": { "NETFILIA_API_URL": "https://netfilia.app", "NETFILIA_TOKEN": "nf_your_key_here" } }

Windsurf / other MCP clients — same format, consult your client's MCP documentation for the config file location.

💡 Tip: You can also set NETFILIA_SCHEMA_ID to auto-target a specific schema without passing it to every tool call.

Available tools

The MCP server exposes 21 tools organized in 5 groups:

Schemas

ToolDescription
list_schemasList all your schemas
get_schemaGet full schema by ID
create_schemaCreate a new empty schema
update_schemaUpdate title or data
delete_schemaPermanently delete a schema

Objects (nodes)

ToolDescription
create_objectAdd a node (server, switch, firewall, etc.)
list_objectsList objects in a schema
get_objectGet object details
update_objectUpdate properties (name, type, group, tags)
delete_objectRemove an object (cascades connections)

Connectors (interfaces)

ToolDescription
add_connectorAdd a network interface (IP, VLAN, subnet)
update_connectorUpdate interface properties
delete_connectorRemove an interface

Connections (edges)

ToolDescription
create_connectionDraw a link between two objects
get_connectionGet connection details
update_connectionUpdate label, style, direction
delete_connectionRemove a connection

Utilities

ToolDescription
validate_schemaCheck against validation rules
get_summaryCounts by type, connections, subnets

Authentication

Two methods supported:

MethodFormatExpirationHow to get
MCP API key (recommended)nf_ + 64 hex charsNever (revocable)AI Settings → Generate MCP Key
JWTBearer token7 daysPOST /api/auth/login

When NETFILIA_TOKEN starts with nf_, the server uses x-api-key header automatically. Otherwise it uses Authorization: Bearer.

Examples

Once connected, ask your AI naturally:

Claude Code
# Create a schema from scratch > Create a web stack with a load balancer, 2 web servers, and a Postgres database # Add to an existing schema > Add a Redis cache between the web servers and the database # Check your work > Validate the schema and show me the summary # Manage schemas > List my schemas > Delete the schema called "test"

Environment variables

VariableRequiredDescription
NETFILIA_API_URLYesBase URL (e.g. https://netfilia.app)
NETFILIA_TOKENYesMCP API key (nf_...) or JWT
NETFILIA_SCHEMA_IDNoDefault schema ID — tools use this if no schemaId is passed

Troubleshooting

Server not showing in MCP list

Restart your AI IDE after editing the config file. MCP servers are loaded at startup.

"NETFILIA_API_URL is not set"

Check that your config has the env block with both NETFILIA_API_URL and NETFILIA_TOKEN.

"401 Unauthorized"

Your API key may be invalid or revoked. Generate a new one in AI Settings.

"Connection refused"

Verify NETFILIA_API_URL is correct (https://netfilia.app). No trailing slash.

npm package

npmjs.com/package/netfilia-mcp