Documentation Index
Fetch the complete documentation index at: https://docs.enconvo.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Model Context Protocol (MCP) is an open standard that lets AI models interact with external tools, data sources, and services. While EnConvo’s MCP Store provides hundreds of pre-built servers, you can build your own to connect the AI to any custom tool or data source. This guide covers creating MCP servers in TypeScript and Python, configuring transport and authentication, and publishing to the MCP Store.For basic MCP setup and usage, see the MCP introduction. This guide focuses on building and deploying your own servers.
MCP Protocol Basics
An MCP server exposes tools that an AI model can call. Each tool has:- Name: A unique identifier (e.g.,
get_weather,query_database) - Description: A human-readable explanation of what the tool does
- Input schema: A JSON Schema defining the tool’s parameters
- Handler: The function that executes when the tool is called
Communication Flow
Creating a TypeScript MCP Server
Project Setup
tsconfig.json:
Basic Server
Createsrc/index.ts:
Build and Run
Adding to EnConvo
After building, add the server to EnConvo manually:Creating a Python MCP Server
Project Setup
Basic Server
Createserver.py:
Adding to EnConvo
Transport Types
MCP supports three transport protocols. Choose based on your deployment scenario.stdio (Standard I/O)
The most common transport for local servers. EnConvo launches the server as a child process and communicates via stdin/stdout. Best for: Local CLI tools, Node.js and Python servers running on the same machine.SSE (Server-Sent Events)
For remote servers that maintain a persistent connection. The client connects via HTTP and receives events over a long-lived connection. Best for: Remote servers, long-running connections, servers shared across multiple clients.HTTP (Streamable HTTP)
Standard HTTP request/response pattern. Each tool call is a separate HTTP request. Best for: REST-style servers, stateless tools, serverless deployments.OAuth Authentication
For servers that require user authentication, MCP supports OAuth 2.0 flows.How It Works in EnConvo
- When a server requires OAuth, EnConvo prompts the user to authenticate
- The user completes the OAuth flow in their browser
- EnConvo stores the access token, refresh token, and expiry date securely
- Tokens are automatically refreshed when they expire
- The access token is sent with each request to the MCP server
Server-Side OAuth Configuration
Your server’s manifest should declare the OAuth configuration:Connection Management
EnConvo manages MCP server connections with several reliability features.Connection Pooling
Multiple conversations and tools can share the same server instance. EnConvo maintains a connection pool keyed by server configuration, so each unique server runs only once regardless of how many conversations use it.Auto-Restart
If a server process crashes or becomes unresponsive, EnConvo automatically restarts it on the next tool call.Idle Timeout
Servers that have not been used for an extended period are shut down to conserve resources. They restart automatically when needed.Dynamic Configuration
Server configurations support template strings for dynamic values:__dirname (server directory), HOME (user home), and user_config (user-provided configuration values).
Publishing to the MCP Store
Share your MCP server with the EnConvo community by publishing it to the MCP Store.Package Your Server
Publish your server as an npm package (for TypeScript/JavaScript) or a pip package (for Python). Ensure the entry point is clearly defined.
Create a Manifest
Add an MCP manifest file that describes your server, its tools, required configuration, and installation instructions.
Submit to the Registry
Submit your server to the EnConvo MCP Store registry. The submission is reviewed and, once approved, becomes available for one-click installation.
Debugging Tips
Test locally before adding to EnConvo
Test locally before adding to EnConvo
Run your server standalone and send test messages via stdin to verify tool definitions and responses before connecting it to EnConvo.
Check server logs
Check server logs
In EnConvo, go to Settings -> MCP Servers and click on your server to view its logs. Stderr output from stdio servers is captured here.
Validate tool schemas
Validate tool schemas
Ensure your tool input schemas are valid JSON Schema. Invalid schemas prevent tools from appearing in the AI’s tool list. Use a JSON Schema validator to check.
Handle errors gracefully
Handle errors gracefully
Return structured error messages from your tools. The AI can better handle and explain errors when they include a clear description of what went wrong.
Use environment variables for secrets
Use environment variables for secrets
Never hardcode API keys or secrets in your server code. Use the
env configuration to pass them:Related Resources
MCP Basics
Getting started with MCP in EnConvo
MCP Specification
Official MCP protocol documentation
Extensions
Build EnConvo extensions with MCP integration
Agents
How agents use MCP tools