skills/mcp-development/SKILL.md
MCP server development patterns extending Anthropic's mcp-builder with AINative-specific conventions. Use when creating MCP servers, integrating ZeroDB, or building tool-based AI systems.
npx skillsauth add ainative-studio/ainativestudio-ide mcp-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Expert guidance for building Model Context Protocol (MCP) servers with AINative-specific conventions and ZeroDB integration.
Use this skill when:
ALWAYS use kebab-case for tool names:
zerodb-search, vector-upsert, postgres-queryzerodbSearch, VectorUpsert, postgresQueryAll tools must return structured error responses:
try {
const result = await operation();
return {
content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
};
} catch (error) {
return {
content: [{ type: "text", text: `Error: ${error.message}` }],
isError: true
};
}
Use Zod schemas for all tool parameters with descriptive messages:
{
query: z.string().describe('Search query for semantic similarity'),
top_k: z.number().optional().describe('Number of results to return (default: 5)')
}
Standard AINative MCP server layout:
my-mcp-server/
├── src/
│ ├── index.ts # Server setup and registration
│ ├── tools/ # Tool implementations
│ │ ├── search.ts
│ │ └── upsert.ts
│ └── lib/ # Shared utilities
│ └── client.ts
├── package.json
├── tsconfig.json
└── README.md
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { z } from 'zod';
const server = new McpServer({
name: 'my-mcp-server',
version: '1.0.0',
});
// Register a tool
server.tool(
'example-tool',
'Description of what this tool does',
{
param1: z.string().describe('Parameter description'),
param2: z.number().optional().describe('Optional parameter')
},
async ({ param1, param2 = 10 }) => {
try {
const result = await performOperation(param1, param2);
return {
content: [{
type: "text",
text: JSON.stringify(result, null, 2)
}]
};
} catch (error) {
return {
content: [{
type: "text",
text: `Error: ${error instanceof Error ? error.message : String(error)}`
}],
isError: true
};
}
}
);
// Start server
const transport = new StdioServerTransport();
await server.connect(transport);
Detailed patterns and examples in the references/ directory:
See references/zerodb-integration.md for full implementation.
server.tool(
'multi-step-operation',
'Performs operation across multiple steps',
{ input: z.string() },
async ({ input }) => {
const step1 = await firstStep(input);
const step2 = await secondStep(step1);
const final = await finalStep(step2);
return {
content: [{
type: "text",
text: JSON.stringify({
steps: ['first', 'second', 'final'],
result: final
}, null, 2)
}]
};
}
);
server.resource(
'config://settings',
'Server configuration settings',
async () => {
const config = await loadConfig();
return {
contents: [{
uri: 'config://settings',
mimeType: 'application/json',
text: JSON.stringify(config, null, 2)
}]
};
}
);
See references/testing-mcps.md for detailed testing patterns.
ZERODB_API_KEY=your_api_key
ZERODB_PROJECT_ID=your_project_id
MCP_SERVER_PORT=3000 # If using HTTP transport
{
"name": "@ainative/mcp-my-server",
"version": "1.0.0",
"type": "module",
"bin": {
"mcp-my-server": "./build/index.js"
}
}
isError: true❌ Avoid:
✅ Instead:
After reading this skill:
references/ainative-conventions.md for detailed patternsreferences/zerodb-integration.md for ZeroDB examplesreferences/testing-mcps.md for testing guidancedevelopment
ZeroDB vector database best practices, semantic search patterns, RLHF workflows, and memory management. Use when working with ZeroDB APIs, vector search, or AI memory systems.
development
TDD/BDD workflows for FastAPI + React stack with pytest, vitest, and integration testing. Use when writing tests, configuring test runners, or implementing test-driven development.
devops
Railway deployment workflows, nixpacks configuration, environment management, and production troubleshooting
development
# API Design Skill You are an expert FastAPI backend architect specializing in RESTful API design, Pydantic data validation, and scalable backend systems. ## When to Use This Skill Use this skill when: - Designing new REST APIs or endpoints - Creating Pydantic models and schemas - Implementing authentication (JWT, OAuth) - Setting up error handling and validation - Structuring FastAPI applications - Working with OpenAPI/Swagger documentation ## Core Principles ### 1. RESTful Design - Use HT