A Model Context Protocol (MCP) server for the OpenServ platform, providing tools and resources for developing OpenServ agents.
MCP (Model Context Protocol) is a standard way for AI applications and agents to connect to and work with your data sources (e.g. local files, databases, or content repositories) and tools (e.g. GitHub, Google Maps, or Puppeteer).
Think of MCP as a universal adapter for AI applications, similar to what USB-C is for physical devices. USB-C acts as a universal adapter to connect devices to various peripherals and accessories. Similarly, MCP provides a standardized way to connect AI applications to different data and tools.
- MCP Server: Built with the
@modelcontextprotocol/sdk
to provide a standardized interface for AI models - SSE Transport: Uses Server-Sent Events (SSE) for communication with clients
- Dynamic Resource Handling: Resources are crawled directly from URLs with Playwright with Crawlee at server initialization
- Intelligent Development Method Detection: Automatically detects and recommends the best development approach based on user requirements
- Multi-page Content Crawling: Crawls documentation websites and extracts relevant content
- Resources: Provides access to OpenServ documentation, GitHub repository data, and API documentation
- Resource Templates: Dynamic resource templates for GitHub repositories and agent development guides
- Prompts: Templates for generating agent descriptions and development guides
- Tools: Utilities for crawling GitHub repositories, fetching API documentation, and assisting with agent development
- Node.js 18 or higher
- npm or pnpm
-
Clone the repository:
git clone https://github.com/enessusan00/openserv-mcp.git cd openserv-mcp
-
Install dependencies:
npm install
or
pnpm install
-
Build the project:
npm run build
npm run start
This will start the server on port 8080 with the following endpoints:
- SSE endpoint: http://localhost:8080/sse
- Status endpoint: http://localhost:8080/status
To connect Claude Desktop to the OpenServ MCP server, add the following configuration to your claude_desktop_config.json
. You can access from Settings > Developer > Edit Config
{
"mcpServers": {
"openserv-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8080/sse"
]
}
}
}
To connect Cursor to the OpenServ MCP server, add the following configuration:
{
"mcpServers": {
"OpenServ": {
"url": "http://localhost:8080/sse"
}
}
}
The server provides the following resources:
- OpenServ Complete Documentation (
openserv://main-documentation
): Complete documentation fetching from docs.openserv.ai including all pages
Resources are dynamically generated based on development approaches:
- No-Code Builder documentation from docs.openserv.ai
- Agent Starter documentation
- OpenServ SDK repository
- Agent Starter template repository
- Agent Examples repository
- API documentation
- API tutorial
- API examples
All dynamic resources are crawled directly from their source URLs at server initialization, ensuring up-to-date content.
The server provides the following resource templates:
- OpenServ Agent Development Guide (
openserv://agent/{method}/{language}
): Generates a development guide for OpenServ agents based on the specified development method and programming language.- Parameters:
method
: Development method (no-code, sdk, api)language
: Programming language to use
- Parameters:
The template automatically detects if a language is supported for the SDK approach and redirects to the API approach if necessary.
The server provides the following prompts:
-
Create Agent Description (
create-agent-description
): Generates a description for an OpenServ agent- Parameters:
agentName
: Name of the agent (required)capabilities
: List of agent capabilities separated by commas (required)
- Parameters:
-
Development Guide (
development-guide
): Generates a development guide for creating an OpenServ agent- Parameters:
method
: Development method (no-code, sdk, api) (required)language
: Programming language to use (required)complexity
: Guide complexity level (beginner, intermediate, advanced) (optional)
- Parameters:
The server provides the following tools:
- Agent Development Assistant (
agentDevelopmentAssistant
): Assists with OpenServ agent development based on user requirements- Parameters:
method
: Development method preference (required)language
: Programming language preference (optional)
- Parameters:
- Main Documentation (
mainDocumentation
): Provides the main documentation for OpenServ
- No-Code Builder (
noCodeBuilder
): Provides information about the No-Code Builder for OpenServ
- Agent Starter Doc (
agentStarterDoc
): Provides documentation for the Agent Starter SDK - SDK (
sdk
): Provides the OpenServ SDK repository - SDK Agent Starter Template (
sdkAgentStarterTemplate
): Get the Agent Starter template repository in TypeScript for OpenServ - SDK Agent Examples (
sdkAgentExamples
): Provides examples of OpenServ agents built with the SDK in TypeScript and Python
- API Docs (
apiDocs
): Provides the OpenServ API documentation - API Tutorial (
apiTutorial
): Provides the API tutorial for OpenServ - API Examples (
apiExamples
): Provides examples of using the OpenServ API in Python and TypeScript
For development, you can use the watch mode:
npm run dev
- src/: Source code
- api/: API-related functions and services
- constants/: Constant values and definitions
- models/: Data models and type definitions
- tools/: Tools, resources, templates, and prompts implementations
Resources are dynamically crawled from URLs defined in development-path.ts
at server initialization. The crawling process extracts content from the specified URLs and makes it available through the MCP server.