mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-11 08:36:16 +00:00
Bumps [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) from 1.17.1 to 1.17.3. - [Release notes](https://github.com/modelcontextprotocol/typescript-sdk/releases) - [Commits](https://github.com/modelcontextprotocol/typescript-sdk/compare/1.17.1...1.17.3) --- updated-dependencies: - dependency-name: "@modelcontextprotocol/sdk" dependency-version: 1.17.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Sogen MCP Server
A Model Context Protocol (MCP) server that provides AI access to the sogen userspace emulator.
Setup
-
Install dependencies:
npm install -
Run the server:
npm startOr for development with auto-restart:
npm run dev
Structure
server.js- Main server implementationpackage.json- Node.js project configuration
Available Tools
list_applications
Lists all available applications in the sogen userspace emulator.
Parameters: None
Example usage:
{
"name": "list_applications",
"arguments": {}
}
run_application
Executes a specific application from the allowed list in the sogen userspace emulator.
Parameters:
application(string, required): The name of the application to run (uselist_applicationsto see available apps)args(array of strings, optional): Arguments to pass to the applicationtimeout(number, optional): Timeout in milliseconds (default: 5000)
Example usage:
{
"name": "run_application",
"arguments": {
"application": "echo",
"args": ["Hello from sogen!"],
"timeout": 3000
}
}
Adding More Tools
To add additional tools:
- Add the tool definition to the
ListToolsRequestSchemahandler - Add the implementation to the
CallToolRequestSchemahandler - Create the corresponding method in the
MyMCPServerclass
Execution Model
The server uses an analyzer-based execution model:
- Applications are not executed directly
- Instead, the server runs:
C:/analyer.exe -e C:/somedir <application_name> [args...] - The analyzer handles the actual execution within the sogen environment
- All output comes from the analyzer process
Command Structure
C:/analyer.exe -e C:/somedir <application_name> [arguments...]
Where:
C:/analyer.exe- The sogen analyzer executable-e C:/somedir- Analyzer flags and environment directory<application_name>- The application fromget_applications()[arguments...]- Optional arguments passed to the application
Implementation Required
You need to provide the implementation for the get_applications() method in server.js. This method should:
async get_applications() {
// Return a Promise that resolves to a string array
// Example: return ['echo', 'ls', 'cat', 'grep'];
}
Usage
This server allows AI assistants to:
- List available applications using
list_applications - Execute specific applications using
run_applicationwith validation
The server communicates over stdio and is designed for MCP-compatible clients.
Example Workflow
- Call
list_applicationsto see what's available - Call
run_applicationwith a valid application name and arguments
Next Steps
- Implement
get_applications()method - Provide the actual implementation - Add application-specific argument validation
- Implement resource handling for file access
- Add comprehensive logging and monitoring
- Consider per-application sandboxing for enhanced security