
Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
A template for quickly creating and deploying your own MCP servers. It allows you to:
Обзор
A template for quickly creating and deploying your own MCP servers. It allows you to: 1. Quickly create completely custom MCP server just by chatting with AI IDEs. 2. Add pre-built open source MCP servers to your project from MCP marketplaces. 3. Create multiple MCP instances in separate directories with shared tools. This template deploys all of them at once on railway in just a few clicks! Copy this GitHub template by clicking the "Use this template" button on the top right of the page. 1. Open the Command Palette: - On Mac: Cmd + Shift + P - On Windows: Ctrl + Shift + P 2. Type and select: 3. Click: 4. Choose: as the environment type Prompt your AI IDE to create the tools for you in chat. in the context. (Included by default only in Cursor). Answer the clarifying questions and keep iterating until the tools are created and working as expected. Make sure to add any requested env variables to the ./.env file.
README
Показан фрагмент оригинального README. Открыть оригинал.
MCP Tools Deployment Template
A template for quickly creating and deploying your own MCP servers. It allows you to:
- Quickly create completely custom MCP server just by chatting with AI IDEs.
- Add pre-built open source MCP servers to your project from MCP marketplaces.
- Create multiple MCP instances in separate directories with shared tools.
This template deploys all of them at once on railway in just a few clicks!
🚀 Step-by-Step Guide
Prerequisites
- Python 3.12+
- Git
Step 0: Copy Template
Copy this GitHub template by clicking the “Use this template” button on the top right of the page.
Step 1: Create a Virtual Environment
In Cursor, Windsur, or VS Code:
- Open the Command Palette:
- On Mac:
Cmd + Shift + P - On Windows:
Ctrl + Shift + P
- On Mac:
- Type and select: Python: Select Interpreter
- Click: + Create Virtual Environment
- Choose: Venv as the environment type
In Terminal:
python -m venv venv
source venv/bin/activate
Step 2: Create Your Tools
2.1 Create Custom Tools Just by Chatting With AI
Prompt your AI IDE to create the tools for you in chat. Make sure to include ./.cursor/rules/workflow.mdc in the context. (Included by default only in Cursor).
For example:
Please create a tool that fetches the transcripts from a YouTube video. @workflow.mdc
Answer the clarifying questions and keep iterating until the tools are created and working as expected.
Make sure to add any requested env variables to the ./.env file.
2.2 Add Pre Build Open Source Stdio MCP Servers
Add other pre-built Open Source Stdio MCP servers to the mcp.json file, similarly to Cursor and other clients.
{
"mcpServers": {
"notionapi": {
"command": "npx",
"args": [
"-y",
"@notionhq/notion-mcp-server"
],
"env": {
"OPENAPI_MCP_HEADERS": "{\"Authorization\":\"Bearer ntn_****\",\"Notion-Version\":\"2022-06-28\"}"
}
}
# ... add more servers here
}
Only Stdio servers are supported by this method. This repo will automatically convert them to SSE with supergateway.
You can use both npx and uv to run these servers.
2.3 Test the MCP Servers (Optional)
Run the following command to test the MCP servers and ensure all of them are running.
python server/start_mcp.py
For testing with subdirectory endpoints:
python server/start_mcp.py --split-subdirs
You can’t connect local servers to Agencii, but you can test them by adding the SSE URL to Cursor’s “MCP Servers” tab.
This step is not necessary. As long as there are no issues in your tools.
Step 3: Multi-Endpoint MCP Server
This template supports serving multiple tool directories as separate endpoints from a single Python server.
Directory Structure
Установка
npx -y @notionhq/notion-mcp-serverКонфигурация
{
"mcpServers": {
"notionapi": {
"command": "npx",
"args": [
"-y",
"@notionhq/notion-mcp-server"
],
"env": {
"OPENAPI_MCP_HEADERS": "{\"Authorization\":\"Bearer ntn_****\",\"Notion-Version\":\"2022-06-28\"}"
}
}
# ... add more servers here
}