home / skills / wellapp-ai / well / mcp-server

This skill guides you to create and configure new MCP server integrations, detailing folder structure, tool descriptors, and testing steps.

npx playbooks add skill wellapp-ai/well --skill mcp-server

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.7 KB
---
name: mcp-server
description: Guide for creating new MCP server integrations
---

# MCP Server Creation Guide

Use this skill when creating a new MCP server integration.

## MCP Folder Structure

MCPs live in: `~/.cursor/projects/<project>/mcps/<server-name>/`

```
mcps/
├── user-notion/
│   └── tools/
│       ├── API-retrieve-a-page.json
│       └── ...
├── cursor-ide-browser/
│   └── tools/
│       ├── browser_navigate.json
│       └── ...
└── user-n8n-mcp/
    └── tools/
        └── ...
```

## Tool Descriptor Format

Each tool is a JSON file:

```json
{
  "name": "tool-name",
  "description": "What this tool does",
  "arguments": {
    "type": "object",
    "properties": {
      "param1": { "type": "string", "description": "..." }
    },
    "required": ["param1"]
  }
}
```

## Usage Pattern

1. Read tool descriptor before calling
2. Use `CallMcpTool` with server, toolName, arguments
3. Handle response appropriately

## Example Call

```
CallMcpTool:
  server: "user-notion"
  toolName: "API-retrieve-a-page"
  arguments: { "page_id": "abc123" }
```

## Existing MCPs Reference

| MCP | Capabilities |
|-----|--------------|
| **user-notion** | Page/block CRUD, search, comments |
| **cursor-ide-browser** | Navigation, clicks, screenshots, console |
| **user-n8n-mcp** | Workflow search, details, execution |
| **user-context7** | Library docs lookup |
| **figma** | Design specs, code generation from frames |

## Creating a New MCP

1. Create folder: `mcps/<server-name>/tools/`
2. Add tool descriptors as JSON files
3. Configure server in `~/.cursor/mcp.json`
4. Restart Cursor (Cmd+Shift+P > "Reload Window")
5. Test with `CallMcpTool`

## Authentication Patterns

### Pattern 1: API Token (env block)

For MCPs that use API keys (Notion, n8n):

```json
"mcp-name": {
  "command": "npx",
  "args": ["-y", "@package/mcp-server"],
  "env": {
    "API_KEY": "your-token-here"
  }
}
```

### Pattern 2: URL-based (no auth)

For MCPs that connect to local servers (Figma desktop):

```json
"mcp-name": {
  "url": "http://127.0.0.1:PORT/mcp"
}
```

### Pattern 3: OAuth (remote URL)

For MCPs that use browser OAuth (Figma remote):

```json
"mcp-name": {
  "url": "https://service.com/mcp"
}
```

After adding, click "Connect" in Cursor MCP settings to authorize.

## Troubleshooting

**Installation loops infinitely:**
- Cancel and manually edit `~/.cursor/mcp.json`
- Add config block directly, then restart Cursor

**MCP not appearing:**
- Check JSON syntax is valid
- Verify package name is correct
- Restart Cursor after changes

## Best Practices

- Always read tool schema before calling
- Handle errors gracefully
- Use descriptive tool names
- Document required vs optional parameters

Overview

This skill is a practical guide for creating and integrating new MCP (modular connector process) servers into your Cursor project. It explains folder layout, tool descriptor format, authentication patterns, and step-by-step creation and testing workflows. The goal is to help engineers add reliable MCPs that expose tools for automation and FinOps workflows.

How this skill works

MCPs are implemented as directories under ~/.cursor/projects/<project>/mcps/<server-name>/tools with each tool defined by a JSON descriptor describing name, description, and typed arguments. The agent inspects the descriptor before calling a tool and invokes the MCP using CallMcpTool with server, toolName, and arguments. Servers are registered in ~/.cursor/mcp.json and can be run via local commands, URL endpoints, or remote OAuth-enabled URLs.

When to use it

  • You need to add a new service integration that exposes callable automation tools.
  • You want to convert an API or local app into a reusable MCP for agents to call.
  • You are building FinOps automations like invoice extraction, routing, or reconciliation.
  • You need a predictable, schema-driven tool interface for LLM-based automation.
  • You want to test or stub external services locally during development.

Best practices

  • Always read the tool JSON schema before invoking a tool to ensure correct arguments.
  • Name tools descriptively and document required vs optional params in the descriptor.
  • Handle errors gracefully in the MCP implementation and return structured responses.
  • Use environment-based API token patterns for secrets; prefer URL patterns for local dev.
  • Restart Cursor after edits to ~/.cursor/mcp.json or MCP folders to load changes.

Example use cases

  • Expose Notion page CRUD as tools for creating invoices or recording receipts.
  • Wrap an OCR invoice-extraction service as an MCP to extract line items for FinOps.
  • Create a local test MCP that simulates payment gateway webhooks during dev.
  • Add a workflow engine MCP (n8n) to trigger and inspect automated financial workflows.
  • Integrate a design-to-code MCP (Figma) to generate UI snippets used in dashboards.

FAQ

How do I structure a tool descriptor file?

Create a JSON file with name, description, and an arguments object that defines properties and required fields using standard JSON Schema types.

What authentication patterns are supported?

Use env-based API tokens for services with keys, URL endpoints for local servers, or remote URLs for OAuth flows; register the server in ~/.cursor/mcp.json and click Connect where required.

My MCP doesn’t show up — what should I check?

Verify JSON syntax, ensure the package/command or URL is correct in ~/.cursor/mcp.json, and restart Cursor to reload MCPs.