An MCP server and client implementation for EdgeOne Pages Functions, supporting OpenAI-formatted requests.
This project showcases an intelligent chat application built with EdgeOne Pages Functions technology. It interacts with backend functions through a web interface, implementing a complete Model Context Protocol (MCP) workflow.
The system architecture consists of the following core components:
functions/mcp-server/index.ts
)functions/mcp-client/index.ts
)functions/v1/chat/completions/index.ts
) as the MCP HOST, responsible for coordinating the entire MCP workflowThrough this architecture, users can access powerful MCP tool capabilities in the browser, enabling intelligent interactions such as "generating online webpages with a single prompt."
Configure remote MCP services in applications that support Streamable HTTP MCP Server
.
{
"mcpServers": {
"edgeone-pages-mcp-server": {
"url": "https://mcp-on-edge.edgeone.site/mcp-server"
}
}
}
More Templates: EdgeOne Pages
First, install dependencies and start the development server:
# Install dependencies
npm install
# Or use other package managers
# yarn install / pnpm install / bun install
# Start development server
npm run dev
# Or use other package managers
# yarn dev / pnpm dev / bun dev
Configure environment variables: Copy the .env.example
file and rename it to .env
, then fill in your AI service interface configuration information.
After starting, visit http://localhost:3000 in your browser to view the application.
app/page.tsx
contains the main page logic and UI componentsfunctions
directory
functions/v1/chat/completions
functions/mcp-server
functions/mcp-client
Learn more about related technologies:
A server for JavaScript/TypeScript development with intelligent project tooling and testing capabilities.
Refines and structures prompts for large language models using the Anthropic API.
A starter project for building Model Context Protocol (MCP) servers with the mcp-framework.
An MCP server for generating images using Together AI or Replicate models.
Connects Blender to Claude AI via the Model Context Protocol (MCP), enabling direct AI interaction for prompt-assisted 3D modeling, scene creation, and manipulation.
Provides Go language updates and best practices in a structured Markdown format for LLM coding agents.
Manage Azure DevOps projects, work items, builds, and releases.
A MCP Server that enhance your IDE with AI-powered assistance for Intlayer i18n / CMS tool: smart CLI access, versioned docs.
Aggregates multiple MCP resource servers into a single interface with stdio/sse support.
Access real-time and historical token, wallet, and trading data from the Solana ecosystem via the Solana Tracker API.